-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public key and signature format modification #7
Comments
We can get rid of many hash functions by storing the matrix def verify(self, pk_bytes, m, sig_bytes):
# unpacking pk and sig
A_hat, tr, t1_new = unpack_pk(pk_bytes)
c_tilde, z, h = unpack_sig(sig_bytes)
# checks of size
assert(h.sum_hint() > ω)
assert(z.check_norm_bound(γ_1 - β))
μ = H(tr + m, 64)
c = sample_in_ball(c_tilde, τ)
c = c.ntt()
z = z.ntt()
Az_minus_ct1 = (A*z - c*t1_new).intt()
w_prime = h.use_hint(Az_minus_ct1, 2γ_2)
w_prime_bytes = w_prime.bit_pack_w(γ_2)
return c_tilde == H(μ + w_prime_bytes, 32) |
We can store def verify(self, pk_bytes, m, sig_bytes):
# unpacking pk and sig
A_hat, tr, t1_new = unpack_pk(pk_bytes)
c_tilde, z, h, c_ntt = unpack_sig(sig_bytes)
# checks of size
assert(h.sum_hint() > ω)
assert(z.check_norm_bound(γ_1 - β))
μ = H(tr + m, 64)
z = z.ntt()
Az_minus_ct1 = (A*z - c_ntt*t1_new).intt()
w_prime = h.use_hint(Az_minus_ct1, 2γ_2)
w_prime_bytes = w_prime.bit_pack_w(γ_2)
return c_tilde == H(μ + w_prime_bytes, 32) |
In terms of size: Public key
Total: 20.512 kB (assuming tr is 32B). Signature
Total: 9.248kB (8.256kB if we compute |
The cost of the verification is (mainly):
Total: 2H + 8NTT. |
A first version is implemented in 56f36bb. For now, we plan to pack elements in slices of 32 bits (makes more sense for solidity), so we use |
|
The initial python algorithm of verification is (in pseudo-code) :
The text was updated successfully, but these errors were encountered: