From 06eaf7232e9a920468c0f8d74dcf2fe8b555501c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:24:36 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- plugin/auth_ed25519/ref10/keypair.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 plugin/auth_ed25519/ref10/keypair.c (limited to 'plugin/auth_ed25519/ref10/keypair.c') diff --git a/plugin/auth_ed25519/ref10/keypair.c b/plugin/auth_ed25519/ref10/keypair.c new file mode 100644 index 00000000..64000838 --- /dev/null +++ b/plugin/auth_ed25519/ref10/keypair.c @@ -0,0 +1,23 @@ +#include +#include "crypto_sign.h" +#include "crypto_hash_sha512.h" +#include "ge.h" + +int crypto_sign_keypair( + unsigned char *pk, + unsigned char *pw, unsigned long long pwlen +) +{ + unsigned char az[64]; + ge_p3 A; + + crypto_hash_sha512(az,pw,pwlen); + az[0] &= 248; + az[31] &= 63; + az[31] |= 64; + + ge_scalarmult_base(&A,az); + ge_p3_tobytes(pk,&A); + + return 0; +} -- cgit v1.2.3