Skip to content

Commit c0717c3

Browse files
committed
x448: api fixups
1 parent 94e5815 commit c0717c3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)