diff options
author | Florian Dold <florian@dold.me> | 2022-03-24 01:59:08 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-24 01:59:08 +0100 |
commit | 303c6e99b34ed4e8b0272fe89f300b0838bbe5e4 (patch) | |
tree | 35f1260ea714eb4a6ac0cc7b9c7b19bf824d4fda /packages/taler-util/src | |
parent | 454b55aa56034f0599f88e92e0475f5928486ce7 (diff) | |
download | wallet-core-303c6e99b34ed4e8b0272fe89f300b0838bbe5e4.tar.xz |
wallet: allow using RPC crypto in more places
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/talerCrypto.ts | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/packages/taler-util/src/talerCrypto.ts b/packages/taler-util/src/talerCrypto.ts index 0385658ca..6bcb592e3 100644 --- a/packages/taler-util/src/talerCrypto.ts +++ b/packages/taler-util/src/talerCrypto.ts @@ -700,25 +700,6 @@ export function bufferForUint32(n: number): Uint8Array { return buf; } -export function setupWithdrawPlanchet( - secretSeed: Uint8Array, - coinNumber: number, -): FreshCoin { - const info = stringToBytes("taler-withdrawal-coin-derivation"); - const saltArrBuf = new ArrayBuffer(4); - const salt = new Uint8Array(saltArrBuf); - const saltDataView = new DataView(saltArrBuf); - saltDataView.setUint32(0, coinNumber); - const out = kdf(64, secretSeed, salt, info); - const coinPriv = out.slice(0, 32); - const bks = out.slice(32, 64); - return { - bks, - coinPriv, - coinPub: eddsaGetPublic(coinPriv), - }; -} - export function setupTipPlanchet( secretSeed: Uint8Array, coinNumber: number, @@ -737,23 +718,6 @@ export function setupTipPlanchet( coinPub: eddsaGetPublic(coinPriv), }; } - -export function setupRefreshTransferPub( - secretSeed: Uint8Array, - transferPubIndex: number, -): EcdheKeyPair { - const info = stringToBytes("taler-transfer-pub-derivation"); - const saltArrBuf = new ArrayBuffer(4); - const salt = new Uint8Array(saltArrBuf); - const saltDataView = new DataView(saltArrBuf); - saltDataView.setUint32(0, transferPubIndex); - const out = kdf(32, secretSeed, salt, info); - return { - ecdhePriv: out, - ecdhePub: ecdheGetPublic(out), - }; -} - /** * * @param paytoUri |