You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current implementation of the Zq struct in zq.rs, the struct is defined as:
pubstructZq{value:u32,}
This design presents two significant limitations:
The struct does not store the modulo value and implicitly assumes a modulo of $2^{32}$.
In the aggregation of Falcon signatures with LaBRADOR, a larger bit size for value is necessary. For instance, for Falcon-512 when aggregating $N$ signatures, $41 + log_2(N)$ bits are needed (Aggregating Falcon Signatures with LaBRADOR, Section 6.2, page 23).
Proposed Solution
To address these issues, I propose the following enhancements:
Modify the 'Zq' struct to use a 'u64' value.
Store the modulus with a const generic parameter.
A possible implementation is:
pubstructMod<constQ:u64>{value:u64,}impl<constQ:u64>Mod<Q>{pubfnnew(v:u64) -> Self{Self{value: v % Q}}}typeF = Mod<10>;let a = F::new(9);let b = F::new(2);let c = a + b;// c = 1
All arithmetic operations defined for Zq (addition, multiplication, etc.) will need to be updated accordingly.
Problem
In the current implementation of the
Zqstruct inzq.rs, the struct is defined as:This design presents two significant limitations:
The struct does not store the modulo value and implicitly assumes a modulo of$2^{32}$ .
In the aggregation of Falcon signatures with LaBRADOR, a larger bit size for value is necessary. For instance, for Falcon-512 when aggregating$N$ signatures, $41 + log_2(N)$ bits are needed (Aggregating Falcon Signatures with LaBRADOR, Section 6.2, page 23).
Proposed Solution
To address these issues, I propose the following enhancements:
A possible implementation is:
All arithmetic operations defined for Zq (addition, multiplication, etc.) will need to be updated accordingly.