From f4a59d1cccd058b3180ea23ed9fdea69cb2129b8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 16 May 2015 14:15:34 +0200 Subject: eliminating ECDSA, replacing with EdDSA-ECDHE-combo in transfer protocol --- src/include/taler_crypto_lib.h | 46 ++++++++++++++++----------------------- src/include/taler_mintdb_plugin.h | 6 ++--- src/include/taler_signatures.h | 26 +++++++--------------- 3 files changed, 30 insertions(+), 48 deletions(-) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 0ab05f5d0..fce27ce5e 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -17,6 +17,7 @@ * @file include/taler_crypto_lib.h * @brief taler-specific crypto functions * @author Sree Harsha Totakura + * @author Christian Grothoff */ #ifndef TALER_CRYPTO_LIB_H #define TALER_CRYPTO_LIB_H @@ -100,7 +101,7 @@ struct TALER_MerchantPrivateKeyP struct TALER_TransferPublicKeyP { /** - * Taler uses ECDSA for transfer keys. + * Taler uses ECDHE for transfer keys. */ struct GNUNET_CRYPTO_EcdhePublicKey ecdhe_pub; }; @@ -113,7 +114,7 @@ struct TALER_TransferPublicKeyP struct TALER_TransferPrivateKeyP { /** - * Taler uses ECDSA for melting session keys. + * Taler uses ECDHE for melting session keys. */ struct GNUNET_CRYPTO_EcdhePrivateKey ecdhe_priv; }; @@ -196,37 +197,28 @@ struct TALER_MasterSignatureP /** * @brief Type of public keys for Taler coins. The same key material is used - * for ECDSA and ECDHE operations. + * for EdDSA and ECDHE operations. */ -union TALER_CoinSpendPublicKeyP +struct TALER_CoinSpendPublicKeyP { /** - * Taler uses ECDSA for coins when signing deposit requests. + * Taler uses EdDSA for coins when signing deposit requests. */ - struct GNUNET_CRYPTO_EcdsaPublicKey ecdsa_pub; + struct GNUNET_CRYPTO_EddsaPublicKey eddsa_pub; - /** - * Taler uses ECDH(E) for coin linkage during refresh operations. - */ - struct GNUNET_CRYPTO_EcdhePublicKey ecdhe_pub; }; /** * @brief Type of private keys for Taler coins. The same key material is used - * for ECDSA and ECDHE operations. + * for EdDSA and ECDHE operations. */ -union TALER_CoinSpendPrivateKeyP +struct TALER_CoinSpendPrivateKeyP { /** - * Taler uses ECDSA for coins when signing deposit requests. - */ - struct GNUNET_CRYPTO_EcdsaPrivateKey ecdsa_priv; - - /** - * Taler uses ECDHE for coin linkage during refresh operations. + * Taler uses EdDSA for coins when signing deposit requests. */ - struct GNUNET_CRYPTO_EcdhePrivateKey ecdhe_priv; + struct GNUNET_CRYPTO_EddsaPrivateKey eddsa_priv; }; @@ -236,9 +228,9 @@ union TALER_CoinSpendPrivateKeyP struct TALER_CoinSpendSignatureP { /** - * Taler uses ECDSA for coins. + * Taler uses EdDSA for coins. */ - struct GNUNET_CRYPTO_EcdsaSignature ecdsa_signature; + struct GNUNET_CRYPTO_EddsaSignature eddsa_signature; }; @@ -302,7 +294,7 @@ struct TALER_CoinPublicInfo /** * The coin's public key. */ - union TALER_CoinSpendPublicKeyP coin_pub; + struct TALER_CoinSpendPublicKeyP coin_pub; /** * Public key representing the denomination of the coin @@ -383,7 +375,7 @@ struct TALER_RefreshLinkDecrypted /** * Private key of the coin. */ - union TALER_CoinSpendPrivateKeyP coin_priv; + struct TALER_CoinSpendPrivateKeyP coin_priv; /** * Blinding key. @@ -416,7 +408,7 @@ struct TALER_RefreshLinkEncrypted /** * Encrypted private key of the coin. */ - char coin_priv_enc[sizeof (union TALER_CoinSpendPrivateKeyP)]; + char coin_priv_enc[sizeof (struct TALER_CoinSpendPrivateKeyP)]; }; @@ -435,7 +427,7 @@ struct TALER_RefreshLinkEncrypted int TALER_link_decrypt_secret (const struct TALER_EncryptedLinkSecretP *secret_enc, const struct TALER_TransferPrivateKeyP *trans_priv, - const union TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_LinkSecretP *secret); @@ -453,7 +445,7 @@ TALER_link_decrypt_secret (const struct TALER_EncryptedLinkSecretP *secret_enc, int TALER_link_decrypt_secret2 (const struct TALER_EncryptedLinkSecretP *secret_enc, const struct TALER_TransferPublicKeyP *trans_pub, - const union TALER_CoinSpendPrivateKeyP *coin_priv, + const struct TALER_CoinSpendPrivateKeyP *coin_priv, struct TALER_LinkSecretP *secret); @@ -470,7 +462,7 @@ TALER_link_decrypt_secret2 (const struct TALER_EncryptedLinkSecretP *secret_enc, */ int TALER_link_encrypt_secret (const struct TALER_LinkSecretP *secret, - const union TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_TransferPrivateKeyP *trans_priv, struct TALER_TransferPublicKeyP *trans_pub, struct TALER_EncryptedLinkSecretP *secret_enc); diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h index 1f4707b4d..0c9b21ebd 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_mintdb_plugin.h @@ -1068,7 +1068,7 @@ struct TALER_MINTDB_Plugin struct TALER_MINTDB_LinkDataList * (*get_link_data_list) (void *cls, struct TALER_MINTDB_Session *sesssion, - const union TALER_CoinSpendPublicKeyP *coin_pub); + const struct TALER_CoinSpendPublicKeyP *coin_pub); /** @@ -1101,7 +1101,7 @@ struct TALER_MINTDB_Plugin int (*get_transfer) (void *cls, struct TALER_MINTDB_Session *sesssion, - const union TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_TransferPublicKeyP *transfer_pub, struct TALER_EncryptedLinkSecretP *shared_secret_enc); @@ -1149,7 +1149,7 @@ struct TALER_MINTDB_Plugin struct TALER_MINTDB_TransactionList * (*get_coin_transactions) (void *cls, struct TALER_MINTDB_Session *sesssion, - const union TALER_CoinSpendPublicKeyP *coin_pub); + const struct TALER_CoinSpendPublicKeyP *coin_pub); /** diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index de6dbfc24..bc34c32e9 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -122,16 +122,6 @@ /*******************/ -/** - * ECDSA test signature. - */ -#define TALER_SIGNATURE_CLIENT_TEST_ECDSA 1300 - -/** - * ECDSA test signature. - */ -#define TALER_SIGNATURE_MINT_TEST_ECDSA 1301 - /** * EdDSA test signature. */ @@ -207,7 +197,7 @@ struct TALER_DepositRequestPS { /** * Purpose must be #TALER_SIGNATURE_WALLET_COIN_DEPOSIT. - * Used for an ECDSA signature with the `union TALER_CoinSpendPublicKeyP`. + * Used for an EdDSA signature with the `struct TALER_CoinSpendPublicKeyP`. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -283,9 +273,9 @@ struct TALER_DepositRequestPS /** * The coin's public key. This is the value that must have been * signed (blindly) by the Mint. The deposit request is to be - * signed by the corresponding private key (using ECDSA). + * signed by the corresponding private key (using EdDSA). */ - union TALER_CoinSpendPublicKeyP coin_pub; + struct TALER_CoinSpendPublicKeyP coin_pub; }; @@ -341,9 +331,9 @@ struct TALER_DepositConfirmationPS /** * The coin's public key. This is the value that must have been * signed (blindly) by the Mint. The deposit request is to be - * signed by the corresponding private key (using ECDSA). + * signed by the corresponding private key (using EdDSA). */ - union TALER_CoinSpendPublicKeyP coin_pub; + struct TALER_CoinSpendPublicKeyP coin_pub; /** * The Merchant's public key. Allows the merchant to later refund @@ -363,7 +353,7 @@ struct TALER_RefreshMeltCoinAffirmationPS { /** * Purpose is #TALER_SIGNATURE_WALLET_COIN_MELT. - * Used for an ECDSA signature with the `union TALER_CoinSpendPublicKeyP`. + * Used for an EdDSA signature with the `struct TALER_CoinSpendPublicKeyP`. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose; @@ -396,9 +386,9 @@ struct TALER_RefreshMeltCoinAffirmationPS /** * The coin's public key. This is the value that must have been * signed (blindly) by the Mint. The deposit request is to be - * signed by the corresponding private key (using ECDSA). + * signed by the corresponding private key (using EdDSA). */ - union TALER_CoinSpendPublicKeyP coin_pub; + struct TALER_CoinSpendPublicKeyP coin_pub; }; -- cgit v1.2.3