We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65a25dd commit 8434e5cCopy full SHA for 8434e5c
extensions/ecc/guest/src/eddsa.rs
@@ -194,6 +194,9 @@ where
194
{
195
let mut y_bytes = p.y().as_le_bytes().to_vec();
196
if p.x().as_le_bytes()[0] & 1u8 == 1 {
197
+ // We pack the parity of the x-coordinate in the most significant bit of the last byte, as
198
+ // per the Ed25519 spec, so the Coordinate<C> type must have enough limbs so that the most
199
+ // significant bit of the last byte is always 0.
200
debug_assert!(y_bytes[Coordinate::<C>::NUM_LIMBS - 1] & 0b10000000 == 0);
201
y_bytes[Coordinate::<C>::NUM_LIMBS - 1] |= 0b10000000;
202
}
0 commit comments