diff options
Diffstat (limited to 'packages/taler-util/src/taler-crypto.test.ts')
-rw-r--r-- | packages/taler-util/src/taler-crypto.test.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/taler-util/src/taler-crypto.test.ts b/packages/taler-util/src/taler-crypto.test.ts index e90516cc4..913bf4348 100644 --- a/packages/taler-util/src/taler-crypto.test.ts +++ b/packages/taler-util/src/taler-crypto.test.ts @@ -31,7 +31,6 @@ import { csBlind, csUnblind, csVerify, - scalarMultBase25519, deriveSecrets, calcRBlind, Edx25519, @@ -50,6 +49,15 @@ import bigint from "big-integer"; import { AssertionError } from "assert"; import BigInteger from "big-integer"; +/** + * Used for testing, simple scalar multiplication with base point of Ed25519 + * @param s scalar + * @returns new point sG + */ +async function scalarMultBase25519(s: Uint8Array): Promise<Uint8Array> { + return nacl.crypto_scalarmult_ed25519_base_noclamp(s); +} + test("encoding", (t) => { const s = "Hello, World"; const encStr = encodeCrock(stringToBytes(s)); |