aboutsummaryrefslogtreecommitdiff
path: root/extension/background/wallet.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2015-12-14 08:54:59 +0100
committerFlorian Dold <florian.dold@gmail.com>2015-12-14 08:54:59 +0100
commit2ecb8e25f07f2b5e8c848a8dbc5da05bdd289813 (patch)
treee5162dc017fa887582e308b55113fcd22c909e9f /extension/background/wallet.js
parentde570d55943c1066cb03150cd904a2b57bdb5faf (diff)
RSA wrapper.
Diffstat (limited to 'extension/background/wallet.js')
-rw-r--r--extension/background/wallet.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/extension/background/wallet.js b/extension/background/wallet.js
index 4f245588b..7011280fa 100644
--- a/extension/background/wallet.js
+++ b/extension/background/wallet.js
@@ -115,9 +115,12 @@ function withdraw(denom, reserve, mint) {
denom_pub: denom.denom_pub,
reserve_pub: reserve.reserve_pub,
};
- let coinPub = EddsaPrivateKey.create();
- // create RSA blinding key
- // blind coin
+ let denomPub = RsaPublicKey.decode(denom.denom_pub);
+ let coinPriv = EddsaPrivateKey.create();
+ let coinPub = coinPriv.getPublicKey();
+ let blindingFactor = RsaBlindingKey.create(1024);
+ let pubHash = coinPub.hash();
+ let ev = rsaBlind(pubHash, blindingFactor, denomPub);
// generate signature
}
/**