1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
---
v: 3
title: "The GNU Taler Protocol"
docname: draft-guetschow-taler-protocol
category: info
ipr: trust200902
workgroup: independent
stream: independent
keyword:
- taler
- cryptography
- ecash
- payments
# venue:
# repo: https://git.gnunet.org/lsd0009.git/
# latest: https://lsd.gnunet.org/lsd0009/
author:
-
name: Mikolai Gütschow
org: TUD Dresden University of Technology
abbrev: TU Dresden
street: Helmholtzstr. 10
city: Dresden
code: D-01069
country: Germany
email: mikolai.guetschow@tu-dresden.de
normative:
RFC2104:
RFC5869:
RFC6234:
HKDF: DOI.10.1007/978-3-642-14623-7_34
informative:
--- abstract
\[ TBW \]
--- middle
# Introduction
\[ TBW \]
Beware that this document is still work-in-progress and may contain errors.
Use at your own risk!
# Notation
- `a | b` denotes the concatenation of a with b
# Cryptographic Primitives
## Cryptographic Hash Functions
### SHA-256 {#sha256}
Taler uses SHA-256 as defined in Section 5.1 of [RFC6234].
### SHA-512 {#sha512}
Taler uses SHA-512 as defined in Section 5.2 of [RFC6234].
### Truncated SHA-512 {#sha512-trunc}
## Key Derivation Functions
### HKDF {#hkdf}
The Hashed Key Derivation Function (HKDF) used in Taler is an instantiation of [RFC5869]
with two different hash functions for the Extract and Expand step as suggested in [HKDF].
HMAC-SHA512 (HMAC [RFC2104] instantiated with SHA-512, cf. {{sha512}}) is used for `HKDF-Extract`.
HMAC-SHA256 (HMAC [RFC2104] instantiated with SHA-256, cf. {{sha256}}) is used for `HKDF-Expand`.
~~~
HKDF(salt, IKM, info, L) -> OKM
Inputs:
salt optional salt value (a non-secret random value);
if not provided, it is set to a string of 64 zeros.
IKM input keying material
info optional context and application specific information
(can be a zero-length string)
L length of output keying material in octets
(<= 255*32 = 8160)
Output:
OKM output keying material (of L octets)
~~~
The output OKM is calculated as follows:
~~~
PRK = HKDF-Extract(salt, IKM) with Hash = SHA-512, HashLen = 64
OKM = HKDF-Expand(PRK, info, L) with Hash = SHA-256, HashLen = 32
~~~
### HKDF-Mod
Based on the HKDF defined in {{hkdf}}, this function returns an OKM that is smaller than a given big number N.
~~~
HKDF-Mod(N, salt, IKM, info) -> OKM
Inputs:
N big number; Nbits denotes the length of N in bits
salt optional salt value (a non-secret random value);
if not provided, it is set to a string of 64 zeros.
IKM input keying material
info optional context and application specific information
(can be a zero-length string)
Output:
OKM output keying material (smaller than N)
~~~
The output OKM is calculated as follows:
~~~
Nlen = ceil(Nbits / 8)
while true:
counter = 0
c = 2 least significant octets of counter in network-byte order
x = HKDF(salt, IKM, info | c, NLen)
reset all but lower Nbits bits in x
if x < N:
OKM = x
break
counter += 1
~~~
## Non-Blind Signatures
### Ed25519
## Blind Signatures
### FDH-RSA
### Clause-Schnorr
# The Taler Crypto Protocol
## Withdrawal
# Security Considerations
\[ TBD \]
# IANA Considerations
None.
--- back
# Change log
# Acknowledgments
{:numbered="false"}
\[ TBD \]
This work was supported in part by the German Federal Ministry of
Education and Research (BMBF) within the project Concrete Contracts.
|