]> git.codecow.com Git - Monocypher.git/commit
Reduced EdDSA malleability for sliding windows
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 11 Aug 2018 16:19:35 +0000 (18:19 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 11 Aug 2018 16:19:35 +0000 (18:19 +0200)
commit28f6c3e280c421d56228038e9b60ea3281079a58
tree65566afa6f8c50c5d24751f832bc07981fc069c0
parent3766237cd0908a2e43c861c19a286372a21febca
Reduced EdDSA malleability for sliding windows

Signed sliding windows can overflow the initial scalar by one bit.  This
is not a problem when the scalar is reduced modulo L, which is smaller
than 2^253.  The second half of the signature however is controlled by
the attacker, and can be any value.

Legitimate signatures however always reduce modulo L.  They don't really
have to, but this helps with determinism, and enables test vectors.  So
we can safely reject any signature whose second half exceeds L.

This patch rejects anything above 2^253-1, thus guaranteeing that the
three most significant bits are cleared.  This eliminate s-malleability
in most cases, but not all.  Besides, there is still nonce malleability.

Users should still assume signatures are malleable.
src/monocypher.c