oxedyne/fe2o3/fe2o3_crypto/src/c/api.h
713 bytes, 1 run
created by r1870400018:179, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | #ifndef API_H |
| 2 | #define API_H |
| 3 | |
| 4 | #include "SABER_params.h" |
| 5 | |
| 6 | #if SABER_L == 2 |
| 7 | #define CRYPTO_ALGNAME "LightSaber" |
| 8 | #elif SABER_L == 3 |
| 9 | #define CRYPTO_ALGNAME "Saber" |
| 10 | #elif SABER_L == 4 |
| 11 | #define CRYPTO_ALGNAME "FireSaber" |
| 12 | #else |
| 13 | #error "Unsupported SABER parameter." |
| 14 | #endif |
| 15 | |
| 16 | #define CRYPTO_SECRETKEYBYTES SABER_SECRETKEYBYTES |
| 17 | #define CRYPTO_PUBLICKEYBYTES SABER_PUBLICKEYBYTES |
| 18 | #define CRYPTO_BYTES SABER_KEYBYTES |
| 19 | #define CRYPTO_CIPHERTEXTBYTES SABER_BYTES_CCA_DEC |
| 20 | |
| 21 | int crypto_kem_keypair(unsigned char *pk, unsigned char *sk); |
| 22 | int crypto_kem_enc(unsigned char *ct, unsigned char *ss, const unsigned char *pk); |
| 23 | int crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk); |
| 24 | |
| 25 | #endif /* api_h */ |