oxedyne/fe2o3/fe2o3_crypto/src/build_src/pack_unpack.h
971 bytes, 1 run
created by r1870400018:165, 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 PACK_UNPACK_H |
| 2 | #define PACK_UNPACK_H |
| 3 | |
| 4 | #include <stdio.h> |
| 5 | #include <stdint.h> |
| 6 | #include "SABER_params.h" |
| 7 | |
| 8 | void POLT2BS(uint8_t bytes[SABER_SCALEBYTES_KEM], const uint16_t data[SABER_N]); |
| 9 | void BS2POLT(const uint8_t bytes[SABER_SCALEBYTES_KEM], uint16_t data[SABER_N]); |
| 10 | |
| 11 | void POLVECq2BS(uint8_t bytes[SABER_POLYVECBYTES], const uint16_t data[SABER_L][SABER_N]); |
| 12 | void POLVECp2BS(uint8_t bytes[SABER_POLYVECCOMPRESSEDBYTES], const uint16_t data[SABER_L][SABER_N]); |
| 13 | |
| 14 | void BS2POLVECq(const uint8_t bytes[SABER_POLYVECBYTES], uint16_t data[SABER_L][SABER_N]); |
| 15 | void BS2POLVECp(const uint8_t bytes[SABER_POLYVECCOMPRESSEDBYTES], uint16_t data[SABER_L][SABER_N]); |
| 16 | |
| 17 | void BS2POLmsg(const uint8_t bytes[SABER_KEYBYTES], uint16_t data[SABER_N]); |
| 18 | void POLmsg2BS(uint8_t bytes[SABER_KEYBYTES], const uint16_t data[SABER_N]); |
| 19 | |
| 20 | void hexdump(char *str, uint8_t *bytes, const int start, const int end); |
| 21 | void hexdump2(char *str, uint16_t *bytes, const int start, const int end); |
| 22 | |
| 23 | #endif |