diff options
| author | Christian Grothoff <christian@grothoff.org> | 2015-05-16 14:15:34 +0200 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2015-05-16 14:15:34 +0200 | 
| commit | f4a59d1cccd058b3180ea23ed9fdea69cb2129b8 (patch) | |
| tree | ad732a3b92fcd74f5c1295ceee5c06e3a63b3206 /src/include | |
| parent | d080e59e272e307b9ebc267f2c4dd2941cd79436 (diff) | |
eliminating ECDSA, replacing with EdDSA-ECDHE-combo in transfer protocol
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/taler_crypto_lib.h | 46 | ||||
| -rw-r--r-- | src/include/taler_mintdb_plugin.h | 6 | ||||
| -rw-r--r-- | src/include/taler_signatures.h | 26 | 
3 files changed, 30 insertions, 48 deletions
| diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 0ab05f5d..fce27ce5 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 <sreeharsha@totakura.in> + * @author Christian Grothoff <christian@grothoff.org>   */  #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 1f4707b4..0c9b21eb 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 de6dbfc2..bc34c32e 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -123,16 +123,6 @@  /** - * ECDSA test signature. - */ -#define TALER_SIGNATURE_CLIENT_TEST_ECDSA 1300 - -/** - * ECDSA test signature. - */ -#define TALER_SIGNATURE_MINT_TEST_ECDSA 1301 - -/**   * EdDSA test signature.   */  #define TALER_SIGNATURE_CLIENT_TEST_EDDSA 1302 @@ -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;  }; | 
