Stop adding one to secrets_len

This commit is contained in:
Ramana Kumar 2022-09-15 13:33:17 +01:00
parent fa80d94168
commit f2f20141db
No known key found for this signature in database
GPG Key ID: ED471C788B900433
2 changed files with 5 additions and 5 deletions

View File

@ -485,7 +485,7 @@ void fk_single(void) {
FFTSettings fs;
KZGSettings ks;
FK20SingleSettings fk;
uint64_t secrets_len = n_len + 1;
uint64_t secrets_len = n_len;
g1_t s1[secrets_len];
g2_t s2[secrets_len];
poly p;
@ -558,7 +558,7 @@ void fk_single_strided(void) {
FFTSettings fs;
KZGSettings ks;
FK20SingleSettings fk;
uint64_t secrets_len = n_len + 1;
uint64_t secrets_len = n_len;
g1_t s1[secrets_len];
g2_t s2[secrets_len];
poly p;
@ -606,7 +606,7 @@ void fk_multi_settings(void) {
KZGSettings ks;
FK20MultiSettings fk;
uint64_t n = 5;
uint64_t secrets_len = 33;
uint64_t secrets_len = 32;
g1_t s1[secrets_len];
g2_t s2[secrets_len];

View File

@ -248,7 +248,7 @@ void proof_single(void) {
// Our polynomial: degree 15, 16 coefficients
uint64_t coeffs[] = {1, 2, 3, 4, 7, 7, 7, 7, 13, 13, 13, 13, 13, 13, 13, 13};
int poly_len = sizeof coeffs / sizeof coeffs[0];
uint64_t secrets_len = poly_len + 1;
uint64_t secrets_len = poly_len;
FFTSettings fs;
KZGSettings ks;
@ -307,7 +307,7 @@ void proof_multi(void) {
int coset_scale = 3, coset_len = (1 << coset_scale);
fr_t y[coset_len];
uint64_t secrets_len = poly_len > coset_len ? poly_len + 1 : coset_len + 1;
uint64_t secrets_len = poly_len > coset_len ? poly_len : coset_len;
g1_t s1[secrets_len];
g2_t s2[secrets_len];