mldsa-native
mldsa-native copied to clipboard
Port: Hoist default C backend into separate functions
-
Resolves: #732
-
Purpose: This porting aims to separate the native backend functions into two distinct sets:
- Fallback C backend functions
- Native backend functions
This work is based on the runtime-dispatch changes introduced in PR #607.
-
Steps:
- For each function improved by runtime dispatch in PR #607.:
- Separate a additional fallback C backend function from the original implementation.
- Add a CBMC proof for the C backend function.
- Update the existing original implementation's CBMC
USE_FUNCTION_CONTRACTSwith the C backend function.
- For each function improved by runtime dispatch in PR #607.:
-
Tests:
- Run all test scripts with all argument variations under both static ON and static OFF configurations.
- Run all examples:
tests examples. - Run all relevant CBMC proofs for each modified or newly added function.
-
The following functions will be updated:
| Original | Native | C backend |
|---|---|---|
mld_poly_ntt |
mld_ntt_native |
mld_poly_ntt_c |
mld_poly_invntt_tomont |
mld_intt_native |
mld_poly_invntt_tomont_c |
mld_polymat_permute_bitrev_to_custom |
mld_poly_permute_bitrev_to_custom |
((void)mat);/* Nothing to do */ |
mld_rej_uniform |
mld_rej_uniform_native |
mld_rej_uniform_c |
mld_rej_eta |
mld_rej_uniform_eta2_nativemld_rej_uniform_eta4_native |
mld_rej_eta_c |
| mld_poly_decompose | mld_poly_decompose_32_nativemld_poly_decompose_88_native |
mld_poly_decompose_c |
| mld_poly_caddq | mld_poly_caddq_native |
mld_poly_caddq_c |
mld_poly_use_hint |
mld_poly_use_hint_32_nativemld_poly_use_hint_88_native |
mld_poly_use_hint_c |
mld_poly_chknorm |
mld_poly_chknorm_native |
mld_poly_chknorm_c |
mld_polyz_unpack |
mld_polyz_unpack_17_nativemld_polyz_unpack_19_native |
mld_polyz_unpack_c |
mld_poly_pointwise_montgomery |
mld_poly_pointwise_montgomery_native |
mld_poly_pointwise_montgomery_c |
mld_polyvecl_pointwise_acc_montgomery |
mld_polyvecl_pointwise_acc_montgomery_l4_nativemld_polyvecl_pointwise_acc_montgomery_l5_nativemld_polyvecl_pointwise_acc_montgomery_l7_native |
mld_polyvecl_pointwise_acc_montgomery_c |
mld_keccakf1600_permute |
mld_keccak_f1600_x1_native |
mld_keccakf1600_permute_c |
mld_keccakf1600x4_permute |
mld_keccak_f1600_x2_v84a_asm * 2mld_keccak_f1600_x4_scalar_v8a_hybrid_asm mld_keccak_f1600_x4_scalar_v8a_v84a_hybrid_asm |
mld_keccakf1600_permute * 4 |