]> git.ipfire.org Git - thirdparty/strongswan.git/commit
curve25519: Prevent Ed25519 signature malleability
authorTobias Brunner <tobias@strongswan.org>
Fri, 16 Nov 2018 14:48:56 +0000 (15:48 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 30 Nov 2018 14:35:01 +0000 (15:35 +0100)
commit2571898d32609ffdd2fb8c5ce1659f3732efb026
tree41b3a18b808b2193eb61c0f2e762a3ae32a4ade0
parent69756c0bffb6ec905bf2008001669045b13c96ad
curve25519: Prevent Ed25519 signature malleability

As per RFC 8032, section 5.1.7 (and section 8.4) we have to make sure s, which
is the scalar in the second half of the signature value, is smaller than L.
Without that check, L can be added to most signatures at least once to create
another valid signature for the same public key and message.

This could be problematic if, for instance, a blacklist is based on hashes
of certificates.  A new certificate could be created with a different
signature (without knowing the signature key) by simply adding L to s.

Currently, both OpenSSL 1.1.1 and Botan 2.8.0 are vulnerable to this, which is
why the unit test currently only warns about it.
src/libstrongswan/plugins/curve25519/curve25519_public_key.c
src/libstrongswan/tests/suites/test_ed25519.c