Skip to content
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

Merged
merged 4 commits into from
Aug 11, 2023

Conversation

spoonincode
Copy link
Member

@spoonincode spoonincode commented Aug 2, 2023

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

@spoonincode spoonincode linked an issue Aug 2, 2023 that may be closed by this pull request
Copy link
Member

@heifner heifner left a 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);
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep good call

@spoonincode spoonincode merged commit 1c05c9c into bls_integration Aug 11, 2023
@spoonincode spoonincode deleted the antelope_bls branch August 11, 2023 18:36
@linh2931 linh2931 restored the antelope_bls branch August 16, 2023 13:14
@linh2931 linh2931 deleted the antelope_bls branch August 16, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Finish integrating BLS into Leap main branch
3 participants