Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_crypto/src/c/pack_unpack.h

971 bytes, 1 run

created by r1870400018:210, 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
8void POLT2BS(uint8_t bytes[SABER_SCALEBYTES_KEM], const uint16_t data[SABER_N]);
9void BS2POLT(const uint8_t bytes[SABER_SCALEBYTES_KEM], uint16_t data[SABER_N]);
10
11void POLVECq2BS(uint8_t bytes[SABER_POLYVECBYTES], const uint16_t data[SABER_L][SABER_N]);
12void POLVECp2BS(uint8_t bytes[SABER_POLYVECCOMPRESSEDBYTES], const uint16_t data[SABER_L][SABER_N]);
13
14void BS2POLVECq(const uint8_t bytes[SABER_POLYVECBYTES], uint16_t data[SABER_L][SABER_N]);
15void BS2POLVECp(const uint8_t bytes[SABER_POLYVECCOMPRESSEDBYTES], uint16_t data[SABER_L][SABER_N]);
16
17void BS2POLmsg(const uint8_t bytes[SABER_KEYBYTES], uint16_t data[SABER_N]);
18void POLmsg2BS(uint8_t bytes[SABER_KEYBYTES], const uint16_t data[SABER_N]);
19
20void hexdump(char *str, uint8_t *bytes, const int start, const int end);
21void hexdump2(char *str, uint16_t *bytes, const int start, const int end);
22
23#endif