taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

post-blinding-prepare.rst (2772B)


      1 .. http:post:: /blinding-prepare
      2 
      3   Obtain exchange-side input values in preparation for a
      4   blinding step of multiple coins for certain denomination
      5   cipher types, specifically at this point for Clause-Schnorr
      6   blind signatures.
      7 
      8   **Request:**
      9 
     10   The request body must be a `BlindingPrepareRequest` object.
     11 
     12   **Response:**
     13 
     14   :http:statuscode:`200 OK`:
     15     The request was successful, and the response is a
     16     `BlindingPrepareResponse`.  Note that repeating exactly the same request
     17     will again yield the same response (assuming none of the denominations is
     18     expired).
     19   :http:statuscode:`404 Not found`:
     20     A denomination key is not known to the exchange.
     21     The response is a `DenominationUnknownMessage`.
     22   :http:statuscode:`410 Gone`:
     23     A requested denomination key is not yet or no longer valid.
     24     It either before the validity start, past the expiration or was revoked.
     25     The response is a `DenominationGoneMessage`.
     26     Clients must evaluate the error code provided to understand
     27     which of the cases this is and handle it accordingly.
     28 
     29   **Details:**
     30 
     31 
     32   .. ts:def:: BlindingPrepareRequest
     33 
     34     type BlindingPrepareRequest = BlindingPrepareRequestCS;
     35 
     36 
     37   .. ts:def:: BlindingPrepareRequestCS
     38 
     39     interface BlindingPrepareRequestCS {
     40       // Cipher type
     41       cipher: "CS";
     42 
     43       // The type of operation this blinding is for.
     44       operation: "withdraw" | "melt";
     45 
     46       // Master seed for the Clause-Schnorr R-value creation.
     47       // MUST not have been used in any prior request of this type.
     48       seed: BlindingMasterSeed;
     49 
     50       // Array of denominations and coin offsets for
     51       // each of the fresh coins with a CS-cipher
     52       // denomination.
     53       // The coin_offset values MUST be strongly increasing.
     54       nks: BlindingInputParameter[];
     55 
     56     }
     57 
     58   .. ts:def:: BlindingInputParameter
     59 
     60     interface BlindingInputParameter {
     61 
     62       // Offset of this coin in the list of
     63       // fresh coins. May not match the array offset
     64       // as the fresh coins may include non-CS
     65       // denominations as well.
     66       coin_offset: Integer;
     67 
     68       // Hash of the public key of the denomination the
     69       // request relates to. Must be a CS denomination type.
     70       denom_pub_hash: HashCode;
     71     }
     72 
     73 
     74 
     75   .. ts:def:: BlindingPrepareResponse
     76 
     77     type BlindingPrepareResponse = BlindingPrepareResponseCS;
     78 
     79 
     80   .. ts:def:: BlindingPrepareResponseCS
     81 
     82     interface BlindingPrepareResponseCS {
     83       cipher: "CS";
     84 
     85       // Array of pairs of CS values, one pair per input
     86       r_pubs: CSRPublicPair[];
     87     }
     88 
     89 
     90   .. ts:def:: CSRPublicPair
     91 
     92     // Pair of points (of type `CSRPublic`) on the curve Curve25519,
     93     // one of which is randomly selected in the Clause-Schnorr
     94     // signature scheme.
     95     type CSRPublicPair = [CSRPublic, CSRPublic];