diff --git a/src/ristretto/ristretto_keys.rs b/src/ristretto/ristretto_keys.rs index c70454cb..024c5a8a 100644 --- a/src/ristretto/ristretto_keys.rs +++ b/src/ristretto/ristretto_keys.rs @@ -270,8 +270,8 @@ impl borsh::BorshSerialize for RistrettoPublicKey { #[cfg(feature = "borsh")] impl borsh::BorshDeserialize for RistrettoPublicKey { fn deserialize(buf: &mut &[u8]) -> io::Result { - let bytes: [u8; 32] = borsh::BorshDeserialize::deserialize(buf)?; - Self::from_bytes(&bytes).map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e.to_string())) + let bytes: Vec = borsh::BorshDeserialize::deserialize(buf)?; + Self::from_bytes(&bytes.as_slice()).map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e.to_string())) } }