summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-06 00:05:45 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-06 00:05:45 +0100
commit70b08396445c7d9f709ad020a608acbf812433bd (patch)
tree7657f24f00074b2b93352a67ffee229fd9cb06cd /src/include
parent9aff197bb39ed8e5805769743f9c05508221c49b (diff)
downloadexchange-70b08396445c7d9f709ad020a608acbf812433bd.tar.gz
exchange-70b08396445c7d9f709ad020a608acbf812433bd.tar.bz2
exchange-70b08396445c7d9f709ad020a608acbf812433bd.zip
implement new taler-auditor-offline tool
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_crypto_lib.h73
-rw-r--r--src/include/taler_exchange_service.h2
-rw-r--r--src/include/taler_signatures.h2
3 files changed, 75 insertions, 2 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 757dee675..1c77bfe64 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -1294,6 +1294,79 @@ TALER_exchange_secmod_rsa_verify (
const struct TALER_SecurityModuleSignatureP *secm_sig);
+/**
+ * Create denomination key validity signature by the auditor.
+ *
+ * @param auditor_url BASE URL of the auditor's API
+ * @param h_denom_pub hash of the denomination's public key
+ * @param master_pub master public key of the exchange
+ * @param stamp_start when does the exchange begin signing with this key
+ * @param stamp_expire_withdraw when does the exchange end signing with this key
+ * @param stamp_expire_deposit how long does the exchange accept the deposit of coins with this key
+ * @param stamp_expire_legal how long does the exchange preserve information for legal disputes with this key
+ * @param coin_value what is the value of coins signed with this key
+ * @param fee_withdraw what withdraw fee does the exchange charge for this denomination
+ * @param fee_deposit what deposit fee does the exchange charge for this denomination
+ * @param fee_refresh what refresh fee does the exchange charge for this denomination
+ * @param fee_refund what refund fee does the exchange charge for this denomination
+ * @param auditor_priv private key to sign with
+ * @param[out] auditor_sig where to write the signature
+ */
+void
+TALER_auditor_denom_validity_sign (
+ const char *auditor_url,
+ const struct GNUNET_HashCode *h_denom_pub,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct GNUNET_TIME_Absolute stamp_start,
+ struct GNUNET_TIME_Absolute stamp_expire_withdraw,
+ struct GNUNET_TIME_Absolute stamp_expire_deposit,
+ struct GNUNET_TIME_Absolute stamp_expire_legal,
+ const struct TALER_Amount *coin_value,
+ const struct TALER_Amount *fee_withdraw,
+ const struct TALER_Amount *fee_deposit,
+ const struct TALER_Amount *fee_refresh,
+ const struct TALER_Amount *fee_refund,
+ const struct TALER_AuditorPrivateKeyP *auditor_priv,
+ struct TALER_AuditorSignatureP *auditor_sig);
+
+
+/**
+ * Verify denomination key validity signature from auditor.
+ *
+ * @param auditor_url BASE URL of the auditor's API
+ * @param h_denom_pub hash of the denomination's public key
+ * @param master_pub master public key of the exchange
+ * @param stamp_start when does the exchange begin signing with this key
+ * @param stamp_expire_withdraw when does the exchange end signing with this key
+ * @param stamp_expire_deposit how long does the exchange accept the deposit of coins with this key
+ * @param stamp_expire_legal how long does the exchange preserve information for legal disputes with this key
+ * @param coin_value what is the value of coins signed with this key
+ * @param fee_withdraw what withdraw fee does the exchange charge for this denomination
+ * @param fee_deposit what deposit fee does the exchange charge for this denomination
+ * @param fee_refresh what refresh fee does the exchange charge for this denomination
+ * @param fee_refund what refund fee does the exchange charge for this denomination
+ * @param auditor_pub public key to verify against
+ * @param auditor_sig the signature the signature
+ * @return #GNUNET_OK if the signature is valid
+ */
+int
+TALER_auditor_denom_validity_verify (
+ const char *auditor_url,
+ const struct GNUNET_HashCode *h_denom_pub,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct GNUNET_TIME_Absolute stamp_start,
+ struct GNUNET_TIME_Absolute stamp_expire_withdraw,
+ struct GNUNET_TIME_Absolute stamp_expire_deposit,
+ struct GNUNET_TIME_Absolute stamp_expire_legal,
+ const struct TALER_Amount *coin_value,
+ const struct TALER_Amount *fee_withdraw,
+ const struct TALER_Amount *fee_deposit,
+ const struct TALER_Amount *fee_refresh,
+ const struct TALER_Amount *fee_refund,
+ const struct TALER_AuditorPublicKeyP *auditor_pub,
+ const struct TALER_AuditorSignatureP *auditor_sig);
+
+
/* **************** /wire account offline signing **************** */
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 512dfb35c..5691e58de 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -393,7 +393,7 @@ struct TALER_EXCHANGE_HttpResponse
/**
* Function called with information about who is auditing
- * a particular exchange and what key the exchange is using.
+ * a particular exchange and what keys the exchange is using.
*
* @param cls closure
* @param hr HTTP response data
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index c30f21d60..5f380812c 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -1041,7 +1041,7 @@ struct TALER_ExchangeKeyValidityPS
/**
* The long-term offline master key of the exchange, affirmed by the
- * auditor. Hashed string, including 0-terminator.
+ * auditor.
*/
struct TALER_MasterPublicKeyP master;