Sha256: 2bfe61c7d49adb3565de5e8d1e432b6f3757ea02e5b87880c1baf64069ae959b

Contents?: true

Size: 418 Bytes

Versions: 35

Compression:

Stored size: 418 Bytes

Contents

#include <string.h>
#include "ed25519_ref10.h"
#include "sha512.h"
#include "ge.h"

int crypto_sign_ed25519_ref10_seed_keypair(uint8_t *pk, uint8_t *sk, const uint8_t *seed)
{
    ge_p3 A;

    crypto_hash_sha512(sk, seed, 32);
    sk[0] &= 248;
    sk[31] &= 127;
    sk[31] |= 64;

    ge_scalarmult_base(&A, sk);
    ge_p3_tobytes(pk, &A);

    memmove(sk, seed, 32);
    memmove(sk + 32, pk, 32);

    return 0;
}

Version data entries

35 entries across 31 versions & 2 rubygems

Version Path
ed25519-1.3.0 ext/ed25519_ref10/keypair.c
ed25519-1.3.0-java ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/ed25519-1.2.4/ext/ed25519_ref10/keypair.c