aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/crypto
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-06-06 15:00:10 +0200
committerFlorian Dold <florian@dold.me>2023-06-06 15:00:15 +0200
commit474a171f5e6684ab7d11bb2987fc90fe6e1b37c8 (patch)
treefeb3184e1d8ad9a9edeea8a511fb4b9011a51d9a /packages/taler-wallet-core/src/crypto
parent9d35a7dc9b47701abf893987b5e0d3d1e99effb0 (diff)
downloadwallet-core-474a171f5e6684ab7d11bb2987fc90fe6e1b37c8.tar.xz
wallet-core: deterministic p2p contract encryption
Diffstat (limited to 'packages/taler-wallet-core/src/crypto')
-rw-r--r--packages/taler-wallet-core/src/crypto/cryptoImplementation.ts2
-rw-r--r--packages/taler-wallet-core/src/crypto/cryptoTypes.ts3
2 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index c0c8e0d01..15ca1ea95 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -1495,6 +1495,7 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
decodeCrock(req.contractPriv),
decodeCrock(req.mergePriv),
req.contractTerms,
+ decodeCrock(req.nonce),
);
const sigBlob = buildSigPS(TalerSignaturePurpose.WALLET_PURSE_ECONTRACT)
.put(hash(enc))
@@ -1531,6 +1532,7 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
decodeCrock(req.pursePub),
decodeCrock(req.contractPriv),
req.contractTerms,
+ decodeCrock(req.nonce),
);
const sigBlob = buildSigPS(TalerSignaturePurpose.WALLET_PURSE_ECONTRACT)
.put(hash(enc))
diff --git a/packages/taler-wallet-core/src/crypto/cryptoTypes.ts b/packages/taler-wallet-core/src/crypto/cryptoTypes.ts
index 930db03a8..7eaa4a55a 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoTypes.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoTypes.ts
@@ -181,6 +181,7 @@ export interface EncryptContractRequest {
pursePub: string;
pursePriv: string;
mergePriv: string;
+ nonce: string;
}
export interface EncryptContractResponse {
@@ -195,6 +196,8 @@ export interface EncryptContractForDepositRequest {
pursePub: string;
pursePriv: string;
+
+ nonce: string;
}
export interface EncryptContractForDepositResponse {