Bug Fixes in 0.2
This chapter lists all bugs of the 0.1 releases that are fixed in 0.2.
Fixes marked with behavior change change the output of a function without changing its signature.
The compiler will not point you to them, so check your code for these functions.
qFALL-math
- Behavior change:
Zq::get_representative_least_absolute_residuereturned the absolute value of the least absolute residue instead of the residue itself. For example,15 mod 17was mapped to2instead of-2. The function now returns values in[-⌊q/2⌋, ⌊q/2⌋]as documented. - Behavior change:
MatZq::sample_discrete_gauss,MatZq::sample_binomial, andMatZq::sample_binomial_with_offsetdid not reduce the sampled values moduloqbefore storing them. For example,MatZq::sample_discrete_gauss(1, 1, 3, 0, 15.0)could return[[-1]] mod 3or[[5]] mod 3. Such matrices printed, compared, and computed with values outside of[0, q), which could lead to wrong results in subsequent operations. All entries are now reduced to[0, q). MatZq::cloneleaked the memory of the entries of the freshly allocated matrix, as the clone re-initialized them instead of overwriting them. This issue is fixed by clearing the allocated memory before cloning the entries.PolyOverZq::cloneconverted the polynomial into a string and parsed it again. Now, it copies the FLINT structure directly and avoids this costly detour.qfall-math 0.1.0failed to compile oncerand 0.10was released, as it requiredrand = "0".qfall-math 0.1.1adapted to the breaking changes ofrand 0.10, and0.2requires specific minor versions of all its dependencies due to further breaks of SemVer rules from dependencies.
qFALL-tools
qfall-tools 0.1.0requiredqfall-math = "0",sha2 = "0", andtypetag = "0", i.e. any0.xversion. New releases of these dependencies with breaking changes could therefore break the build.qfall-tools 0.2requiresqfall-math = "0.2",sha2 = "0.11", andtypetag = "0.2"to protect against breaking changes of these crates.
qFALL-schemes
qfall-schemes 0.1.0failed to build with recent releases ofsha2, as the computed hash no longer implemented hexadecimal formatting via{:x}. The SHA-256 based hash functions inqfall_schemes::hashassemble the hex string manually since0.1.1. The output is unchanged.- Like
qfall-tools, the crate pins the minor versions of all its dependencies since0.2.