376 Cryptography with Open-Source Software
Withdrawing a coin
If the User wishes to withdraw a coin, the following steps must be followed.
Step 1. The Bank first choo ses a random w ∈ Z
q
and computes
a = g
w
(mod p)
b = (Ig
2
)
w
(mod p)
which are sent to the User. A new w must be chosen for each tra nsaction.
Step 2. The User then cho oses at random s, x
1
, x
2
, u, v ∈ Z
q
(these s hould
be freshly chosen for each new coin) and computes
A = (Ig
2
)
s
B = g
x
1
1
g
x
2
2
z
′
= z
s
a
′
= a
u
g
v
b
′
= b
su
A
v
where all arithmetic is done modulo p. The value A = 1 is not permitted:
this would assume either a value s = 0(modq), o r that Ig
2
= 1(modp)
which means that the User has managed to find U to solve the discrete
logarithm problem g
U
1
= g
−1
2
( mod p). The User next computes the hash
value
H