diff options
author | Gian Demarmels <gian@demarmels.org> | 2021-12-22 11:45:22 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 15:31:48 +0100 |
commit | 385eb51e93e39842c0ccb2a6b12b87c66c7fbe26 (patch) | |
tree | abd54908cf87994fe27e873202d9ddac5c0dcbcf /src/util/test_crypto.c | |
parent | f3fb7c29e69d38ee77d6214cf001f8e18fa00f2b (diff) | |
download | exchange-385eb51e93e39842c0ccb2a6b12b87c66c7fbe26.tar.xz |
CS planchet create and withdraw create
Diffstat (limited to 'src/util/test_crypto.c')
-rw-r--r-- | src/util/test_crypto.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c index 12f9e64c0..a91536bf7 100644 --- a/src/util/test_crypto.c +++ b/src/util/test_crypto.c @@ -141,13 +141,14 @@ test_planchets_rsa (void) static int test_planchets_cs (void) { - // struct TALER_PlanchetSecretsP ps; + struct TALER_PlanchetSecretsP ps; struct TALER_DenominationPrivateKey dk_priv; struct TALER_DenominationPublicKey dk_pub; - // struct TALER_PlanchetDetail pd; + struct TALER_PlanchetDetail pd; + struct TALER_CoinPubHash c_hash; + struct TALER_WithdrawNonce nonce; // struct TALER_BlindedDenominationSignature blind_sig; // struct TALER_FreshCoin coin; - // struct TALER_CoinPubHash c_hash; // struct TALER_PlanchetDeriveCsBlindingSecrets seed; GNUNET_assert (GNUNET_OK == @@ -158,8 +159,12 @@ test_planchets_cs (void) // seed.secret = "test secret"; // seed.secret_len = strlen ("test secret"); - // TODO: Probably need to adjust GNUNET CS implementation for the CSNonce creation and afterwards adjust the derive function - // TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS, &seed); + TALER_planchet_setup_random (&ps, TALER_DENOMINATION_CS); + TALER_cs_withdraw_nonce_derive (&ps.coin_priv, &nonce); + + // NEXT: Implement to create withdraw nonce + // Implement to get R_0 and R_1 + // Implement to genrate b-seed from it and calculate c thenĀ§ // GNUNET_assert (GNUNET_OK == // TALER_planchet_prepare (&dk_pub, |