summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-24 01:59:08 +0100
committerFlorian Dold <florian@dold.me>2022-03-24 01:59:08 +0100
commit303c6e99b34ed4e8b0272fe89f300b0838bbe5e4 (patch)
tree35f1260ea714eb4a6ac0cc7b9c7b19bf824d4fda /packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
parent454b55aa56034f0599f88e92e0475f5928486ce7 (diff)
downloadwallet-core-303c6e99b34ed4e8b0272fe89f300b0838bbe5e4.tar.gz
wallet-core-303c6e99b34ed4e8b0272fe89f300b0838bbe5e4.tar.bz2
wallet-core-303c6e99b34ed4e8b0272fe89f300b0838bbe5e4.zip
wallet: allow using RPC crypto in more places
Diffstat (limited to 'packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts')
-rw-r--r--packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts23
1 files changed, 22 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts b/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
index 902222673..4dda9cd11 100644
--- a/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
+++ b/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
@@ -86,7 +86,6 @@ export class SynchronousCryptoWorker {
blinded: res.blinded,
};
};
-
this.cryptoImplR.keyExchangeEcdheEddsa = async (_, req) => {
const res = await rpc.queueRequest({
op: "kx_ecdhe_eddsa",
@@ -99,6 +98,28 @@ export class SynchronousCryptoWorker {
h: res.h,
};
};
+ this.cryptoImplR.eddsaGetPublic = async (_, req) => {
+ const res = await rpc.queueRequest({
+ op: "eddsa_get_public",
+ args: {
+ eddsa_priv: req.priv,
+ },
+ });
+ return {
+ pub: res.eddsa_pub,
+ };
+ };
+ this.cryptoImplR.ecdheGetPublic = async (_, req) => {
+ const res = await rpc.queueRequest({
+ op: "ecdhe_get_public",
+ args: {
+ ecdhe_priv: req.priv,
+ },
+ });
+ return {
+ pub: res.ecdhe_pub,
+ };
+ };
}
}