sodium-native icon indicating copy to clipboard operation
sodium-native copied to clipboard

Standardise `crypto_tweak` api

Open chm-diederichs opened this issue 2 years ago • 0 comments

Export the following crypto_tweak api:

// just with namespace
crypto_tweak_ed25519_keypair(pk, scalar, root.scalar, 'namespace')
crypto_tweak_ed25519_pk(pk, pk, 'namespace')

// with precomputed tweak
crypto_tweak_ed25519_base(tweak.publicKey, tweak.scalar, 'namespace')
crypto_tweak_ed25519_sk_to_scalar(scalar, sk)
crypto_tweak_ed25519_pk_add(pk, pk, tweak.publicKey)
crypto_tweak_ed25519_pk_sub(pk, pk, tweak.publicKey)
crypto_tweak_ed25519_scalar_add(scalar, scalar, tweak.scalar)
crypto_tweak_ed25519_keypair_add(pk, scalar, root.scalar, tweak.scalar)

chm-diederichs avatar Sep 29 '22 08:09 chm-diederichs