RSA Accumulator
Oct 29, 2019
RSA Accumulator Oct 29, 2019 Overview Definitions modulus math - - PowerPoint PPT Presentation
RSA Accumulator Oct 29, 2019 Overview Definitions modulus math RSA Accumulator Hash to prime E ffi cient algorithms (Batching) Trusted Setup problem Class Group accumulators Terminology Accumulator : A
Oct 29, 2019
that produces a short binding commitment to a set of elements together with short membership/non-membership proofs for any element in the set.”
addition/deletion of elements with O(1) cost, independent of the number of accumulated elements”
supports membership and non-membership proofs”
— D. Boneh, B. Bünz, B. Fisch, “Batching Techniques for Accumulators with Applications to IOPs and Stateless Blockchains”, 2018
= Accumulator = Witness
+4
(a + b) mod N = ((a mod N) + (b mod N) mod N)
Addition, Multiplication,
N prime (13)
(a + b) mod N = ((a mod N) + (b mod N) mod N)
N prime (13)
A generator is an element so that produce all elements. E.g.: Number of generators called If is prime, then (every number except 0 is generator)
x {x,2x,3x, …} x = 4 ⇒ 4,8,12,3,7,11,2,6,10,1,5,9,0 Φ(N) N Φ(N) = N − 1
N not prime (14)
If is not prime, some numbers are not generators. I.e. (1,3,5,7,9,11,13, can not be generated)
N x = 6 ⇒ 6,12,4,10,2,8,0,6,…
, with prime, then the number of generators is
N = pq p, q Φ(N) = (p − 1)(q − 1)
N not prime (14)
N = 14,p = 2,q = 7,Φ(14) = 6
0: {0} 1: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} 2: {0, 2, 4, 6, 8, 10, 12} 3: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} 4: {0, 2, 4, 6, 8, 10, 12} 5: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} 6: {0, 2, 4, 6, 8, 10, 12} 7: {0, 7} 8: {0, 2, 4, 6, 8, 10, 12} 9: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} 10: {0, 2, 4, 6, 8, 10, 12} 11: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} 12: {0, 2, 4, 6, 8, 10, 12} 13: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}
and
is secret
then (used is RSA crypto)
, because
p, q n = pq p q n Φ(n) = (p − 1)(q − 1) mod n gcd(a, n) = 1 aϕ(n)−1 = a−1 mod n 3ϕ(14)−1 = 36−1 = 35 mod 14 = 5 mod 14 3 mod 14 3 ⋅ 5 = 15 = 1 mod 14
and
, no
, no inverse
p, q n = pq Φ(n) = (p − 1)(q − 1) gcd(a, n) = 1 aϕ(n)−1 = a−1 mod n p, q ϕ(n) ϕ(n) a
1 x mod n
number as output
is a RSA-Accumulator
A ∈ ℤN ℋP(…) A′ = Aℋp(document)
(if is prime)
, because
A random ← ℤn Anew = Ae mod n e A
1 e
(A
1 e)
e
= A
can not be computed
witness
A
1 e
add e
keep A as witness for e
Adding element to accumulator
add e
keep A as witness for e
Adding element to accumulator
add f
add f
update witness for e
keep as witness for f
Ae
add e
keep A as witness for e
Adding element to accumulator
add f
add f
update witness for e
keep as witness for f
Ae
Verify:
(Af)
e = Aef
(Ae)
f = Aef
the set
for an element is simply
B = Ae1⋅e2⋯en B 𝒯 = {e1, e2, …, en} B 𝒯 Wei ei Ae1⋯ei−1ei+1⋯en (Wei)
ei ?
= B
ei
done
hash the output once more. GOTO 1 until prime
ei → → ℋ(e) → ℋ(ℋ(e)) → ℋ(ℋ(ℋ(e))) → …
secret primes
available
A A = gx1⋯xm mod n n = pq
RSA Accumulator
Aℋ(tx output) Wtxo
done correctly
Block Block Block Block Block Block
…
Witness Maintainer node node node node
provide witness with new transaction read recent tx’s and apply updates proof of proper witness maintenance task of maintaining witness (and payment)
maintenance
A {x1, x2, …} xi WA,xi O(n) O(n2)
in
A {x1, x2, …} xi WA,xi {x1, x2, …} {WA,x1, WA,x2, …, WA,xn} O(n log(n)) O(log(n))
https://eprint.iacr.org/2018/1188.pdf
and a set of elements and returns the list of all witnesses
g x1, x2, …, xn gx2x3⋯cn, gx1x3x4⋯xn, …, gx1x2⋯xn−1 O(n log(n))
gx3x4x2 gx3x4x1 gx1x2x4
gx1x2x3
gL = (gx3x4)x1, gR = (gx3x4)x2
x1 x2 x3 x4 gL = gx1x2, gR = gx3x4
gL = (gx1x2)x3, gR = (gx1x2)x4
and transmits
so that
x* = x1x2⋯cm A′ = Ax* A′ (x*, A, A′) A′ = Ax*
Prover
compute , residue r, so that send
q = ⌊ x* l ⌋ x* = ql + r Q = Aq mod n
Verifier
send , random prime Compute Accept if
l r = (x mod l) QlAr = A′ mod n
QlAr = (Aq)
l Ar = Aql+r = Ax* = A′
Aq
, , is much cheaper than
takes times as long as
l l ∈ 0…2λ q r = (x mod l) (Aq)
l Ar = A′ mod n
(x mod l) Ql Ar Ax* Ax* λ3 (x mod l)
have been forgotten
https://en.wikipedia.org/wiki/RSA_Factoring_Challenge
n=2519590847565789349402718324004839857142928212620403202777713783604366202070759 555626401852588078440691829064124951508218929855914917618450280848912007284499268 7392807287776735971418347270261896375014971824691165077613379859095700097330459748 8084284017974291006424586918171951187461215151726546322822168699875491824224336372 5908514186546204357679842338718477444792073993423658482382428119816381501067481045 1660377306056201619676256133844143603833904414952634432190114657544454178424020924 616515723350778707749817125772467962926386356373289912154831438167899885040445364 023527381951378636564391212010397122822120720357
p, q p, q
Class Group accumulators work similarly, no trusted setup
with large prime and
were
ℚ ( −p) p p = 3 mod 4 x + y −p a + b 1 + −p 2
Example:
ℚ ( −5) 6 = 2 ⋅ 3 = (1 + −5) (1 − −5)
Elements of
ℚ ( −5)
Class Group accumulators work similarly, no trusted setup
elements
can be generated via
element, i.e. (principle ideals of even numbers)
(α1, …, αk) = {c1α1 + c2α2 + … + ckαk} ℚ ( −5) c1 ⋅ 2 + c2 ⋅ (1 + −5) (2) = 2ℤ
ℚ ( −p)/J
J ℚ ( −p)
just like mod
,
ℚ ( −5) J = (2,1 + −5)
Elements of This looks the same as the the ring (2 subgroups of
ℚ ( −5)/J x mod 6
:
roots are believed to be hard to compute
p = 3 mod 4 ℚ ( −p)
nth
single element
UTXO set to the individual users
O(1)
elements
elements requires steps
steps are needed
are known, a new witness can be invented, since can be computed easily for any
M O(M) O(log M) p, q A1/x x p, q