]> the.earth.li Git - onak.git/commitdiff
Ensure EDDSA signatures including leading zeros
authorJonathan McDowell <noodles@earth.li>
Mon, 25 Sep 2023 20:22:19 +0000 (21:22 +0100)
committerJonathan McDowell <noodles@earth.li>
Mon, 25 Sep 2023 20:24:41 +0000 (21:24 +0100)
mpz_export() expands an mpz to only the correct number of bytes
required. EDDSA signatures are based on a full 64 bytes of signature
data. But if either element of the signature (r or s) is fewer than 249
bits we'll end up with fewer than 32 bytes output and the signature
won't valid.

Ensure our output is right justified so we don't lose the leftmost
zeros.


No differences found