diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-03-02 07:58:55 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-03-02 07:58:55 +0100 |
commit | 4978b1e966af48a18cac86aa224b3c266a9531d7 (patch) | |
tree | cc190b96c510e0b3869e7d2eb1032069bb49c96b /src/include | |
parent | b20ddf0c8a70443bca6e59deba1ee906069a0824 (diff) | |
download | exchange-4978b1e966af48a18cac86aa224b3c266a9531d7.tar.gz exchange-4978b1e966af48a18cac86aa224b3c266a9531d7.tar.bz2 exchange-4978b1e966af48a18cac86aa224b3c266a9531d7.zip |
-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
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_crypto_lib.h | 2 | ||||
-rw-r--r-- | src/include/taler_signatures.h | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 38f91a8e0..a8dc4b0d7 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 72150ca65..3758792ae 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 |