From 5d2157a8f6edeaf124e26561ed50c458af9df00d Mon Sep 17 00:00:00 2001 From: Gian Demarmels Date: Thu, 23 Dec 2021 10:58:03 +0100 Subject: sign_blinded implementation --- src/util/test_crypto.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/util/test_crypto.c') 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); -- cgit v1.2.3