gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] branch master updated: update specification to match protoc


From: gnunet
Subject: [taler-docs] branch master updated: update specification to match protocolv9
Date: Sat, 06 Nov 2021 17:26:36 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository docs.

The following commit(s) were added to refs/heads/master by this push:
     new 6a62e21  update specification to match protocolv9
6a62e21 is described below

commit 6a62e21d9aed1119694b9fd538b9b3beae5a8960
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Nov 6 17:26:28 2021 +0100

    update specification to match protocolv9
---
 core/api-common.rst   | 185 +++++++++++++++++++++++++++-----------------------
 core/api-exchange.rst |  17 ++---
 2 files changed, 106 insertions(+), 96 deletions(-)

diff --git a/core/api-common.rst b/core/api-common.rst
index b3cffd2..b6bd02a 100644
--- a/core/api-common.rst
+++ b/core/api-common.rst
@@ -222,6 +222,11 @@ hashed data. See `base32`_.
   // 32-byte hash code.
   type ShortHashCode = string;
 
+.. ts:def:: WireSalt
+
+  // 16-byte salt.
+  type WireSalt = string;
+
 .. ts:def:: SHA256HashCode
 
    type SHA256HashCode = ShortHashCode;
@@ -535,12 +540,49 @@ All elliptic curve operations are on Curve25519.  Public 
and private keys are
 thus 32 bytes, and signatures 64 bytes.  For hashing, including HKDFs, Taler
 uses 512-bit hash codes (64 bytes).
 
+.. _HashCode:
 .. sourcecode:: c
 
    struct GNUNET_HashCode {
      uint8_t hash[64];      // usually SHA-512
    };
 
+.. sourcecode:: c
+   struct TALER_DenominationHash {
+     struct GNUNET_HashCode hash;
+   };
+
+.. sourcecode:: c
+   struct TALER_PrivateContractHash {
+     struct GNUNET_HashCode hash;
+   };
+
+.. sourcecode:: c
+   struct TALER_ExtensionContractHash {
+     struct GNUNET_HashCode hash;
+   };
+
+.. sourcecode:: c
+   struct TALER_MerchantWireHash {
+     struct GNUNET_HashCode hash;
+   };
+
+.. sourcecode:: c
+   struct TALER_PaytoHash {
+     struct GNUNET_HashCode hash;
+   };
+
+.. sourcecode:: c
+   struct TALER_BlindedCoinHash {
+     struct GNUNET_HashCode hash;
+   };
+
+.. sourcecode:: c
+   struct TALER_CoinPubHash {
+     struct GNUNET_HashCode hash;
+   };
+
+
 .. _TALER_EcdhEphemeralPublicKeyP:
 .. sourcecode:: c
 
@@ -721,8 +763,8 @@ within the
     struct TALER_ReservePublicKeyP reserve_pub;
     struct TALER_AmountNBO amount_with_fee;
     struct TALER_AmountNBO withdraw_fee;
-    struct GNUNET_HashCode h_denomination_pub;
-    struct GNUNET_HashCode h_coin_envelope;
+    struct TALER_DenominationHash h_denomination_pub;
+    struct TALER_BlindedCoinHash h_coin_envelope;
   };
 
 .. _TALER_DepositRequestPS:
@@ -733,15 +775,15 @@ within the
      * purpose.purpose = TALER_SIGNATURE_WALLET_COIN_DEPOSIT
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_contract_terms;
-    struct GNUNET_HashCode h_wire;
-    struct GNUNET_HashCode h_denom_pub;
+    struct TALER_PrivateContractHash h_contract_terms;
+    struct TALER_ExtensionContractHash h_extensions;
+    struct TALER_MerchantWireHash h_wire;
+    struct TALER_DenominationHash h_denom_pub;
     struct GNUNET_TIME_AbsoluteNBO timestamp;
     struct GNUNET_TIME_AbsoluteNBO refund_deadline;
     struct TALER_AmountNBO amount_with_fee;
     struct TALER_AmountNBO deposit_fee;
     struct TALER_MerchantPublicKeyP merchant;
-    union TALER_CoinSpendPublicKeyP coin_pub;
   };
 
 .. _TALER_DepositConfirmationPS:
@@ -749,11 +791,11 @@ within the
 
   struct TALER_DepositConfirmationPS {
     /**
-     * purpose.purpose = TALER_SIGNATURE_WALLET_CONFIRM_DEPOSIT
+     * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_contract_terms;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_PrivateContractHash h_contract_terms;
+    struct TALER_MerchantWireHash h_wire;
     struct GNUNET_TIME_AbsoluteNBO timestamp;
     struct GNUNET_TIME_AbsoluteNBO refund_deadline;
     struct TALER_AmountNBO amount_without_fee;
@@ -769,8 +811,8 @@ within the
      * purpose.purpose = TALER_SIGNATURE_WALLET_COIN_MELT
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode session_hash;
-    struct GNUNET_HashCode h_denom_pub;
+    struct TALER_RefreshCommitmentP session_hash;
+    struct TALER_DenominationHash h_denom_pub;
     struct TALER_AmountNBO amount_with_fee;
     struct TALER_AmountNBO melt_fee;
     union TALER_CoinSpendPublicKeyP coin_pub;
@@ -784,7 +826,7 @@ within the
      * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_MELT
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode session_hash;
+    struct TALER_RefreshCommitmentP session_hash;
     uint16_t noreveal_index;
   };
 
@@ -832,7 +874,7 @@ within the
     struct TALER_AmountNBO fee_withdraw;
     struct TALER_AmountNBO fee_deposit;
     struct TALER_AmountNBO fee_refresh;
-    struct GNUNET_HashCode denom_hash;
+    struct TALER_DenominationHash denom_hash;
   };
 
 .. _TALER_MasterWireDetailsPS:
@@ -843,7 +885,7 @@ within the
      * purpose.purpose = TALER_SIGNATURE_MASTER_WIRE_DETAILS
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_wire_details;
+    struct TALER_PaytoHash h_wire_details;
   };
 
 .. _TALER_MasterWireFeePS:
@@ -869,19 +911,19 @@ within the
      * purpose.purpose = TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_contract_terms;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_PrivateContractHash h_contract_terms;
+    struct TALER_MerchantWireHash h_wire;
     struct TALER_MerchantPublicKeyP merchant;
-    struct TALER_CoinSpendPublicKeyP coin_pub;
+    union TALER_CoinSpendPublicKeyP coin_pub;
   };
 
 .. _TALER_WireDepositDetailP:
 .. sourcecode:: c
 
   struct TALER_WireDepositDetailP {
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
     struct GNUNET_TIME_AbsoluteNBO execution_time;
-    struct TALER_CoinSpendPublicKeyP coin_pub;
+    union TALER_CoinSpendPublicKeyP coin_pub;
     struct TALER_AmountNBO deposit_value;
     struct TALER_AmountNBO deposit_fee;
   };
@@ -898,7 +940,7 @@ within the
     struct TALER_AmountNBO total;
     struct TALER_AmountNBO wire_fee;
     struct TALER_MerchantPublicKeyP merchant_pub;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_MerchantWireHash h_wire;
     struct GNUNET_HashCode h_details;
   };
 
@@ -920,7 +962,7 @@ within the
     struct TALER_AmountNBO fee_withdraw;
     struct TALER_AmountNBO fee_deposit;
     struct TALER_AmountNBO fee_refresh;
-    struct GNUNET_HashCode denom_hash;
+    struct TALER_DenominationHash denom_hash;
   };
 
 .. _TALER_PaymentResponsePS:
@@ -931,7 +973,7 @@ within the
      * purpose.purpose = TALER_SIGNATURE_MERCHANT_PAYMENT_OK
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
   };
 
 .. _TALER_ContractPS:
@@ -944,7 +986,7 @@ within the
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
     struct TALER_AmountNBO total_amount;
     struct TALER_AmountNBO max_fee;
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
     struct TALER_MerchantPublicKeyP merchant_pub;
   };
 
@@ -957,10 +999,10 @@ within the
      * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_wire;
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_MerchantWireHash h_wire;
+    struct TALER_PrivateContractHash h_contract_terms;
     struct TALER_WireTransferIdentifierRawP wtid;
-    struct TALER_CoinSpendPublicKeyP coin_pub;
+    union TALER_CoinSpendPublicKeyP coin_pub;
     struct GNUNET_TIME_AbsoluteNBO execution_time;
     struct TALER_AmountNBO coin_contribution;
   };
@@ -973,8 +1015,8 @@ within the
       * purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND.
       */
      struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-     struct GNUNET_HashCode h_contract_terms;
-     struct TALER_CoinSpendPublicKeyP coin_pub;
+     struct TALER_PrivateContractHash h_contract_terms;
+     union TALER_CoinSpendPublicKeyP coin_pub;
      struct TALER_MerchantPublicKeyP merchant;
      uint64_t rtransaction_id;
      struct TALER_AmountNBO refund_amount;
@@ -988,10 +1030,10 @@ within the
        * purpose.purpose = TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION.
        */
       struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-      struct GNUNET_HashCode h_contract_terms;
-      struct GNUNET_HashCode h_wire;
+      struct TALER_PrivateContractHash h_contract_terms;
+      struct TALER_MerchantWireHash h_wire;
       struct TALER_MerchantPublicKeyP merchant;
-      struct TALER_CoinSpendPublicKeyP coin_pub;
+      union TALER_CoinSpendPublicKeyP coin_pub;
     };
 
 .. _TALER_RefundRequestPS:
@@ -1002,8 +1044,8 @@ within the
      *  purpose.purpose = TALER_SIGNATURE_MERCHANT_REFUND
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_contract_terms;
-    struct TALER_CoinSpendPublicKeyP coin_pub;
+    struct TALER_PrivateContractHash h_contract_terms;
+    union TALER_CoinSpendPublicKeyP coin_pub;
     struct TALER_MerchantPublicKeyP merchant;
     uint64_t rtransaction_id;
     struct TALER_AmountNBO refund_amount;
@@ -1033,8 +1075,8 @@ within the
      *  purpose.purpose = TALER_SIGNATURE_WALLET_COIN_RECOUP
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct TALER_CoinSpendPublicKeyP coin_pub;
-    struct GNUNET_HashCode h_denom_pub;
+    union TALER_CoinSpendPublicKeyP coin_pub;
+    struct TALER_DenominationHash h_denom_pub;
     struct TALER_DenominationBlindingKeyP coin_blind;
   };
 
@@ -1048,7 +1090,7 @@ within the
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
     struct GNUNET_TIME_AbsoluteNBO timestamp;
     struct TALER_AmountNBO recoup_amount;
-    struct TALER_CoinSpendPublicKeyP coin_pub;
+    union TALER_CoinSpendPublicKeyP coin_pub;
     struct TALER_CoinSpendPublicKeyP old_coin_pub;
   };
 
@@ -1062,7 +1104,7 @@ within the
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
     struct GNUNET_TIME_AbsoluteNBO timestamp;
     struct TALER_AmountNBO recoup_amount;
-    struct TALER_CoinSpendPublicKeyP coin_pub;
+    union TALER_CoinSpendPublicKeyP coin_pub;
     struct TALER_ReservePublicKeyP reserve_pub;
   };
 
@@ -1076,7 +1118,7 @@ within the
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
     struct GNUNET_TIME_AbsoluteNBO timestamp;
-    struct GNUNET_HashCode h_denom_pub;
+    struct TALER_DenominationHash h_denom_pub;
   };
 
 
@@ -1090,7 +1132,7 @@ within the
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
     struct GNUNET_TIME_AbsoluteNBO timestamp;
     char operation[8];
-    struct GNUNET_HashCode h_denom_pub;
+    struct TALER_DenominationHash h_denom_pub;
   };
 
 
@@ -1105,7 +1147,7 @@ within the
     struct GNUNET_TIME_AbsoluteNBO timestamp;
     struct TALER_AmountNBO closing_amount;
     struct TALER_ReservePublicKeyP reserve_pub;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_PaytoHash h_wire;
   };
 
 .. _TALER_CoinLinkSignaturePS:
@@ -1116,10 +1158,10 @@ within the
      * purpose.purpose = TALER_SIGNATURE_WALLET_COIN_LINK
      */
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_HashCode h_denom_pub;
-    struct TALER_CoinSpendPublicKeyP old_coin_pub;
+    struct TALER_DenominationHash h_denom_pub;
+    union TALER_CoinSpendPublicKeyP old_coin_pub;
     struct TALER_TransferPublicKeyP transfer_pub;
-    struct GNUNET_HashCode coin_envelope_hash;
+    struct TALER_BlindedCoinHash coin_envelope_hash;
   };
 
 
@@ -1174,7 +1216,7 @@ within the
     struct TALER_AmountNBO max_deposit_fees;
     struct GNUNET_TIME_AbsoluteNBO purse_expiration;
     struct GNUNET_TIME_AbsoluteNBO status_timestamp;
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
   };
 
 
@@ -1206,7 +1248,7 @@ within the
     struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
     struct GNUNET_TIME_AbsoluteNBO purse_expiration;
     struct TALER_AmountNBO merge_value_after_fees;
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
   };
 
 
@@ -1221,7 +1263,7 @@ within the
     struct TALER_AmountNBO coin_contribution;
     struct GNUNET_TIME_AbsoluteNBO purse_expiration;
     struct TALER_PursePublicKey purse_pub;
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
   };
 
 
@@ -1237,7 +1279,7 @@ within the
     struct TALER_AmountNBO total_deposit_fees;
     struct TALER_PursePublicKey purse_pub;
     struct GNUNET_TIME_AbsoluteNBO purse_expiration;
-    struct GNUNET_HashCode h_contract_terms;
+    struct TALER_PrivateContractHash h_contract_terms;
   };
 
 .. _TALER_PurseMergeSignaturePS:
@@ -1252,8 +1294,8 @@ within the
     struct GNUNET_TIME_AbsoluteNBO merge_timestamp;
     struct GNUNET_TIME_AbsoluteNBO purse_expiration;
     struct TALER_AmountNBO merge_value_after_fees;
-    struct GNUNET_HashCode h_contract_terms;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_PrivateContractHash h_contract_terms;
+    struct TALER_PaytoHash h_wire;
   };
 
 
@@ -1269,8 +1311,8 @@ within the
     struct GNUNET_TIME_AbsoluteNBO merge_timestamp;
     struct GNUNET_TIME_AbsoluteNBO purse_expiration;
     struct TALER_AmountNBO merge_value_after_fees;
-    struct GNUNET_HashCode h_contract_terms;
-    struct GNUNET_HashCode h_wire;
+    struct TALER_PrivateContractHash h_contract_terms;
+    struct TALER_PaytoHash h_wire;
   };
 
 
@@ -1286,35 +1328,8 @@ within the
     struct TALER_PursePublicKey purse_pub;
     struct TALER_AmountNBO merge_amount_after_fees;
     struct GNUNET_TIME_AbsoluteNBO contract_time;
-    struct GNUNET_HashCode h_contract_terms;
-    struct GNUNET_HashCode h_wire;
-  };
-
-
-.. _TALER_AccountSetupRequestSignaturePS:
-.. sourcecode:: c
-
-  struct TALER_AccountSetupRequestSignaturePS {
-    /**
-     * purpose.purpose = TALER_SIGNATURE_ACCOUNT_SETUP_REQUEST
-     */
-    struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct GNUNET_TIME_AbsoluteNBO kyc_timestamp;
-    struct TALER_AmountNBO kyc_fee;
-    struct GNUNET_HashCode h_wire;
-  };
-
-
-.. _TALER_AccountSetupSuccessSignaturePS:
-.. sourcecode:: c
-
-  struct TALER_AccountSetupRequestSignaturePS {
-    /**
-     * purpose.purpose = TALER_SIGNATURE_ACCOUNT_SETUP_SUCCESS
-     */
-    struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-    struct TALER_ReservePublicKey reserve_pub;
-    struct GNUNET_TIME_AbsoluteNBO now;
+    struct TALER_PrivateContractHash h_contract_terms;
+    struct TALER_PaytoHash h_wire;
   };
 
 
@@ -1378,7 +1393,7 @@ within the
       */
      struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
      struct TALER_PursePublicKey purse_pub;
-     struct TALER_CoinSpendPublicKeyP coin_pub;
+     union TALER_CoinSpendPublicKeyP coin_pub;
      struct TALER_MerchantPublicKeyP merchant;
      struct TALER_AmountNBO remaining_amount;
      struct TALER_AmountNBO purse_fee_share;
@@ -1394,7 +1409,7 @@ within the
       * purpose.purpose = TALER_SIGNATURE_SM_DENOMINATION_KEY
       */
       struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-      struct GNUNET_HashCode h_denom_pub;
+      struct TALER_DenominationHash h_denom_pub;
       struct GNUNET_HashCode h_section_name;
       struct GNUNET_TIME_AbsoluteNBO anchor_time;
       struct GNUNET_TIME_RelativeNBO duration_withdraw;
@@ -1422,7 +1437,7 @@ within the
        * purpose.purpose = TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED.
        */
       struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-      struct GNUNET_HashCode h_denom_pub;
+      struct TALER_DenominationHash h_denom_pub;
     };
 
 
@@ -1472,7 +1487,7 @@ within the
        */
       struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
       struct GNUNET_TIME_AbsoluteNBO start_date;
-      struct GNUNET_HashCode h_wire GNUNET_PACKED;
+      struct TALER_PaytoHash h_wire;
     };
 
 .. _TALER_MasterDelWirePS:
@@ -1484,5 +1499,5 @@ within the
        */
       struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
       struct GNUNET_TIME_AbsoluteNBO end_date;
-      struct GNUNET_HashCode h_wire GNUNET_PACKED;
+      struct TALER_PaytoHash h_wire;
     };
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index 3f0be5a..1fa4b0b 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -1645,16 +1645,11 @@ denomination.
       contribution: Amount;
 
       // The merchant's account details.
+      merchant_payto_uri: string;
+
       // The salt is used to hide the ``payto_uri`` from customers
-      // that learn the ``h_wire`` of the merchant.
-      wire: {
-        payto_uri: string;
-        salt: HashCode;
-      };
-
-      // SHA-512 hash of the merchant's payment details from ``wire``.  
Although
-      // strictly speaking redundant, this helps detect inconsistencies.
-      h_wire: HashCode;
+      // when computing the ``h_wire`` of the merchant.
+      wire_salt: WireSalt;
 
       // SHA-512 hash of the contract of the merchant with the customer.  
Further
       // details are never disclosed to the exchange.
@@ -2481,8 +2476,8 @@ typically also view the balance.)
       // Public key of the merchant (identical for all deposits).
       merchant_pub: EddsaPublicKey;
 
-      // Hash of the wire details (identical for all deposits).
-      h_wire: HashCode;
+      // Hash of the payto:// account URI (identical for all deposits).
+      h_payto: PaytoHash;
 
       // Time of the execution of the wire transfer by the exchange.
       execution_time: Timestamp;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]