1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00

Add more tests for crypto_sign_ed25519_pk_to_curve25519()

This commit is contained in:
Frank Denis 2017-07-24 23:56:56 +02:00
parent 214fe473f1
commit 8d91a32754

View File

@ -45,6 +45,18 @@ main(void)
printf("conversion failed\n"); printf("conversion failed\n");
} }
} }
sodium_hex2bin(ed25519_pk, crypto_sign_ed25519_PUBLICKEYBYTES,
"0000000000000000000000000000000000000000000000000000000000000000"
"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",
64, NULL, NULL, NULL);
assert(crypto_sign_ed25519_pk_to_curve25519(curve25519_pk, ed25519_pk) == -1);
printf("ok\n"); printf("ok\n");
return 0; return 0;