|
@ -253,7 +253,6 @@ pub fn decompress_point(bb: [u8; 32]) -> Result { |
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
pub fn blh(b: &[u8]) -> Vec<u8> {
|
|
|
pub fn blh(b: &[u8]) -> Vec<u8> {
|
|
|
println!("TODO: add test that this new blake512 function is giving correct output. Not doing so could have unlikely yet critical implications");
|
|
|
|
|
|
let mut h = Blake2b512::new();
|
|
|
let mut h = Blake2b512::new();
|
|
|
h.update(b);
|
|
|
h.update(b);
|
|
|
let digest = h.finalize();
|
|
|
let digest = h.finalize();
|
|
@ -743,7 +742,6 @@ mod tests { |
|
|
|
|
|
|
|
|
// test signature & verification
|
|
|
// test signature & verification
|
|
|
let msg = BigInt::from_bytes_le(Sign::Plus, &hex::decode("00010203040506070809").unwrap());
|
|
|
let msg = BigInt::from_bytes_le(Sign::Plus, &hex::decode("00010203040506070809").unwrap());
|
|
|
println!("msg {:?}", msg.to_string());
|
|
|
|
|
|
let sig = sk.sign(msg.clone()).unwrap();
|
|
|
let sig = sk.sign(msg.clone()).unwrap();
|
|
|
assert_eq!(
|
|
|
assert_eq!(
|
|
|
sig.r_b8.x.to_string(),
|
|
|
sig.r_b8.x.to_string(),
|
|
|