Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions k256/src/arithmetic/hash2curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ mod tests {
let mut u = [FieldElement::default(), FieldElement::default()];
hash2curve::hash_to_field::<ExpandMsgXmd<Sha256>, FieldElement>(
&[test_vector.msg],
DST,
&[DST],
&mut u,
)
.unwrap();
Expand All @@ -392,7 +392,7 @@ mod tests {
assert_eq!(ap.y.to_bytes().as_slice(), test_vector.p_y);

// complete run
let pt = Secp256k1::hash_from_bytes::<ExpandMsgXmd<Sha256>>(&[test_vector.msg], DST)
let pt = Secp256k1::hash_from_bytes::<ExpandMsgXmd<Sha256>>(&[test_vector.msg], &[DST])
.unwrap();
let apt = pt.to_affine();
assert_eq!(apt.x.to_bytes().as_slice(), test_vector.p_x);
Expand Down
8 changes: 4 additions & 4 deletions p256/src/arithmetic/hash2curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ mod tests {
let mut u = [FieldElement::default(), FieldElement::default()];
hash2curve::hash_to_field::<ExpandMsgXmd<Sha256>, FieldElement>(
&[test_vector.msg],
DST,
&[DST],
&mut u,
)
.unwrap();
Expand Down Expand Up @@ -224,8 +224,8 @@ mod tests {
assert_point_eq!(p, test_vector.p_x, test_vector.p_y);

// complete run
let pt =
NistP256::hash_from_bytes::<ExpandMsgXmd<Sha256>>(&[test_vector.msg], DST).unwrap();
let pt = NistP256::hash_from_bytes::<ExpandMsgXmd<Sha256>>(&[test_vector.msg], &[DST])
.unwrap();
assert_point_eq!(pt, test_vector.p_x, test_vector.p_y);
}
}
Expand Down Expand Up @@ -274,7 +274,7 @@ mod tests {
test_vector.key_info,
&counter.to_be_bytes(),
],
test_vector.dst,
&[test_vector.dst],
)
.unwrap();

Expand Down
8 changes: 4 additions & 4 deletions p384/src/arithmetic/hash2curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ mod tests {
let mut u = [FieldElement::default(), FieldElement::default()];
hash2curve::hash_to_field::<ExpandMsgXmd<Sha384>, FieldElement>(
&[test_vector.msg],
DST,
&[DST],
&mut u,
)
.unwrap();
Expand Down Expand Up @@ -227,8 +227,8 @@ mod tests {
assert_point_eq!(p, test_vector.p_x, test_vector.p_y);

// complete run
let pt =
NistP384::hash_from_bytes::<ExpandMsgXmd<Sha384>>(&[test_vector.msg], DST).unwrap();
let pt = NistP384::hash_from_bytes::<ExpandMsgXmd<Sha384>>(&[test_vector.msg], &[DST])
.unwrap();
assert_point_eq!(pt, test_vector.p_x, test_vector.p_y);
}
}
Expand Down Expand Up @@ -277,7 +277,7 @@ mod tests {
test_vector.key_info,
&counter.to_be_bytes(),
],
test_vector.dst,
&[test_vector.dst],
)
.unwrap();

Expand Down