Skip to content

Conversation

@erabinov
Copy link
Contributor

The function unzip_and_prefix_sums calls .last().unwrap() on an iterator that is not checked to be non-empty. This PR adds a verifier check before the call to unzip_and_prefix_sums to make sure that the iterator in unzip_and_prefix_sums is non-empty.

Copy link
Contributor

@tamirhemo tamirhemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link
Contributor

Test Old New Diff
bls12_381_tests_test_bls_double_100 6402021 6402021 0.0000 %
curve25519_dalek_test_decompressed_expected_value 4423016 4503209 1.8131 %
k256_test_recover_high_hash_high_recid 1763250 2233713 26.6816 %
p256_test_recover_high_hash_high_recid 6231001 5796453 -6.9740 %
secp256k1_program_test_verify_v0_30_0_rand_lte_100 17073461 17041362 -0.1880 %
k256_test_recover_pubkey_infinity 97611 97611 0.0000 %
bls12_381_tests_test_inverse_fp2_100 2763953 2763953 0.0000 %
p256_test_recover_rand_lte_100 15901743 15915299 0.0852 %
secp256k1_program_test_verify_rand_lte_100 17080665 17085168 0.0264 %
rust_crypto_rsa_test_pkcs_verify_100 28950595 28920515 -0.1039 %
k256_test_schnorr_verify 5676262 5678090 0.0322 %
k256_test_recover_rand_lte_100 4421565 4413237 -0.1883 %
curve25519_dalek_test_zero_mul 71794 71794 0.0000 %
bls12_381_tests_test_sqrt_fp_100 918781 930984 1.3282 %
bls12_381_tests_test_sqrt_fp2_100 1869818 1657574 -11.3511 %
bls12_381_tests_test_bls_add_100 10573008 10573008 0.0000 %
curve25519_dalek_test_add_then_multiply 2732857 2966478 8.5486 %
sha_test_sha3_expected_digest_lte_100_times 1608856 1609012 0.0097 %
bn_test_bn_test_fq_inverse_100 834612 834612 0.0000 %
curve25519_dalek_ng_test_add_then_multiply 4266528 5012912 17.4939 %
sha_test_sha2_v0_10_9_expected_digest_lte_100_times 1765922 1769175 0.1842 %
p256_test_recover_pubkey_infinity 101631 101631 0.0000 %
p256_test_verify_rand_lte_100 11884151 11863144 -0.1768 %
bn_test_bn_test_fr_inverse_100 851612 851612 0.0000 %
curve25519_dalek_ng_test_zero_mul 107777 107777 0.0000 %
rustcrypto_bigint_test_bigint_mul_add_residue 1736233 1736239 0.0003 %
rustcrypto_bigint_test_bigint_mul_mod_special 1753658 1753658 0.0000 %
bn_test_bn_test_g1_double_100 728595 728595 0.0000 %
sha_test_sha2_v0_10_8_expected_digest_lte_100_times 1766023 1768074 0.1161 %
k256_test_verify_rand_lte_100 11880393 11869426 -0.0923 %
curve25519_dalek_ng_test_zero_msm 125373 125373 0.0000 %
bls12_381_tests_test_inverse_fp_100 1434158 1434158 0.0000 %
secp256k1_program_test_recover_v0_30_0_rand_lte_100 5452086 5442958 -0.1674 %
curve25519_dalek_ng_test_decompressed_noncanonical 195589 195589 0.0000 %
curve25519_dalek_test_ed25519_verify 13267400 13271181 0.0285 %
curve25519_dalek_test_zero_msm 83451 83451 0.0000 %
keccack_test_expected_digest_lte_100 1714510 1716098 0.0926 %
secp256k1_program_test_recover_rand_lte_100 5466906 5448859 -0.3301 %
curve25519_dalek_test_decompressed_noncanonical 7659 7659 0.0000 %
sha_test_sha2_v0_10_6_expected_digest_lte_100_times 1766580 1766532 -0.0027 %
bn_test_bn_test_g1_add_100 986109 986109 0.0000 %
sha_test_sha2_v0_9_9_expected_digest_lte_100_times 1259802 1262518 0.2156 %
bn_test_bn_test_fq_sqrt_100 833012 833012 0.0000 %

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants