Skip to content

Commit

Permalink
Fix failure in generic serialize module
Browse files Browse the repository at this point in the history
  • Loading branch information
mamonet committed Nov 12, 2024
1 parent ae7ab07 commit 22dc07b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ val compress_then_serialize_ring_element_v
(requires
Spec.MLKEM.is_rank v_K /\
v_COMPRESSION_FACTOR == Spec.MLKEM.v_VECTOR_V_COMPRESSION_FACTOR v_K /\
Seq.length out == v v_OUT_LEN /\ coefficients_field_modulus_range re)
Seq.length out == v v_OUT_LEN /\ v v_OUT_LEN == 32 * v v_COMPRESSION_FACTOR /\
coefficients_field_modulus_range re)
(ensures
fun out_future ->
let out_future:t_Slice u8 = out_future in
Expand Down
3 changes: 2 additions & 1 deletion libcrux-ml-kem/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ fn compress_then_serialize_5<Vector: Operations>(
#[hax_lib::fstar::verification_status(panic_free)]
#[hax_lib::requires(fstar!("Spec.MLKEM.is_rank v_K /\\
$COMPRESSION_FACTOR == Spec.MLKEM.v_VECTOR_V_COMPRESSION_FACTOR v_K /\\
Seq.length $out == v $OUT_LEN /\\ coefficients_field_modulus_range $re"))]
Seq.length $out == v $OUT_LEN /\\ v $OUT_LEN == 32 * v $COMPRESSION_FACTOR /\\
coefficients_field_modulus_range $re"))]
#[hax_lib::ensures(|_|
fstar!("${out_future.len()} == ${out.len()} /\\
${out}_future == Spec.MLKEM.compress_then_encode_v #v_K
Expand Down

0 comments on commit 22dc07b

Please sign in to comment.