Skip to content

Commit

Permalink
Update curve25519-dalek (facebook#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda authored Jan 31, 2023
1 parent 0409db6 commit 2787151
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ serde = ["generic-array/serde", "serde_"]
std = ["alloc"]

[dependencies]
curve25519-dalek = { version = "=4.0.0-pre.5", default-features = false, features = [
curve25519-dalek = { version = "=4.0.0-rc.0", default-features = false, features = [
"rand_core",
"zeroize",
], optional = true }
derive-where = { version = "1", features = ["zeroize-on-drop"] }
digest = "0.10"
Expand Down
5 changes: 1 addition & 4 deletions src/group/ristretto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ impl Group for Ristretto255 {
}

fn deserialize_elem(element_bits: &[u8]) -> Result<Self::Elem> {
if element_bits.len() != 32 {
return Err(Error::Deserialization);
}

CompressedRistretto::from_slice(element_bits)
.map_err(|_| Error::Deserialization)?
.decompress()
.filter(|point| point != &RistrettoPoint::identity())
.ok_or(Error::Deserialization)
Expand Down

0 comments on commit 2787151

Please sign in to comment.