aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_crypto_lib.h
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-03-28 11:04:00 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-03-28 11:04:00 +0200
commita2386abadba4c211a00879f54ff030a86e491418 (patch)
tree3745e36e2c9f93c1d464472eee76f70dfd66827d /src/include/taler_crypto_lib.h
parentd61a19c275cc727e29fb15afee78b6b0ce19c8ee (diff)
downloadexchange-a2386abadba4c211a00879f54ff030a86e491418.tar.xz
[age restriction] progress 19/19 (final) - Use Edx25519 for crypto
We switch from EcDSA to Edx25519 for the underlying signature scheme. Edx25519 is implemented in gnunet, starting with (gnunet-)commit ce38d1f6c9bd7857a1c3bc2094a0ee9752b86c32.
Diffstat (limited to 'src/include/taler_crypto_lib.h')
-rw-r--r--src/include/taler_crypto_lib.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 7117c67fe..ef5096405 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -386,10 +386,17 @@ struct TALER_CoinSpendSignatureP
*/
struct TALER_AgeCommitmentPrivateKeyP
{
+#ifdef AGE_RESTRICTION_WITH_ECDSA
/**
* Taler uses EcDSA for coins when signing age verification attestation.
*/
struct GNUNET_CRYPTO_EcdsaPrivateKey priv;
+#else
+ /**
+ * Taler uses Edx25519 for coins when signing age verification attestation.
+ */
+ struct GNUNET_CRYPTO_Edx25519PrivateKey priv;
+#endif
};
@@ -398,10 +405,17 @@ struct TALER_AgeCommitmentPrivateKeyP
*/
struct TALER_AgeCommitmentPublicKeyP
{
+#ifdef AGE_RESTRICTION_WITH_ECDSA
/**
* Taler uses EcDSA for coins when signing age verification attestation.
*/
struct GNUNET_CRYPTO_EcdsaPublicKey pub;
+#else
+ /**
+ * Taler uses Edx25519 for coins when signing age verification attestation.
+ */
+ struct GNUNET_CRYPTO_Edx25519PublicKey pub;
+#endif
};
@@ -1174,7 +1188,11 @@ struct TALER_AgeCommitmentHash
*/
struct TALER_AgeAttestation
{
+#ifdef AGE_RESTRICTION_WITH_ECDSA
struct GNUNET_CRYPTO_EcdsaSignature signature;
+#else
+ struct GNUNET_CRYPTO_Edx25519Signature signature;
+#endif
};
extern const struct TALER_AgeCommitmentHash TALER_ZeroAgeCommitmentHash;