diff options
Diffstat (limited to 'src/util/auditor_signatures.c')
-rw-r--r-- | src/util/auditor_signatures.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/util/auditor_signatures.c b/src/util/auditor_signatures.c index 77db296c7..c35b6f192 100644 --- a/src/util/auditor_signatures.c +++ b/src/util/auditor_signatures.c @@ -23,6 +23,89 @@ #include "taler_signatures.h" +/** + * @brief Information signed by an auditor affirming + * the master public key and the denomination keys + * of a exchange. + */ +struct TALER_ExchangeKeyValidityPS +{ + + /** + * Purpose is #TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Hash of the auditor's URL (including 0-terminator). + */ + struct GNUNET_HashCode auditor_url_hash; + + /** + * The long-term offline master key of the exchange, affirmed by the + * auditor. + */ + struct TALER_MasterPublicKeyP master; + + /** + * Start time of the validity period for this key. + */ + struct GNUNET_TIME_TimestampNBO start; + + /** + * The exchange will sign fresh coins between @e start and this time. + * @e expire_withdraw will be somewhat larger than @e start to + * ensure a sufficiently large anonymity set, while also allowing + * the Exchange to limit the financial damage in case of a key being + * compromised. Thus, exchanges with low volume are expected to have a + * longer withdraw period (@e expire_withdraw - @e start) than exchanges + * with high transaction volume. The period may also differ between + * types of coins. A exchange may also have a few denomination keys + * with the same value with overlapping validity periods, to address + * issues such as clock skew. + */ + struct GNUNET_TIME_TimestampNBO expire_withdraw; + + /** + * Coins signed with the denomination key must be spent or refreshed + * between @e start and this expiration time. After this time, the + * exchange will refuse transactions involving this key as it will + * "drop" the table with double-spending information (shortly after) + * this time. Note that wallets should refresh coins significantly + * before this time to be on the safe side. @e expire_deposit must be + * significantly larger than @e expire_withdraw (by months or even + * years). + */ + struct GNUNET_TIME_TimestampNBO expire_deposit; + + /** + * When do signatures with this denomination key become invalid? + * After this point, these signatures cannot be used in (legal) + * disputes anymore, as the Exchange is then allowed to destroy its side + * of the evidence. @e expire_legal is expected to be significantly + * larger than @e expire_deposit (by a year or more). + */ + struct GNUNET_TIME_TimestampNBO expire_legal; + + /** + * The value of the coins signed with this denomination key. + */ + struct TALER_AmountNBO value; + + /** + * Fees for the coin. + */ + struct TALER_DenomFeeSetNBOP fees; + + /** + * Hash code of the denomination public key. (Used to avoid having + * the variable-size RSA key in this struct.) + */ + struct TALER_DenominationHashP denom_hash GNUNET_PACKED; + +}; + + void TALER_auditor_denom_validity_sign ( const char *auditor_url, |