Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kyber: hax: fix extraction #195

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hax-driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def shell(command, expect=0, cwd=None, env={}):
"-C", "-p", "libcrux", "-p", "libcrux-platform", ";",
"into",
"-i",
f"-** +libcrux::kem::kyber::** +libcrux_platform::** {exclude_sha3_implementations} -libcrux::**::types::index_impls::**",
f"-** +libcrux::kem::kyber::** +!libcrux_platform::* {exclude_sha3_implementations} -libcrux::**::types::index_impls::**",
"fstar",
"--interfaces",
"+* -libcrux::kem::kyber::types +!libcrux_platform::**",
Expand Down
10 changes: 5 additions & 5 deletions proofs/fstar/extraction/Libcrux.Digest.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ module Libcrux.Digest
open Core
open FStar.Mul

val shake128x4_256_ (v_LEN: usize) (data0 data1 data2 data3: t_Slice u8)
: Prims.Pure (t_Array u8 v_LEN & t_Array u8 v_LEN & t_Array u8 v_LEN & t_Array u8 v_LEN)
Prims.l_True
(fun _ -> Prims.l_True)

val sha3_256_ (payload: t_Slice u8)
: Prims.Pure (t_Array u8 (sz 32)) Prims.l_True (fun _ -> Prims.l_True)

Expand All @@ -20,11 +25,6 @@ val shake128x4_portable (v_LEN: usize) (data0 data1 data2 data3: t_Slice u8)
Prims.l_True
(fun _ -> Prims.l_True)

val shake128x4_256_ (v_LEN: usize) (data0 data1 data2 data3: t_Slice u8)
: Prims.Pure (t_Array u8 v_LEN & t_Array u8 v_LEN & t_Array u8 v_LEN & t_Array u8 v_LEN)
Prims.l_True
(fun _ -> Prims.l_True)

val shake128x4 (v_LEN: usize) (data0 data1 data2 data3: t_Slice u8)
: Prims.Pure (t_Array u8 v_LEN & t_Array u8 v_LEN & t_Array u8 v_LEN & t_Array u8 v_LEN)
Prims.l_True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let v_XOFx4 (v_K: usize) (input: t_Array (t_Array u8 (sz 34)) v_K) =
Rust_primitives.Hax.repeat (Rust_primitives.Hax.repeat 0uy (sz 840) <: t_Array u8 (sz 840)) v_K
in
let out:t_Array (t_Array u8 (sz 840)) v_K =
if ~.(Libcrux_platform.simd256_support () <: bool) || ~.false
if ~.(Libcrux_platform.simd256_support () <: bool) || ~.true
then
Core.Iter.Traits.Iterator.f_fold (Core.Iter.Traits.Collect.f_into_iter ({
Core.Ops.Range.f_start = sz 0;
Expand Down
Loading