You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please implement the recommended traits for the enum PaddingScheme.
Clone is missing from PaddingScheme. Please fix this.
While copy may not be possible due to problems when copying RngCore--namely that an accidental copy may generate the same numbers--, clone is an important implementation which is advised by the creators of rand. With the added implementation of box-clone on Box<dyn DynDigest> and on Box<dyn RngCore>, written out in full bellow, it should be possible to derive Clone on PaddingScheme.
namely that an accidental copy may generate the same numbers--, clone is an important implementation which is advised by the creators of rand
Cloning the RNG feels like a huge footgun here. I'm pretty sure generating the same salt twice in PSS will cripple its security, which this proposal would make way too easy to do accidentally.
FWIW, this is an enum, so you can easily write your own "clone" method from user code, e.g.
Please implement the recommended traits for the enum PaddingScheme.
Clone is missing from
PaddingScheme
. Please fix this.While copy may not be possible due to problems when copying RngCore--namely that an accidental copy may generate the same numbers--, clone is an important implementation which is advised by the creators of rand. With the added implementation of box-clone on
Box<dyn DynDigest>
and onBox<dyn RngCore>
, written out in full bellow, it should be possible to derive Clone on PaddingScheme.for
DynDigest
:and the same for
Box<dyn RngCore>
:and switch to using
Box<dyn RngCoreClone>
rather thanBox<dyn RngCore>
.Thanks.
Best regards,
littleTitan
The text was updated successfully, but these errors were encountered: