diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2022-03-29 15:21:49 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2022-03-29 15:21:49 +0200 |
commit | 074ea7502e93b290f9300974f5a349a8de4f4753 (patch) | |
tree | a37f6f2c3125cc828de8fb4bc5d09100df49148e /src/util/secmod_signatures.c | |
parent | 3249687b2a25c728b3b86ffc099c682bfed9c145 (diff) | |
download | exchange-074ea7502e93b290f9300974f5a349a8de4f4753.tar.xz |
centralize exchange online signature logic
Diffstat (limited to 'src/util/secmod_signatures.c')
-rw-r--r-- | src/util/secmod_signatures.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/util/secmod_signatures.c b/src/util/secmod_signatures.c index 8e629ebbc..3b539d5fe 100644 --- a/src/util/secmod_signatures.c +++ b/src/util/secmod_signatures.c @@ -23,6 +23,37 @@ #include "taler_signatures.h" +/** + * @brief format used by the signing crypto helper when affirming + * that it created an exchange signing key. + */ +struct TALER_SigningKeyAnnouncementPS +{ + + /** + * Purpose must be #TALER_SIGNATURE_SM_SIGNING_KEY. + * Used with an EdDSA signature of a `struct TALER_SecurityModulePublicKeyP`. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Public signing key of the exchange this is about. + */ + struct TALER_ExchangePublicKeyP exchange_pub; + + /** + * When does the key become available? + */ + struct GNUNET_TIME_TimestampNBO anchor_time; + + /** + * How long is the key available after @e anchor_time? + */ + struct GNUNET_TIME_RelativeNBO duration; + +}; + + void TALER_exchange_secmod_eddsa_sign ( const struct TALER_ExchangePublicKeyP *exchange_pub, @@ -69,6 +100,41 @@ TALER_exchange_secmod_eddsa_verify ( } +/** + * @brief format used by the denomination crypto helper when affirming + * that it created a denomination key. + */ +struct TALER_DenominationKeyAnnouncementPS +{ + + /** + * Purpose must be #TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY. + * Used with an EdDSA signature of a `struct TALER_SecurityModulePublicKeyP`. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Hash of the denomination public key. + */ + struct TALER_DenominationHashP h_denom; + + /** + * Hash of the section name in the configuration of this denomination. + */ + struct GNUNET_HashCode h_section_name; + + /** + * When does the key become available? + */ + struct GNUNET_TIME_TimestampNBO anchor_time; + + /** + * How long is the key available after @e anchor_time? + */ + struct GNUNET_TIME_RelativeNBO duration_withdraw; + +}; + void TALER_exchange_secmod_rsa_sign ( const struct TALER_RsaPubHashP *h_rsa, |