Skip to content

Commit

Permalink
refreshed C code, after merging properly and bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikbhargavan committed Jul 1, 2024
1 parent 69e8c73 commit f6b0243
Show file tree
Hide file tree
Showing 34 changed files with 566 additions and 732 deletions.
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/code_gen.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This code was generated with the following tools:
Charon: 23f20c184e51015582b7918ea4f1eb063b28daba
Eurydice: 30fdb50add4dabaee90051878c166bac8c5ac26a
Charon: aeeae1d46704810bf498db552a75dff15aa3abcc
Eurydice: ffeb01ce4cf0646e5cadec836bc042f98b8a16a8
Karamel: 42a431696cd32d41155d7e484720eb71fd5dc7b1
F*: a32b316e521fa4f239b610ec8f1d15e78d62cbe8-dirty
F*: f09228ef9a64ac4ef383ee0e10656ccb612db2ee
4 changes: 2 additions & 2 deletions libcrux-ml-kem/c/internal/libcrux_core.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: f09228ef KaRaMeL
version: 42a43169
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __internal_libcrux_core_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/internal/libcrux_mlkem_avx2.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __internal_libcrux_mlkem_avx2_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/internal/libcrux_mlkem_portable.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __internal_libcrux_mlkem_portable_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/internal/libcrux_sha3_avx2.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __internal_libcrux_sha3_avx2_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/internal/libcrux_sha3_internal.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __internal_libcrux_sha3_internal_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_core.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#include "internal/libcrux_core.h"
Expand Down
10 changes: 5 additions & 5 deletions libcrux-ml-kem/c/libcrux_core.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_core_H
Expand Down Expand Up @@ -128,11 +128,11 @@ typedef struct
#define core_result_Err 1

typedef uint8_t
core_result_Result__uint8_t_24size_t__core_array_TryFromSliceError_tags;
core_result_Result__uint8_t_32size_t__core_array_TryFromSliceError_tags;

typedef struct
core_result_Result__uint8_t_8size_t__core_array_TryFromSliceError_s {
core_result_Result__uint8_t_24size_t__core_array_TryFromSliceError_tags tag;
core_result_Result__uint8_t_32size_t__core_array_TryFromSliceError_tags tag;
union {
uint8_t case_Ok[8U];
core_array_TryFromSliceError case_Err;
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem1024.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem1024_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem1024_avx2.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#include "libcrux_mlkem1024_avx2.h"
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem1024_avx2.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem1024_avx2_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem1024_portable.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#include "libcrux_mlkem1024_portable.h"
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem1024_portable.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem1024_portable_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem512.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem512_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem512_avx2.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#include "libcrux_mlkem512_avx2.h"
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem512_avx2.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem512_avx2_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem512_portable.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#include "libcrux_mlkem512_portable.h"
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem512_portable.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem512_portable_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem768.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem768_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem768_avx2.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#include "libcrux_mlkem768_avx2.h"
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem768_avx2.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem768_avx2_H
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem768_portable.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#include "libcrux_mlkem768_portable.h"
Expand Down
6 changes: 3 additions & 3 deletions libcrux-ml-kem/c/libcrux_mlkem768_portable.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /home/franziskus/eurydice//eurydice --config ../c.yaml
../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F* version: <unknown>
KaRaMeL version: 42a43169
KaRaMeL invocation: /home/karthik/eurydice/eurydice --config ../c.yaml
-funroll-loops 16 ../../libcrux_ml_kem.llbc ../../libcrux_sha3.llbc F*
version: f09228ef KaRaMeL version: 42a43169
*/

#ifndef __libcrux_mlkem768_portable_H
Expand Down
Loading

0 comments on commit f6b0243

Please sign in to comment.