Conversation
| #[repr(transparent)] | ||
| pub struct SecretScalar<F: PrimeField>(UnsafeCell<[F; 2]>); | ||
| #[derive(Zeroize)] | ||
| pub struct SecretSplit<F: PrimeField>([F; 2]); |
There was a problem hiding this comment.
I'm not sure if we want to make this public so that the user can eventually keep it and manually invoke resplit if required.
If you want to make it private then some methods can be removed as well... as are not used
|
@burdges do you think this is good to be merged? |
|
|
||
| /// Secret key represented as a scalar. | ||
| pub(crate) key: SecretScalar<<K as AffineRepr>::ScalarField>, | ||
| pub(crate) key: SecretScalar<K::ScalarField>, |
There was a problem hiding this comment.
Is this working purely because <K: AffineRepr> exists in the struct? Is this a new rust feature?
There was a problem hiding this comment.
K is bound only by the AffineRepr trait. There are no ambiguities for the ScalarField associated type
Yeah. I decided to revert because that modification was using the secret for the computation: Doing the computation with the reconstructed secret makes the splitting trick pointless |
|
Appears I never fixed this. I'd basically come around to a reasonable compromize, but I never made the changes?!? fuck |
Superseeds #87
UnsafeCellremovalparallelfeature