-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate to AntelopeIO's bls12-381 repo; minor additional bls12-381 usage tweaks #1472
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approval is for the changes in this PR (not including the submodule). I have not reviewed the bls12-381 submodule itself.
return return_code::success; | ||
} | ||
|
||
int32_t interface::bls_g1_mul(span<const char> point, span<const char> scalar, span<char> result) const | ||
{ | ||
if(point.size() != 144 || scalar.size() != 32 || result.size() != 144) | ||
return return_code::failure; | ||
std::optional<bls12_381::g1> a = bls12_381::g1::fromJacobianBytesLE({reinterpret_cast<const uint8_t*>(point.data()), 144}, false, true); | ||
std::optional<bls12_381::g1> a = bls12_381::g1::fromJacobianBytesLE(std::span<uint8_t, 144>((uint8_t*)point.data(), 144), false, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not lose the const
and pass std::span<const uint8_t, 144>
. Same in other locations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep good call
This is work to complete the tasks in #1413. For the most part this PR is just switching the bls12-381 library to the AntelopeIO fork plus any fixups that come from that as any other submodule update. Will include