296 Commits

Author SHA1 Message Date
Dmitry Vagner
b89e668b55 minor 2023-02-17 13:32:20 -08:00
Dmitry Vagner
e8865130de put extract in interpreter 2023-02-16 20:00:39 -08:00
Dmitry Vagner
63f1fbfaea fmt 2023-02-16 19:45:33 -08:00
Dmitry Vagner
be35111034 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-02-16 19:31:16 -08:00
Dmitry Vagner
ea9846debf format 2023-02-16 17:01:43 -08:00
Dmitry Vagner
da7a8879c4 make hash functions take a location pointer 2023-02-16 16:59:51 -08:00
Dmitry Vagner
4e4cfb06b3 function API / remove redundancy 2023-02-16 15:01:22 -08:00
Dmitry Vagner
53ab0ada11 remove blake storage 2023-02-15 19:11:22 -08:00
Dmitry Vagner
77a7af76c2 remove sha2 storage 2023-02-15 19:00:52 -08:00
Dmitry Vagner
abc762f7b4 cleaner arithmetic 2023-02-15 18:50:26 -08:00
Dmitry Vagner
731c29c43b abstract 2023-02-15 18:47:33 -08:00
Dmitry Vagner
c6cf1dc56a remove custom 2023-02-15 18:26:05 -08:00
Dmitry Vagner
bce867188c simplify ripe md test 2023-02-15 18:18:26 -08:00
Dmitry Vagner
80e49caae1 segment virts 2023-02-13 14:04:43 -08:00
Dmitry Vagner
d320fbfbca update curve add with ops 2023-02-13 13:21:47 -08:00
Dmitry Vagner
787cc8903b change segment 2023-02-13 12:32:40 -08:00
Dmitry Vagner
2158c1d267 merge 2023-02-13 11:31:08 -08:00
wborgeaud
ac40bd5f5d
Optimize ecMul precompile (scalar multiplication on BN254) (#852)
* windowed mul

* Working

* Window of 4 bits

* Fix

* Comments

* Unroll loop

* Unroll loop

* remove global

* Minor

* Minor

* Implement `CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY` in interpreter

* Minor

* Doesn't work

* Minor

* Minor

* wnaf msm

* Working hardcoded values: 28657 opcodes

* Working wnaf

* Small wnaf optim

* Precompute works

* Working together

* Bump to 129 bits

* Working glv decomposition

* Working MSM with GLV

* Almost working

* Working

* ECC test folder

* Working with real sig data

* Fix tests + Clippy

* Minor

* Cleaning

* Comments

* Cleaning

* Smaller glv test file

* Print opcode count at the end of interpreter run

* More constants

* Add z3 proof that the GLV scalars are 129-bit or less

* Minor change to z3 proof

* Move files and renaming fns

* Testing

* Fix BN GLV

* BN precompute table

* Working precompute

* Working bn tests

* Working

* Minor

* Minor

* Use MULFP254

* Minor

* Merge conflicts

* Remove unused asm file

* ECC fns renaming (#874)

* PR feedback
2023-02-13 20:11:32 +01:00
Dmitry Vagner
361d6d7262 tests and stacks 2023-02-07 18:53:58 -08:00
Dmitry Vagner
69afed9297 refactor 2023-02-07 14:54:07 -08:00
Dmitry Vagner
57146c83bc miller loop test 2023-02-07 09:18:49 -08:00
Dmitry Vagner
61ac0eff46 fmt 2023-02-05 17:40:45 -08:00
Dmitry Vagner
0f030fae4a naming for global labels 2023-02-05 17:40:04 -08:00
Dmitry Vagner
e1dca8703c name 2023-02-01 19:19:36 -08:00
Dmitry Vagner
962754be99 rand impl 2023-02-01 19:15:56 -08:00
Dmitry Vagner
cd5c92b574 merge 2023-02-01 08:51:42 -08:00
wborgeaud
ca002aeafa
Optimize ecrecover ASM (#840)
* windowed mul

* Working

* Window of 4 bits

* Fix

* Comments

* Unroll loop

* Unroll loop

* remove global

* Minor

* Minor

* Implement `CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY` in interpreter

* Minor

* Doesn't work

* Minor

* Minor

* wnaf msm

* Working hardcoded values: 28657 opcodes

* Working wnaf

* Small wnaf optim

* Precompute works

* Working together

* Bump to 129 bits

* Working glv decomposition

* Working MSM with GLV

* Almost working

* Working

* ECC test folder

* Working with real sig data

* Fix tests + Clippy

* Minor

* Cleaning

* Comments

* Cleaning

* Smaller glv test file

* Print opcode count at the end of interpreter run

* More constants

* Add z3 proof that the GLV scalars are 129-bit or less

* Minor change to z3 proof

* Minor

* Hamish's suggestion

* Working

* Cleaning

* Clippy

* PR feedback

* Minor PR feedback
2023-01-31 19:23:54 +01:00
Daniel Lubarov
137bc78565 Prep for publishing to crates.io 2023-01-30 13:18:06 -08:00
Dmitry Vagner
6958d46c56 names and comments 2023-01-25 16:26:41 +07:00
Dmitry Vagner
b46af11f3a move consts 2023-01-25 16:10:53 +07:00
Dmitry Vagner
c9b005d22e new power works 2023-01-24 17:08:29 +07:00
Dmitry Vagner
60cbdde879 clean 2023-01-24 14:56:15 +07:00
Dmitry Vagner
8ca6ba7bde clean 2023-01-24 09:43:47 +07:00
Dmitry Vagner
c13cf97237 tate test 2023-01-24 09:42:42 +07:00
Dmitry Vagner
75c5938c49 rewrite w methods 2023-01-24 00:01:47 +07:00
Dmitry Vagner
ec4cddb7c9 inv as method 2023-01-23 14:59:08 +07:00
Dmitry Vagner
155e973d06 slight refactor 2023-01-21 13:24:45 +07:00
Dmitry Vagner
d2aa937a2f improved prover input and test api 2023-01-21 13:19:07 +07:00
Dmitry Vagner
922d3ebca8 add module and fix errors 2023-01-20 15:43:17 +07:00
Dmitry Vagner
c74a0c2500 test inv from memory 2023-01-20 14:58:34 +07:00
Dmitry Vagner
abab6bf1e1 test frob from memory 2023-01-20 14:52:44 +07:00
Dmitry Vagner
20fb2cb7d8 read output from memory 2023-01-20 14:30:12 +07:00
Dmitry Vagner
5f2baea0df mul test from memory 2023-01-20 13:59:39 +07:00
Dmitry Vagner
9977ae03bd new inverse 2023-01-18 14:41:09 +07:00
Dmitry Vagner
37ad340774 frob format 2023-01-18 12:56:30 +07:00
Dmitry Vagner
ecde3d13b1 frob tests 2023-01-18 11:10:26 +07:00
Dmitry Vagner
be19cb81e3 struct impl style arithmetic 2023-01-17 23:58:36 +07:00
Dmitry Vagner
31c5db91a5 rename module 2023-01-17 16:11:15 +07:00
Dmitry Vagner
ccd4a38ab4 remove make_stack 2023-01-17 15:57:46 +07:00
Dmitry Vagner
ea8cfc95b0 name 2023-01-13 09:06:51 +04:00