1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Test Ed->X conversion with x not being a square root

This commit is contained in:
Frank Denis 2017-07-29 21:34:40 +02:00
parent 982cde1a77
commit a9a21a7dff

View File

@ -51,6 +51,11 @@ main(void)
"0000000000000000000000000000000000000000000000000000000000000000",
64, NULL, NULL, NULL);
assert(crypto_sign_ed25519_pk_to_curve25519(curve25519_pk, ed25519_pk) == -1);
sodium_hex2bin(ed25519_pk, crypto_sign_ed25519_PUBLICKEYBYTES,
"0200000000000000000000000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000000",
64, NULL, NULL, NULL);
assert(crypto_sign_ed25519_pk_to_curve25519(curve25519_pk, ed25519_pk) == -1);
sodium_hex2bin(ed25519_pk, crypto_sign_ed25519_PUBLICKEYBYTES,
"0500000000000000000000000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000000",