Skip to content
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

Make stateproof verifier snark friendly #3895

Merged
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ebd1016
change coin filps to be shake(sumhash(seed))
Feb 16, 2022
5446cae
add sequence of coin positions to the cert
Mar 10, 2022
4363c91
compute CC security using implied provenWeight
Mar 13, 2022
3ee4616
create a log2 appr func
Mar 15, 2022
6f4de56
fix stateproof message issues.
Mar 15, 2022
92ce531
remove proven weight form the coin hash
Mar 16, 2022
a21f7b7
fix cc test
Mar 17, 2022
f8168fe
use reject sampling in coin hash.
Mar 17, 2022
0afd674
use logarithmic approximation
Mar 27, 2022
b548344
refactoring
Mar 28, 2022
27c4e11
builder uses same appox function
Mar 31, 2022
b4c9be4
comments and doc
Mar 31, 2022
4ce22b6
handle negative value in number of reveals equation
Apr 4, 2022
40a9de2
add lnProvenWe to coinhash
Apr 10, 2022
2f275f3
fixed hash representation for coinhash
Apr 10, 2022
c76184b
fix CC benchmark
Apr 10, 2022
ac4df71
refactor
Apr 10, 2022
8911552
remove old numberofreveals code
Apr 10, 2022
593b62f
change secKQ to 256
Apr 11, 2022
e794180
fix CRs
Apr 12, 2022
c13ce05
CR fixes + rename
Apr 13, 2022
106e6f4
more CR fix
Apr 14, 2022
a3507ad
refactor the trusted params on the verifer.
Apr 14, 2022
3789b44
more refactoring
Apr 17, 2022
ec0543c
fix flaky test
Apr 17, 2022
6e35aad
remove Param structure
Apr 17, 2022
867d2cc
more fixes
Apr 17, 2022
cffa28a
update falcon lib + use byte as salt version
Apr 19, 2022
dd70755
add coinhash kat generator
Apr 20, 2022
485b44d
fix some CR comments
Apr 26, 2022
2cea300
clear out some documentation
Apr 27, 2022
2f03f65
Apply suggestions from code review
id-ms Apr 27, 2022
b566381
fix comments
Apr 28, 2022
ab2a2ff
refactor rejection sampling
Apr 28, 2022
112e5e7
CR fix
May 1, 2022
b7f38d9
refactoring
May 1, 2022
25a33d3
fix comments
May 3, 2022
30ee541
reduce the bytes allocated for stateproof message
May 3, 2022
ed9f141
Apply suggestions from code review
id-ms May 4, 2022
5ae415b
fix test since stateproof message hash was reduce
May 4, 2022
32a8164
fix CR comments
May 8, 2022
9c6a06a
more refactoring
May 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Shant Karakashian <55754073+algonautshant@users.noreply.github.com>
  • Loading branch information
2 people authored and algoidan committed Apr 27, 2022
commit 2f03f65646cce8f502ae7d9b82196855f4ae0381
2 changes: 2 additions & 0 deletions crypto/compactcert/weights.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ func numReveals(signedWeight uint64, lnProvenWeight uint64, strengthTarget uint6
// numReveals > = ((strengthTarget) * T * y / (x + (w - P) * y))
id-ms marked this conversation as resolved.
Show resolved Hide resolved
y, x, w := getSubExpressions(signedWeight)

id-ms marked this conversation as resolved.
Show resolved Hide resolved
// numerator = strengthTarget * ln2IntApproximation * y
numerator := bigInt(strengthTarget)
numerator.Mul(numerator, bigInt(ln2IntApproximation)).
Mul(numerator, y)

id-ms marked this conversation as resolved.
Show resolved Hide resolved
// denom = x + (w - lnProvenWeight) * y
denom := w
denom.Sub(denom, bigInt(lnProvenWeight)).
Mul(denom, y).
Expand Down