gnunet-svn
[Top][All Lists]
Advanced

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

[taler-docs] branch master updated: -update documentation


From: gnunet
Subject: [taler-docs] branch master updated: -update documentation
Date: Fri, 18 Feb 2022 18:46:04 +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 ea9af7a  -update documentation
ea9af7a is described below

commit ea9af7ad5fa81477c655d1e0a7a890a5cf224b6e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Feb 18 18:46:02 2022 +0100

    -update documentation
---
 core/api-common.rst   |  21 +++++++++
 core/api-exchange.rst | 127 ++++++++++++++++++++++++++++++++++++++------------
 2 files changed, 119 insertions(+), 29 deletions(-)

diff --git a/core/api-common.rst b/core/api-common.rst
index eeec550..4aa609f 100644
--- a/core/api-common.rst
+++ b/core/api-common.rst
@@ -235,6 +235,27 @@ hashed data. See `base32`_.
 
    type SHA512HashCode = HashCode;
 
+.. ts:def:: CSNonce
+
+   // 32-byte nonce value, must only be used once.
+   type CSNonce = string;
+
+.. ts:def:: RefreshMasterSeed
+
+   // 32-byte nonce value, must only be used once.
+   type RefreshMasterSeed = string;
+
+.. ts:def:: Cs25519Point
+
+   // 32-byte value representing a point on Curve25519.
+   type Cs25519Point = string;
+
+.. ts:def:: Cs25519Scalar
+
+   // 32-byte value representing a scalar multiplier
+   // for scalar operations on points on Curve25519.
+   type Cs25519Scalar = string;
+
 
 Safe Integers
 ^^^^^^^^^^^^^
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index 955121a..ac8c44b 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -1,6 +1,6 @@
 ..
   This file is part of GNU TALER.
-  Copyright (C) 2014-2021 Taler Systems SA
+  Copyright (C) 2014-2022 Taler Systems SA
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU Affero General Public License as published by the Free 
Software
@@ -303,7 +303,8 @@ possibly by using HTTPS.
       // 32-bit age mask.
       age_mask: Integer;
 
-      cs_public_key: FIXME;
+      // Public key of the denomination.
+      cs_public_key: Cs25519Point;
 
     }
 
@@ -1409,7 +1410,7 @@ exchange.
     }
 
 
-.. http:post:: /csr
+.. http:post:: /csr-withdraw
 
   Obtain exchange-side input values in preparation for a
   withdraw step for certain denomination cipher types,
@@ -1438,30 +1439,21 @@ exchange.
 
     interface WithdrawPrepareRequest {
 
-       nks: WithdrawPrepareDenomNonce[];
-
-    }
-
-  .. ts:def:: WithdrawPrepareDenomNonce
-
-    interface WithdrawPrepareDenomNonce {
-
-      // Random client-side nonce
-      nonce: FIXME;
+      // Nonce to be used by the exchange to derive
+      // its private inputs from. Must not have ever
+      // been used before.
+      nonce: CSNonce;
 
       // Hash of the public key of the denomination the
       // request relates to.
       denom_pub_hash: Hash;
-    }
 
+    }
 
   .. ts:def:: WithdrawPrepareResponse
 
-    interface WithdrawPrepareResponse {
-      // Responses for each request, in the same
-      // order that was used in the request.
-      ewvs: ExchangeWithdrawValue[];
-    }
+    type WithdrawPrepareResponse
+      | ExchangeWithdrawValue;
 
   .. ts:def:: ExchangeWithdrawValue
 
@@ -1487,9 +1479,6 @@ exchange.
       r_pub_1: CsRPublic;
     }
 
-
-
-
 .. http:post:: /reserves/$RESERVE_PUB/withdraw
 
   Withdraw a coin of the specified denomination.  Note that the client should
@@ -1628,9 +1617,13 @@ exchange.
     interface CSBlindedDenominationSignature {
       type: "CS";
 
-      b: FIXME;
+      // Signer chosen bit value, 0 or 1, used
+      // in Clause Blind Schnorr to make the
+      // ROS problem harder.
+      b: Integer;
 
-      s: FIXME;
+      // Blinded scalar calculated from c_b.
+      s: Cs25519Scalar;
 
     }
 
@@ -1842,9 +1835,11 @@ denomination.
     interface CSDenominationSignature {
       type: "CS";
 
-      cs_signature_r: FIXME;
+      // R value component of the signature.
+      cs_signature_r: Cs25519Point;
 
-      cs_signature_s: FIXME:
+      // s value component of the signature.
+      cs_signature_s: Cs25519Scalar:
 
     }
 
@@ -2202,6 +2197,73 @@ using the ``/refresh/link`` request.  While 
``/refresh/link`` must be implemente
 the exchange to achieve taxability, wallets do not really ever need that part 
of
 the API during normal operation.
 
+
+.. http:post:: /csr-melt
+
+  Obtain exchange-side input values in preparation for a
+  melt step for certain denomination cipher types,
+  specifically at this point for Clause-Schnorr blind
+  signatures.
+
+  **Request:** The request body must be a `MeltPrepareRequest` object.
+
+  **Response:**
+
+  :http:statuscode:`200 OK`:
+    The request was successful, and the response is a `MeltPrepareResponse`.  
Note that repeating exactly the same request
+    will again yield the same response (assuming none of the denomination is 
expired).
+  :http:statuscode:`404 Not found`:
+    A denomination key is not known to the exchange.
+  :http:statuscode:`410 Gone`:
+    A requested denomination key is not yet or no longer valid.
+    It either before the validity start, past the expiration or was revoked. 
The response is a
+    `DenominationExpiredMessage`. Clients must evaluate
+    the error code provided to understand which of the
+    cases this is and handle it accordingly.
+
+  **Details:**
+
+  .. ts:def:: MeltPrepareRequest
+
+    interface WithdrawPrepareRequest {
+
+      // Master seed for the Clause-schnorr R-value
+      // creation.
+      // Must not have been used in any prior request.
+      rms: RefreshMasterSeed;
+
+      // Array of denominations and coin offsets for
+      // each of the fresh coins with a CS-cipher
+      // denomination.
+      nks: MeltPrepareDenomNonce[];
+
+    }
+
+  .. ts:def:: MeltPrepareDenomNonce
+
+    interface MeltPrepareDenomNonce {
+
+      // Offset of this coin in the list of
+      // fresh coins. May not match the array offset
+      // as the fresh coins may include non-CS
+      // denominations as well.
+      coin_offset: Integer;
+
+      // Hash of the public key of the denomination the
+      // request relates to. Must be a CS denomination type.
+      denom_pub_hash: Hash;
+    }
+
+
+  .. ts:def:: MeltPrepareResponse
+
+    interface MeltPrepareResponse {
+      // Responses for each request, in the same
+      // order that was used in the request.
+      ewvs: ExchangeWithdrawValue[];
+    }
+
+
 .. _refresh:
 .. http:post:: /coins/$COIN_PUB/melt
 
@@ -2262,6 +2324,13 @@ the API during normal operation.
       // See also ``TALER_refresh_get_commitment()``.
       rc: TALER_RefreshCommitmentP;
 
+      // Master seed for the Clause-schnorr R-value
+      // creation. Must match the /csr-melt request.
+      // Must not have been used in any prior melt request.
+      // Must be present if one of the fresh coin's
+      // denominations is of type Clause-Schnorr.
+      rms?: RefreshMasterSeed;
+
     }
 
   For details about the HKDF used to derive the new coin private keys and
@@ -2451,7 +2520,7 @@ the API during normal operation.
       coin_ev : CoinEnvelope;
 
       // Values contributed by the exchange during the
-      // withdraw operation (see /csr).
+      // withdraw operation (see /csr-melt).
       ewv: ExchangeWithdrawValue;
 
       // Offset of this coin in the refresh operation.
@@ -2537,7 +2606,7 @@ in using this API.
       denom_sig: DenominationSignature;
 
       // Exchange-contributed values during the refresh
-      // operation (see /csr).
+      // operation (see /csr-withdraw).
       ewv: ExchangeWithdrawValue;
 
       // Signature of `TALER_RecoupRequestPS` created with
@@ -2616,7 +2685,7 @@ in using this API.
       denom_sig: DenominationSignature;
 
       // Exchange-contributed values during the refresh
-      // operation (see /csr).
+      // operation (see /csr-melt).
       ewv: ExchangeWithdrawValue;
 
       // Signature of `TALER_RecoupRefreshRequestPS` created with

-- 
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]