Skip to content

Commit

Permalink
fix serde compile bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DebugSteven committed Oct 26, 2019
1 parent c87d560 commit 36f0c4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/x25519.rs
Expand Up @@ -25,6 +25,7 @@ use rand_core::CryptoRng;

/// A `PublicKey` is the corresponding public key converted from
/// an `EphemeralSecret` or a `StaticSecret` key.
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
#[cfg_attr(feature = "serde", derive(our_serde::Serialize, our_serde::Deserialize))]
#[derive(Copy, Clone, Debug)]
pub struct PublicKey(pub (crate) MontgomeryPoint);
Expand Down Expand Up @@ -89,6 +90,7 @@ impl<'a> From<&'a EphemeralSecret> for PublicKey {
/// their `PublicKey`.
// FIXME: serialize and deserialize derived methods will not work
// because x25519 requires non-canonical scalars which are rejected by curve25519-dalek
#[cfg_attr(feature = "serde", serde(crate = "our_serde"))]
#[cfg_attr(feature = "serde", derive(our_serde::Serialize, our_serde::Deserialize))]
#[derive(Clone)]
pub struct StaticSecret(pub (crate) Scalar);
Expand Down

0 comments on commit 36f0c4a

Please sign in to comment.