lsd0009

LSD0009: The GNU Taler Protocol
Log | Files | Refs | README

commit 61094f3cb7110248757d1aa271ff9170439bb218
parent 33e8242f0c0d4db84f57b292e91c43d4dda039a4
Author: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
Date:   Mon, 27 Jan 2025 12:43:57 +0100

-define bigEndianAmount

Diffstat:
Mdraft-guetschow-taler-protocol.md | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/draft-guetschow-taler-protocol.md b/draft-guetschow-taler-protocol.md @@ -57,9 +57,14 @@ Use at your own risk! - `"abc"` denotes the literal string `abc` encoded as ASCII [RFC20] - `a | b` denotes the concatenation of a with b -- `bits(x)` denotes the minimal number of bits necessary to represent the multiple precision integer x -- `bytes(x)` denotes the minimal number of bytes necessary to represent the multiple precision integer x +- `padZero(12, a)` denotes the byte string a, zero-padded to the length of 12 bytes +- `bits(x)` (`bytes(x)`) denotes the minimal number of bits (bytes) necessary to represent the multiple precision integer x - `bigEndian(16, x)` denotes the 16 least significant bits of the integer x encoded in network byte order (big-endian) +- `bigEndianAmount(amount)` is formed from a fixed-point representation of `amount` + as `bigEndian(64, amount.value) | bigEndian(32, amount.fraction) | padZero(12, amount.currency)`, + where `amount.value` is the non-negative integer part of the base currency, + `amount.fraction` is given in unites of one hundred millionth (1e-8) of the base currency, + and `amount.currency` are the 3-11 ASCII characters used as currency code by the exchange. - `random(256)` denotes a randomly generated sequence of 256 bits - `a * b (mod N)` denotes the multiplication, `a ** b (mod N)` the exponentiation of a and b, modulo N @@ -370,7 +375,7 @@ sig = EdDSA-Sign(reserve.priv, msg) | |--- /reserves/{reserve.pub}/withdraw -->| | (*SHA-512(denom.pub), *b, sig) | | | - | check *denom.pub valid + | check *denom.pub known and not withdrawal-expired | check EdDSA-Verify(reserve.pub, msg, sig) | check reserve.balance >= sum(*denom.valueAndFee) | reserve.balance -= sum(*denom.valueAndFee) @@ -397,6 +402,8 @@ msg = bigEndian(32, 40) | bigEndian(32, 1200) /* TALER_SIGNATURE_WALLET_RESERVE_ (for RSA, without age-restriction) +// todo: add KYC check + ### Implementation Details in wallet-core, `coin.priv` and `blind_secret` are derived from a random `secretSeed` as follows: