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

Remove "unsafe" block in BLST bindings #1720

Closed
paulhauner opened this issue Oct 4, 2020 · 2 comments
Closed

Remove "unsafe" block in BLST bindings #1720

paulhauner opened this issue Oct 4, 2020 · 2 comments
Labels
A1 code-quality crypto An issue/PR that touches cryptography code.

Comments

@paulhauner
Copy link
Member

Description

There is an unsafe block in our crypto/bls crate that I think should be moved into blst:

// TODO: remove this `unsafe` code-block once we get a safe option from `blst`.
//
// See https://github.com/supranational/blst/issues/13
unsafe {
blst::blst_scalar_from_uint64(rand_i.as_mut_ptr(), vals.as_ptr());
rands.push(rand_i.assume_init());
}

To resolve

Follow up on supranational/blst#13

@paulhauner paulhauner added code-quality crypto An issue/PR that touches cryptography code. A1 labels Oct 4, 2020
@paulhauner paulhauner added A1 and removed A1 labels Nov 8, 2020
@ayushmishra2005
Copy link

ayushmishra2005 commented Jan 21, 2021

@paulhauner I would like to pick this issue. As a first step, I have raised a PR in blst library supranational/blst#52 to expose safe blst_scalar constructors.

Once this PR gets merged, I would make corresponding changes here

// TODO: remove this `unsafe` code-block once we get a safe option from `blst`.
//
// See https://github.com/supranational/blst/issues/13
unsafe {
blst::blst_scalar_from_uint64(rand_i.as_mut_ptr(), vals.as_ptr());
rands.push(rand_i.assume_init());
}

@paulhauner
Copy link
Member Author

I'm going to close this since BLST doesn't seem interested in providing the functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A1 code-quality crypto An issue/PR that touches cryptography code.
Projects
None yet
Development

No branches or pull requests

2 participants