|
| 1 | +#ifndef API_H |
| 2 | +#define API_H |
| 3 | + |
| 4 | +#include <stdint.h> |
| 5 | + |
| 6 | +#define pqcrystals_kyber512_SECRETKEYBYTES 1632 |
| 7 | +#define pqcrystals_kyber512_PUBLICKEYBYTES 800 |
| 8 | +#define pqcrystals_kyber512_CIPHERTEXTBYTES 768 |
| 9 | +#define pqcrystals_kyber512_KEYPAIRCOINBYTES 64 |
| 10 | +#define pqcrystals_kyber512_ENCCOINBYTES 32 |
| 11 | +#define pqcrystals_kyber512_BYTES 32 |
| 12 | + |
| 13 | +#define pqcrystals_kyber512_ref_SECRETKEYBYTES pqcrystals_kyber512_SECRETKEYBYTES |
| 14 | +#define pqcrystals_kyber512_ref_PUBLICKEYBYTES pqcrystals_kyber512_PUBLICKEYBYTES |
| 15 | +#define pqcrystals_kyber512_ref_CIPHERTEXTBYTES pqcrystals_kyber512_CIPHERTEXTBYTES |
| 16 | +#define pqcrystals_kyber512_ref_KEYPAIRCOINBYTES pqcrystals_kyber512_KEYPAIRCOINBYTES |
| 17 | +#define pqcrystals_kyber512_ref_ENCCOINBYTES pqcrystals_kyber512_ENCCOINBYTES |
| 18 | +#define pqcrystals_kyber512_ref_BYTES pqcrystals_kyber512_BYTES |
| 19 | + |
| 20 | +int pqcrystals_kyber512_ref_keypair_derand(uint8_t *pk, uint8_t *sk, const uint8_t *coins); |
| 21 | +int pqcrystals_kyber512_ref_keypair(uint8_t *pk, uint8_t *sk); |
| 22 | +int pqcrystals_kyber512_ref_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins); |
| 23 | +int pqcrystals_kyber512_ref_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk); |
| 24 | +int pqcrystals_kyber512_ref_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk); |
| 25 | + |
| 26 | +#define pqcrystals_kyber768_SECRETKEYBYTES 2400 |
| 27 | +#define pqcrystals_kyber768_PUBLICKEYBYTES 1184 |
| 28 | +#define pqcrystals_kyber768_CIPHERTEXTBYTES 1088 |
| 29 | +#define pqcrystals_kyber768_KEYPAIRCOINBYTES 64 |
| 30 | +#define pqcrystals_kyber768_ENCCOINBYTES 32 |
| 31 | +#define pqcrystals_kyber768_BYTES 32 |
| 32 | + |
| 33 | +#define pqcrystals_kyber768_ref_SECRETKEYBYTES pqcrystals_kyber768_SECRETKEYBYTES |
| 34 | +#define pqcrystals_kyber768_ref_PUBLICKEYBYTES pqcrystals_kyber768_PUBLICKEYBYTES |
| 35 | +#define pqcrystals_kyber768_ref_CIPHERTEXTBYTES pqcrystals_kyber768_CIPHERTEXTBYTES |
| 36 | +#define pqcrystals_kyber768_ref_KEYPAIRCOINBYTES pqcrystals_kyber768_KEYPAIRCOINBYTES |
| 37 | +#define pqcrystals_kyber768_ref_ENCCOINBYTES pqcrystals_kyber768_ENCCOINBYTES |
| 38 | +#define pqcrystals_kyber768_ref_BYTES pqcrystals_kyber768_BYTES |
| 39 | + |
| 40 | +int pqcrystals_kyber768_ref_keypair_derand(uint8_t *pk, uint8_t *sk, const uint8_t *coins); |
| 41 | +int pqcrystals_kyber768_ref_keypair(uint8_t *pk, uint8_t *sk); |
| 42 | +int pqcrystals_kyber768_ref_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins); |
| 43 | +int pqcrystals_kyber768_ref_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk); |
| 44 | +int pqcrystals_kyber768_ref_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk); |
| 45 | + |
| 46 | +#define pqcrystals_kyber1024_SECRETKEYBYTES 3168 |
| 47 | +#define pqcrystals_kyber1024_PUBLICKEYBYTES 1568 |
| 48 | +#define pqcrystals_kyber1024_CIPHERTEXTBYTES 1568 |
| 49 | +#define pqcrystals_kyber1024_KEYPAIRCOINBYTES 64 |
| 50 | +#define pqcrystals_kyber1024_ENCCOINBYTES 32 |
| 51 | +#define pqcrystals_kyber1024_BYTES 32 |
| 52 | + |
| 53 | +#define pqcrystals_kyber1024_ref_SECRETKEYBYTES pqcrystals_kyber1024_SECRETKEYBYTES |
| 54 | +#define pqcrystals_kyber1024_ref_PUBLICKEYBYTES pqcrystals_kyber1024_PUBLICKEYBYTES |
| 55 | +#define pqcrystals_kyber1024_ref_CIPHERTEXTBYTES pqcrystals_kyber1024_CIPHERTEXTBYTES |
| 56 | +#define pqcrystals_kyber1024_ref_KEYPAIRCOINBYTES pqcrystals_kyber1024_KEYPAIRCOINBYTES |
| 57 | +#define pqcrystals_kyber1024_ref_ENCCOINBYTES pqcrystals_kyber1024_ENCCOINBYTES |
| 58 | +#define pqcrystals_kyber1024_ref_BYTES pqcrystals_kyber1024_BYTES |
| 59 | + |
| 60 | +int pqcrystals_kyber1024_ref_keypair_derand(uint8_t *pk, uint8_t *sk, const uint8_t *coins); |
| 61 | +int pqcrystals_kyber1024_ref_keypair(uint8_t *pk, uint8_t *sk); |
| 62 | +int pqcrystals_kyber1024_ref_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins); |
| 63 | +int pqcrystals_kyber1024_ref_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk); |
| 64 | +int pqcrystals_kyber1024_ref_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk); |
| 65 | + |
| 66 | +#endif |
0 commit comments