diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-12-14 08:54:59 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-12-14 08:54:59 +0100 |
commit | 2ecb8e25f07f2b5e8c848a8dbc5da05bdd289813 (patch) | |
tree | e5162dc017fa887582e308b55113fcd22c909e9f /extension/background/wallet.ts | |
parent | de570d55943c1066cb03150cd904a2b57bdb5faf (diff) | |
download | wallet-core-2ecb8e25f07f2b5e8c848a8dbc5da05bdd289813.tar.xz |
RSA wrapper.
Diffstat (limited to 'extension/background/wallet.ts')
-rw-r--r-- | extension/background/wallet.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/extension/background/wallet.ts b/extension/background/wallet.ts index b04babb68..040b7b6a9 100644 --- a/extension/background/wallet.ts +++ b/extension/background/wallet.ts @@ -128,9 +128,13 @@ 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 } |