Skip to content

Commit

Permalink
Refresh with latest eurydice/kyber-crate
Browse files Browse the repository at this point in the history
  • Loading branch information
msprotz committed Feb 15, 2024
1 parent ea5510b commit c6bf1a5
Show file tree
Hide file tree
Showing 12 changed files with 3,062 additions and 4,081 deletions.
14 changes: 4 additions & 10 deletions libcrux/include/Eurydice.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /Users/franziskus/repos/eurydice//eurydice ../libcrux_kyber.llbc
F* version: d0aa54cf
KaRaMeL version: 0eda808b
KaRaMeL invocation: eurydice ../libcrux_kyber.llbc --config config.yaml
F* version: 58c915a8
KaRaMeL version: 56c5c145
*/

#ifndef __Eurydice_H
#define __Eurydice_H

#include "core.h"
#include "eurydice_glue.h"

typedef struct core_ops_range_Range__size_t_s
{
size_t start;
size_t end;
}
core_ops_range_Range__size_t;

extern uint8_t Eurydice_bitand_pv_u8(uint8_t *x, uint8_t y);

extern uint8_t Eurydice_shr_pv_u8(uint8_t *x, int32_t y);
Expand Down
27 changes: 27 additions & 0 deletions libcrux/include/core.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: eurydice ../libcrux_kyber.llbc --config config.yaml
F* version: 58c915a8
KaRaMeL version: 56c5c145
*/

#ifndef __core_H
#define __core_H

#include "eurydice_glue.h"

#define core_option_None 0
#define core_option_Some 1

typedef uint8_t core_option_Option__size_t_tags;

typedef struct core_ops_range_Range__size_t_s
{
size_t start;
size_t end;
}
core_ops_range_Range__size_t;


#define __core_H_DEFINED
#endif
12 changes: 4 additions & 8 deletions libcrux/include/internal/core.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: /Users/franziskus/repos/eurydice//eurydice ../libcrux_kyber.llbc
F* version: d0aa54cf
KaRaMeL version: 0eda808b
KaRaMeL invocation: eurydice ../libcrux_kyber.llbc --config config.yaml
F* version: 58c915a8
KaRaMeL version: 56c5c145
*/

#ifndef __internal_core_H
#define __internal_core_H

#include "../core.h"
#include "eurydice_glue.h"

static inline int64_t core_convert_num__i64_59__from(int32_t x0);

#define core_option_None 0
#define core_option_Some 1

typedef uint8_t core_option_Option__size_t_tags;

typedef struct core_option_Option__size_t_s
{
core_option_Option__size_t_tags tag;
Expand Down
45 changes: 45 additions & 0 deletions libcrux/include/internal/libcrux_kyber.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: eurydice ../libcrux_kyber.llbc --config config.yaml
F* version: 58c915a8
KaRaMeL version: 56c5c145
*/

#ifndef __internal_libcrux_kyber_H
#define __internal_libcrux_kyber_H

#include "internal/core.h"
#include "../libcrux_kyber.h"
#include "eurydice_glue.h"

typedef struct core_ops_range_Range__uint32_t_s
{
uint32_t start;
uint32_t end;
}
core_ops_range_Range__uint32_t;

typedef struct core_ops_range_Range__int32_t_s
{
int32_t start;
int32_t end;
}
core_ops_range_Range__int32_t;

typedef struct core_option_Option__Eurydice_slice_uint8_t_s
{
core_option_Option__size_t_tags tag;
Eurydice_slice f0;
}
core_option_Option__Eurydice_slice_uint8_t;

typedef struct K___Eurydice_slice_uint8_t_Eurydice_slice_uint8_t_s
{
Eurydice_slice fst;
Eurydice_slice snd;
}
K___Eurydice_slice_uint8_t_Eurydice_slice_uint8_t;


#define __internal_libcrux_kyber_H_DEFINED
#endif
27 changes: 27 additions & 0 deletions libcrux/include/libcrux_digest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
This file was generated by KaRaMeL <https://github.com/FStarLang/karamel>
KaRaMeL invocation: eurydice ../libcrux_kyber.llbc --config config.yaml
F* version: 58c915a8
KaRaMeL version: 56c5c145
*/

#ifndef __libcrux_digest_H
#define __libcrux_digest_H

#include "eurydice_glue.h"

extern void libcrux_digest_sha3_512(Eurydice_slice x0, uint8_t x1[64U]);

extern void libcrux_digest_sha3_256(Eurydice_slice x0, uint8_t x1[32U]);

#define libcrux_digest_shake256(x_0, x_1, x_2, _ret_t) libcrux_digest_shake256_(x_0, x_1, x_2)

extern void libcrux_digest_shake256_(size_t x0, Eurydice_slice x1, uint8_t *x2);

#define libcrux_digest_shake128(x_0, x_1, x_2, _ret_t) libcrux_digest_shake128_(x_0, x_1, x_2)

extern void libcrux_digest_shake128_(size_t x0, Eurydice_slice x1, uint8_t *x2);


#define __libcrux_digest_H_DEFINED
#endif
24 changes: 2 additions & 22 deletions libcrux/include/libcrux_hacl_glue.h
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
#pragma once

#include "eurydice_glue.h"
#include "libcrux_kyber.h"

typedef struct
__uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t__s
{
uint8_t fst[840U];
uint8_t snd[840U];
uint8_t thd[840U];
uint8_t f3[840U];
} __uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t_;

extern void
libcrux_digest_shake256f(size_t len, Eurydice_slice input, uint8_t* out);

#define libcrux_digest_shake256(len, input, out, _) \
libcrux_digest_shake256f(len, input, out)

extern void
libcrux_digest_shake128f(size_t len, Eurydice_slice input, uint8_t* out);

#define libcrux_digest_shake128(len, input, out, _) \
libcrux_digest_shake128f(len, input, out)

extern __uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t_
extern K___uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t__uint8_t_840size_t_
libcrux_digest_shake128x4f(size_t len,
Eurydice_slice input0,
Eurydice_slice input1,
Expand Down
Loading

0 comments on commit c6bf1a5

Please sign in to comment.