diff options
author | Gian Demarmels <gian@demarmels.org> | 2021-12-23 10:58:03 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 15:31:49 +0100 |
commit | 5d2157a8f6edeaf124e26561ed50c458af9df00d (patch) | |
tree | 7eba8057ef76309cd53c9797a470877bdfff86aa /src/util/test_crypto.c | |
parent | f1ec1e70a02ce1672d4d663d3a23c834817359ac (diff) | |
download | exchange-5d2157a8f6edeaf124e26561ed50c458af9df00d.tar.xz |
sign_blinded implementation
Diffstat (limited to 'src/util/test_crypto.c')
-rw-r--r-- | src/util/test_crypto.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c index 142dc31b6..b15e65745 100644 --- a/src/util/test_crypto.c +++ b/src/util/test_crypto.c @@ -148,9 +148,10 @@ test_planchets_cs (void) struct TALER_CoinPubHash c_hash; struct TALER_WithdrawNonce nonce; struct TALER_DenominationCsPublicR r_pub; + struct TALER_DenominationCsPublicR r_pub_blind; struct TALER_DenominationCsPrivateR priv_r; - // struct TALER_BlindedDenominationSignature blind_sig; - // struct TALER_FreshCoin coin; + struct TALER_BlindedDenominationSignature blind_sig; + struct TALER_FreshCoin coin; GNUNET_assert (GNUNET_OK == TALER_denom_priv_create (&dk_priv, @@ -175,12 +176,25 @@ test_planchets_cs (void) &pd, &nonce, &r_pub)); + // TODO: Remove r_secret if not needed GNUNET_assert (GNUNET_OK == TALER_denom_cs_derive_r_secret (&nonce, &dk_priv, &priv_r)); + GNUNET_assert (GNUNET_OK == + TALER_denom_sign_blinded (&blind_sig, + &dk_priv, + &pd.blinded_planchet, + &nonce)); + + // GNUNET_assert (GNUNET_OK == + // TALER_planchet_to_coin (&dk_pub, + // &blind_sig, + // &ps, + // &c_hash, + // &coin)); - // TALER_blinded_denom_sig_free (&blind_sig); + TALER_blinded_denom_sig_free (&blind_sig); // TALER_denom_sig_free (&coin.sig); TALER_denom_priv_free (&dk_priv); TALER_denom_pub_free (&dk_pub); |