33 Commits

Author SHA1 Message Date
greg7mdp 6563ea9c98 Update for new version of bls library with change in to/fromBytes params. 2024-04-02 20:30:08 -04:00
Lin Huang 6a9a8b1d24 use std::array instead of std::vector to simply conversion to eosio::chain::span 2023-11-16 10:38:13 -05:00
Lin Huang c39e930491 remove _mont* functions 2023-11-16 09:59:34 -05:00
Lin Huang 65b54ab2ee resolve merge conflicts 2023-11-16 09:29:43 -05:00
Lin Huang 36eafc73c7 Merge remote-tracking branch 'origin/yarkin/update_bls' into more_bls_benchmark 2023-11-16 09:28:18 -05:00
yarkin d9e59b8d62 Delete unused benchmark. 2023-11-16 13:38:27 +08:00
Lin Huang f280d5ee16 add const& to std::string parameters in all _impl methods 2023-11-15 13:29:19 -05:00
Lin Huang 8819030169 fix weighted sum montgomery form flag 2023-11-15 12:12:03 -05:00
Lin Huang 2a85796cd9 add benchmarking for Montgomery form host functions 2023-11-14 20:43:51 -05:00
yarkin 4e40590d66 Fix benchmark 2023-11-14 22:14:41 +08:00
Lin Huang a96d6dea49 improve and add more comments 2023-11-09 18:19:27 -05:00
Lin Huang f54724fb29 revert benchmarked function specific limit of number of runs changes, as they are not needed 2023-11-09 17:22:08 -05:00
Lin Huang a53e6fc929 set max block and transaction cpu to 999'999'999 such that expensive functions will never reach deadline 2023-11-09 16:58:23 -05:00
Lin Huang ec1e594c7c remove little used control as a member of interface_in_benchmark, use chain->control.get() directly instead 2023-11-09 16:43:36 -05:00
Lin Huang 4b65a4f14f use a single eosio::benchmark for BLS while still being a friend of eosio::chain::transaction_context 2023-11-09 16:22:19 -05:00
Lin Huang 181d242590 print number of runs right aligned since now the numbers can be different between benchmarked functions 2023-11-09 14:08:04 -05:00
Lin Huang 63b90eb908 benchmark bls_g1_map, bls_g2_map, and bls_fp_mod 2023-11-09 12:38:58 -05:00
Lin Huang b2e214dc3b benchmark bls_pairing, bls_g1_exp, bls_g2_exp 2023-11-09 12:24:22 -05:00
Lin Huang 6f3b7debda support benchmarked function specific limit of number of runs 2023-11-09 11:34:13 -05:00
Lin Huang be7dcc0866 benchmark bls_g1_add, bls_g2_add, bls_g1_mul, bls_g2_mul 2023-11-09 10:47:06 -05:00
Lin Huang c2951f3747 plumbing a webassembly::interface object for benchmarking BLS host functions directly 2023-11-09 10:21:51 -05:00
Matt Witherspoon d3275c209f check that MSB of modulus is not 0
otherwise B<M case may not be true by setting MSB of base to 0
2023-09-13 22:13:42 -04:00
Matt Witherspoon aee9599ebf add some additional test cases in modexp benchmark 2023-09-13 16:27:14 -04:00
Huang-Ming Huang 2e09a536be update bn256 and tester dependency 2022-12-02 14:01:33 -06:00
Huang-Ming Huang f1142ffb6d address PR comments 2022-11-11 15:44:22 -06:00
Huang-Ming Huang e3b10cbec2 replace benchmark alt_bn128 2022-10-31 15:29:53 -05:00
Lin Huang 61e130be8a blake2_benchmarking: correct the feature name from black2 to blake2 2022-08-21 12:24:32 -04:00
Lin Huang 1e51b6c2e0 benchmarking: add blake2 and remove unnecesary include header files 2022-08-21 11:30:15 -04:00
Lin Huang 1fe04d3288 hash benchmarking: add sha1, sha256, sha512, and ripemd160 2022-08-21 10:53:51 -04:00
Lin Huang cbe5cfbd8f k1 siging benchmarking: do not benchmark canonical case 2022-08-21 10:42:59 -04:00
Lin Huang 254d69702d benchmarking: make private key of k1 signing fixed
private key of k1 was randomly generated. It caused big swing in time with canonical
requirement. This commit makes the private key fixed and benchmarks both canonical
and non-canonical cases
2022-08-18 10:19:50 -04:00
Lin Huang 52bce935da benchmark: change printt_header to print_header 2022-08-17 18:10:21 -04:00
Lin Huang 1b1a467f87 Create a benchmarking framework and use it to benchmark crypto primitives
Create a generic micro-benchmarking framework intended for any functions.
As the first application, alt_bn_128 adding/multiplying/pairing, sha3-256/keccak256
hashing, k1/r1/webauthn key signing/recovering, and modexp are benchmarked
2022-08-17 17:32:38 -04:00