diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-05 22:22:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-05 22:22:47 +0100 |
commit | ba627bf84c89ea93a117bce8563b30a3d460e633 (patch) | |
tree | 0a717d9d51f46dab6d1032a3181b441abcae746a /src/include | |
parent | ebbc250f8b86de14a5684addade285cb5d1ad9ac (diff) | |
download | exchange-ba627bf84c89ea93a117bce8563b30a3d460e633.tar.xz |
-fixes
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_crypto_lib.h | 57 | ||||
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 20 | ||||
-rw-r--r-- | src/include/taler_signatures.h | 2 | ||||
-rw-r--r-- | src/include/taler_testing_lib.h | 2 |
4 files changed, 22 insertions, 59 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index a948d98e9..961c36695 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -324,13 +324,12 @@ struct TALER_CoinSpendSignatureP /** * @brief Type of blinding keys for Taler. */ -struct TALER_DenominationBlindingKeyP +union TALER_DenominationBlindingKeyP { - // FIXME: RSA migration! /** * Taler uses RSA for blind signatures. */ - struct GNUNET_CRYPTO_RsaBlindingKeySecret bks; + struct GNUNET_CRYPTO_RsaBlindingKeySecret rsa_bks; }; @@ -589,29 +588,6 @@ struct TALER_DenominationPublicKey /** - * Client-side secrets for blinding. - */ -struct TALER_BlindingSecret -{ - - /** - * Type of the blinding secret. - */ - enum TALER_DenominationCipher cipher; - - union - { - - /** - * Blinding key secret for RSA. - */ - struct GNUNET_CRYPTO_RsaBlindingKeySecret rsa_bks; - - } details; -}; - - -/** * @brief Type of private signing keys for blind signing of coins. */ struct TALER_DenominationPrivateKey @@ -704,22 +680,10 @@ TALER_denom_pub_free (struct TALER_DenominationPublicKey *denom_pub); /** * Create a blinding secret @a bs for @a cipher. * - * @param[out] blinding secret to initialize - * @param cipher cipher to create blinding secret for - */ -enum GNUNET_GenericReturnValue -TALER_blinding_secret_create (struct TALER_BlindingSecret *bs, - enum TALER_DenominationCipher cipher, - ...); - - -/** - * Release memory inside of a blinding secret @a bs. - * - * @param[in] blinding secret to free + * @param[out] bs blinding secret to initialize */ void -TALER_blinding_secret_free (struct TALER_BlindingSecret *bs); +TALER_blinding_secret_create (union TALER_DenominationBlindingKeyP *bs); /** @@ -786,11 +750,11 @@ TALER_denom_sign_blinded (struct TALER_BlindedDenominationSignature *denom_sig, * @return #GNUNET_OK on success */ enum GNUNET_GenericReturnValue -TALER_denom_sig_unblind (struct TALER_DenominationSignature *denom_sig, - const struct - TALER_BlindedDenominationSignature *bdenom_sig, - const struct TALER_BlindingSecret *bks, - const struct TALER_DenominationPublicKey *denom_pub); +TALER_denom_sig_unblind ( + struct TALER_DenominationSignature *denom_sig, + const struct TALER_BlindedDenominationSignature *bdenom_sig, + const union TALER_DenominationBlindingKeyP *bks, + const struct TALER_DenominationPublicKey *denom_pub); /** @@ -986,8 +950,7 @@ struct TALER_PlanchetSecretsP /** * The blinding key. */ - struct TALER_DenominationBlindingKeyP blinding_key; - // FIXME: RSA migration on generation! + union TALER_DenominationBlindingKeyP blinding_key; }; diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index c278aa40b..dcfb7a5d0 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -368,7 +368,7 @@ struct TALER_EXCHANGEDB_TableData { uint64_t known_coin_id; struct TALER_CoinSpendSignatureP coin_sig; - struct TALER_DenominationBlindingKeyP coin_blind; + union TALER_DenominationBlindingKeyP coin_blind; struct TALER_Amount amount; struct GNUNET_TIME_Absolute timestamp; uint64_t reserve_out_serial_id; @@ -378,7 +378,7 @@ struct TALER_EXCHANGEDB_TableData { uint64_t known_coin_id; struct TALER_CoinSpendSignatureP coin_sig; - struct TALER_DenominationBlindingKeyP coin_blind; + union TALER_DenominationBlindingKeyP coin_blind; struct TALER_Amount amount; struct GNUNET_TIME_Absolute timestamp; uint64_t rrc_serial; @@ -762,7 +762,7 @@ struct TALER_EXCHANGEDB_Recoup * Blinding factor supplied to prove to the exchange that * the coin came from this reserve. */ - struct TALER_DenominationBlindingKeyP coin_blind; + union TALER_DenominationBlindingKeyP coin_blind; /** * Signature of the coin of type @@ -799,7 +799,7 @@ struct TALER_EXCHANGEDB_RecoupListEntry * Blinding factor supplied to prove to the exchange that * the coin came from this reserve. */ - struct TALER_DenominationBlindingKeyP coin_blind; + union TALER_DenominationBlindingKeyP coin_blind; /** * Signature of the coin of type @@ -847,7 +847,7 @@ struct TALER_EXCHANGEDB_RecoupRefreshListEntry * Blinding factor supplied to prove to the exchange that * the coin came from this @e old_coin_pub. */ - struct TALER_DenominationBlindingKeyP coin_blind; + union TALER_DenominationBlindingKeyP coin_blind; /** * Signature of the coin of type @@ -1930,7 +1930,7 @@ typedef enum GNUNET_GenericReturnValue const struct TALER_CoinPublicInfo *coin, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendSignatureP *coin_sig, - const struct TALER_DenominationBlindingKeyP *coin_blind); + const union TALER_DenominationBlindingKeyP *coin_blind); /** @@ -1960,7 +1960,7 @@ typedef enum GNUNET_GenericReturnValue const struct TALER_CoinPublicInfo *coin, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendSignatureP *coin_sig, - const struct TALER_DenominationBlindingKeyP *coin_blind); + const union TALER_DenominationBlindingKeyP *coin_blind); /** @@ -2038,7 +2038,7 @@ typedef void uint64_t rowid, const struct TALER_CoinPublicInfo *coin, const struct TALER_CoinSpendSignatureP *coin_sig, - const struct TALER_DenominationBlindingKeyP *coin_blind, + const union TALER_DenominationBlindingKeyP *coin_blind, const struct TALER_BlindedCoinHash *h_blinded_ev, const struct TALER_Amount *amount); @@ -3391,7 +3391,7 @@ struct TALER_EXCHANGEDB_Plugin const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_CoinPublicInfo *coin, const struct TALER_CoinSpendSignatureP *coin_sig, - const struct TALER_DenominationBlindingKeyP *coin_blind, + const union TALER_DenominationBlindingKeyP *coin_blind, const struct TALER_Amount *amount, const struct TALER_BlindedCoinHash *h_blind_ev, struct GNUNET_TIME_Absolute timestamp); @@ -3416,7 +3416,7 @@ struct TALER_EXCHANGEDB_Plugin void *cls, const struct TALER_CoinPublicInfo *coin, const struct TALER_CoinSpendSignatureP *coin_sig, - const struct TALER_DenominationBlindingKeyP *coin_blind, + const union TALER_DenominationBlindingKeyP *coin_blind, const struct TALER_Amount *amount, const struct TALER_BlindedCoinHash *h_blind_ev, struct GNUNET_TIME_Absolute timestamp); diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 56d59767e..eeceaf3d8 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -1506,7 +1506,7 @@ struct TALER_RecoupRequestPS /** * Blinding factor that was used to withdraw the coin. */ - struct TALER_DenominationBlindingKeyP coin_blind; + union TALER_DenominationBlindingKeyP coin_blind; }; diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index f0e6d5529..2656300fe 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -2381,7 +2381,7 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, op (absolute_time, const struct GNUNET_TIME_Absolute) \ op (exchange_pub, const struct TALER_ExchangePublicKeyP) \ op (exchange_sig, const struct TALER_ExchangeSignatureP) \ - op (blinding_key, const struct TALER_DenominationBlindingKeyP) + op (blinding_key, const union TALER_DenominationBlindingKeyP) TALER_TESTING_SIMPLE_TRAITS (TALER_TESTING_MAKE_DECL_SIMPLE_TRAIT) |