From 4978b1e966af48a18cac86aa224b3c266a9531d7 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Wed, 2 Mar 2022 07:58:55 +0100 Subject: -amend missing parts to commit b20ddf0c8 - functions TALER_age_commitment_attest and TALER_age_commitment_verify implemented. - age restriction implementation moved into util/age_restriction.c --- src/include/taler_crypto_lib.h | 2 +- src/include/taler_signatures.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 38f91a8e..a8dc4b0d 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -869,7 +869,7 @@ struct TALER_AgeCommitmentHash */ struct TALER_AgeAttestation { - struct GNUNET_CRYPTO_EddsaSignature attest; + struct GNUNET_CRYPTO_EddsaSignature eddsa_signature; }; extern const struct TALER_AgeCommitmentHash TALER_ZeroAgeCommitmentHash; diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 72150ca6..3758792a 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -271,6 +271,12 @@ */ #define TALER_SIGNATURE_WALLET_COIN_RECOUP_REFRESH 1206 +/** + * Signature using a age restriction key for attestation of a particular + * age/age-group. + */ +#define TALER_SIGNATURE_WALLET_AGE_ATTESTATION 1207 + /******************************/ /* Security module signatures */ @@ -1704,6 +1710,27 @@ struct TALER_MerchantPaySessionSigPS }; +/** + * Used for attestation of a particular age + */ +struct TALER_AgeAttestationPS +{ + /** + * Purpose must be #TALER_SIGNATURE_WALLET_AGE_ATTESTATION. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Age mask that defines the underlying age groups + */ + struct TALER_AgeMask mask; + + /** + * The particular age that this attestation is for + */ + uint8_t age; +}; + GNUNET_NETWORK_STRUCT_END -- cgit v1.2.3