[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 11/37: clean up cs implementation
From: |
gnunet |
Subject: |
[taler-exchange] 11/37: clean up cs implementation |
Date: |
Fri, 04 Feb 2022 16:53:41 +0100 |
This is an automated email from the git hooks/post-receive script.
gian-demarmels pushed a commit to branch master
in repository exchange.
commit 75eff1524adef47cf9baa71b8426469c301548b2
Author: Lucien Heuzeveldt <lucienclaude.heuzeveldt@students.bfh.ch>
AuthorDate: Fri Dec 31 17:38:20 2021 +0100
clean up cs implementation
---
src/util/crypto.c | 50 +++++++++++++++++++++-----------------------------
1 file changed, 21 insertions(+), 29 deletions(-)
diff --git a/src/util/crypto.c b/src/util/crypto.c
index 2d3099a4..84d20d6b 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -262,11 +262,7 @@ TALER_planchet_setup_random (struct TALER_PlanchetSecretsP
*ps,
GNUNET_break (0);
return;
case TALER_DENOMINATION_RSA:
- // TODO: replace with call to TALER_blinding_secret_create
- GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG,
- &ps->blinding_key.rsa_bks,
- sizeof (struct
- GNUNET_CRYPTO_RsaBlindingKeySecret));
+ TALER_blinding_secret_create (&ps->blinding_key, cipher);
return;
case TALER_DENOMINATION_CS:
// Will be set in a later stage for Clause Blind Schnorr Scheme
@@ -304,22 +300,20 @@ TALER_planchet_prepare (const struct
TALER_DenominationPublicKey *dk,
}
break;
case TALER_DENOMINATION_CS:
+ if (GNUNET_OK !=
+ TALER_denom_blind (dk,
+ &ps->blinding_key,
+ NULL, /* FIXME-Oec */
+ &coin_pub,
+ c_hash,
+ &pd->blinded_planchet,
+ &ps->cs_r_pub,
+ &ps->cs_r_pub_blinded))
{
- if (GNUNET_OK !=
- TALER_denom_blind (dk,
- &ps->blinding_key,
- NULL, /* FIXME-Oec */
- &coin_pub,
- c_hash,
- &pd->blinded_planchet,
- &ps->cs_r_pub,
- &ps->cs_r_pub_blinded))
- {
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
- break;
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
}
+ break;
default:
GNUNET_break (0);
return GNUNET_SYSERR;
@@ -355,17 +349,15 @@ TALER_planchet_to_coin (const struct
TALER_DenominationPublicKey *dk,
}
break;
case TALER_DENOMINATION_CS:
+ if (GNUNET_OK !=
+ TALER_denom_sig_unblind (&sig,
+ blind_sig,
+ &ps->blinding_key,
+ dk,
+ &ps->cs_r_pub_blinded))
{
- if (GNUNET_OK !=
- TALER_denom_sig_unblind (&sig,
- blind_sig,
- &ps->blinding_key,
- dk,
- &ps->cs_r_pub_blinded))
- {
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
}
break;
default:
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] 01/37: added CS data structures, implemented CS keypair, (continued)
- [taler-exchange] 01/37: added CS data structures, implemented CS keypair, gnunet, 2022/02/04
- [taler-exchange] 04/37: implemented planchet_prepare for CS, gnunet, 2022/02/04
- [taler-exchange] 05/37: sign_blinded implementation, gnunet, 2022/02/04
- [taler-exchange] 09/37: utility functions, gnunet, 2022/02/04
- [taler-exchange] 02/37: CS planchet create and withdraw create, gnunet, 2022/02/04
- [taler-exchange] 12/37: fix const due to changes in TALER_planchet_prepare, gnunet, 2022/02/04
- [taler-exchange] 18/37: implement TALER_CRYPTO_helper_cs_r_derive and related tests, gnunet, 2022/02/04
- [taler-exchange] 06/37: add sign and verify implementation, gnunet, 2022/02/04
- [taler-exchange] 07/37: implement exchange_api_csr, gnunet, 2022/02/04
- [taler-exchange] 13/37: secmod cs signatures implementation, gnunet, 2022/02/04
- [taler-exchange] 11/37: clean up cs implementation,
gnunet <=
- [taler-exchange] 16/37: revocation, gnunet, 2022/02/04
- [taler-exchange] 17/37: implement secmod cs derive R, gnunet, 2022/02/04
- [taler-exchange] 08/37: fixed CS signatures and cleanup/refactoring, gnunet, 2022/02/04
- [taler-exchange] 14/37: initial cs_secmod implementation, gnunet, 2022/02/04
- [taler-exchange] 15/37: setup_key for cs secmod helper, gnunet, 2022/02/04
- [taler-exchange] 34/37: include denom_pub into coin_ev_hash, gnunet, 2022/02/04
- [taler-exchange] 36/37: denomination CIPHER field per denom, gnunet, 2022/02/04
- [taler-exchange] 21/37: secmod CS sign implementation, gnunet, 2022/02/04
- [taler-exchange] 22/37: cleanup, gnunet, 2022/02/04
- [taler-exchange] 23/37: implement withdraw (nonce reuse check missing), gnunet, 2022/02/04