Updating to 0.2
Version 0.2 is the first breaking release of qFALL since its publication on crates.io.
Its most important change is invisible in most code: qfall-math moved from FLINT 2.8 to FLINT 3.6.
Beyond that, the release adds reproducible (seeded) sampling, several convenience functions, a prototype of ML-DSA, and fixes a few bugs.
The following chapters cover the release in detail:
- New Features lists everything that was added to
qfall-math,qfall-tools, andqfall-schemes. - Bug Fixes lists the fixed bugs, including fixes that change the output of existing functions.
- How to Transition explains step by step how to move your project from version
0.1to0.2.
Main Novelties
- FLINT 3.6 via
flint3-sysreplaces FLINT 2.8 viaflint-sys. - Seeded sampling: every sampling function has a
_seededvariant that takes a 256-bit seed and produces reproducible output. - Negation via the unary
-operator for all integer, rational, and residue class types. - New functions:
hamming_weight,norm_euclfor polynomials,get_representative_least_absolute_residuefor all residue class types, andchange_modulus/change_qto switch the modulus of an existing value. - ML-DSA: a prototype of the signature scheme behind FIPS 204 in
qfall-schemes.
Do I Need to Change My Code?
Most projects that only use the safe API of qFALL need nothing but a version bump, a call to cargo clean, and a newer Rust toolchain.
The table below tells you which parts of the transition guide are relevant for you.
| If your project… | then you need to… | Details |
|---|---|---|
| uses any qFALL crate | update all qFALL crates to 0.2 and Rust to 1.88 or newer | Updating Dependencies |
| builds in CI or Docker images | remove existing cache and check the build requirements | Building FLINT 3 |
uses unsafe getters/setters like get_fmpz or calls FLINT directly | switch from flint-sys to flint3-sys and adapt to FLINT 3 | Migrating Direct FLINT Usage |
uses Zq::get_representative_least_absolute_residue | check whether you rely on a non-negative result | Behavior Changes |
initializes samplers from qfall_math::utils::sample directly | add the new seed parameter | Changed Signatures |
uses MatZq::sample_discrete_gauss or MatZq::sample_binomial(_with_offset) | remove workarounds for unreduced entries | Behavior Changes |
compares Debug output | update the expected strings | Behavior Changes |