Skip to content

Commit 8675b5f

Browse files
committed
x448: api fixups
1 parent 4b22a11 commit 8675b5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x448/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ impl From<&Secret> for PublicKey {
2626
}
2727

2828
/// A PublicKey is a point on Curve448.
29+
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
2930
pub struct PublicKey(MontgomeryPoint);
3031

3132
/// A Secret is a Scalar on Curve448.
32-
#[derive(Zeroize)]
33+
#[derive(Clone, Zeroize)]
3334
#[zeroize(drop)]
3435
pub struct Secret([u8; 56]);
3536

@@ -85,7 +86,7 @@ impl Secret {
8586
// Taken from dalek-x25519
8687
pub fn new<T>(csprng: &mut T) -> Self
8788
where
88-
T: RngCore + CryptoRng,
89+
T: RngCore + CryptoRng + ?Sized,
8990
{
9091
let mut bytes = [0u8; 56];
9192

0 commit comments

Comments
 (0)