diff options
author | Florian Dold <florian@dold.me> | 2022-11-15 16:56:13 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-11-15 16:56:13 +0100 |
commit | 0d786a7875a1018938db7d352f218f47726806c6 (patch) | |
tree | abb489af5c5d25971a3ce98b9cbf509f769e3d1a /packages/taler-util | |
parent | f441f16e33ff9c371ed9c2c9125641aace19f91b (diff) |
-don't make crypto function used in tests only public
Diffstat (limited to 'packages/taler-util')
-rw-r--r-- | packages/taler-util/src/taler-crypto.test.ts | 10 | ||||
-rw-r--r-- | packages/taler-util/src/taler-crypto.ts | 9 |
2 files changed, 9 insertions, 10 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)); diff --git a/packages/taler-util/src/taler-crypto.ts b/packages/taler-util/src/taler-crypto.ts index 6c87ecb57..8762bd8a1 100644 --- a/packages/taler-util/src/taler-crypto.ts +++ b/packages/taler-util/src/taler-crypto.ts @@ -431,15 +431,6 @@ export function deriveSecrets(bseed: Uint8Array): CsBlindingSecrets { } /** - * Used for testing, simple scalar multiplication with base point of Ed25519 - * @param s scalar - * @returns new point sG - */ -export async function scalarMultBase25519(s: Uint8Array): Promise<Uint8Array> { - return nacl.crypto_scalarmult_ed25519_base_noclamp(s); -} - -/** * calculation of the blinded public point R in CS * @param csPub denomination publik key * @param secrets client blinding secrets |