2019-12-06 15:16:41 +00:00
|
|
|
#ifndef PQCLEAN_DILITHIUM3_CLEAN_PACKING_H
|
|
|
|
#define PQCLEAN_DILITHIUM3_CLEAN_PACKING_H
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2019-12-12 13:11:12 +00:00
|
|
|
#include "api.h"
|
2019-06-11 10:18:05 +01:00
|
|
|
#include "params.h"
|
|
|
|
#include "polyvec.h"
|
|
|
|
|
2019-12-06 15:16:41 +00:00
|
|
|
void PQCLEAN_DILITHIUM3_CLEAN_pack_pk(
|
2019-12-12 13:11:12 +00:00
|
|
|
uint8_t pk[PQCLEAN_DILITHIUM3_CLEAN_CRYPTO_PUBLICKEYBYTES],
|
|
|
|
const uint8_t rho[SEEDBYTES],
|
|
|
|
const polyveck *t1);
|
2019-12-06 15:16:41 +00:00
|
|
|
void PQCLEAN_DILITHIUM3_CLEAN_pack_sk(
|
2019-12-12 13:11:12 +00:00
|
|
|
uint8_t sk[PQCLEAN_DILITHIUM3_CLEAN_CRYPTO_SECRETKEYBYTES],
|
|
|
|
const uint8_t rho[SEEDBYTES],
|
|
|
|
const uint8_t key[SEEDBYTES],
|
|
|
|
const uint8_t tr[SEEDBYTES],
|
2019-12-06 15:16:41 +00:00
|
|
|
const polyvecl *s1,
|
|
|
|
const polyveck *s2,
|
|
|
|
const polyveck *t0);
|
|
|
|
void PQCLEAN_DILITHIUM3_CLEAN_pack_sig(
|
2019-12-12 13:11:12 +00:00
|
|
|
uint8_t sig[PQCLEAN_DILITHIUM3_CLEAN_CRYPTO_SECRETKEYBYTES],
|
2019-12-06 15:16:41 +00:00
|
|
|
const polyvecl *z, const polyveck *h, const poly *c);
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2019-12-06 15:16:41 +00:00
|
|
|
void PQCLEAN_DILITHIUM3_CLEAN_unpack_pk(
|
2019-12-12 13:11:12 +00:00
|
|
|
uint8_t rho[SEEDBYTES],
|
|
|
|
polyveck *t1,
|
|
|
|
const uint8_t pk[PQCLEAN_DILITHIUM3_CLEAN_CRYPTO_PUBLICKEYBYTES]);
|
2019-12-06 15:16:41 +00:00
|
|
|
void PQCLEAN_DILITHIUM3_CLEAN_unpack_sk(
|
2019-12-12 13:11:12 +00:00
|
|
|
uint8_t rho[SEEDBYTES],
|
|
|
|
uint8_t key[SEEDBYTES],
|
|
|
|
uint8_t tr[CRHBYTES],
|
2019-12-06 15:16:41 +00:00
|
|
|
polyvecl *s1,
|
|
|
|
polyveck *s2,
|
|
|
|
polyveck *t0,
|
|
|
|
const uint8_t *sk);
|
|
|
|
int PQCLEAN_DILITHIUM3_CLEAN_unpack_sig(
|
2019-12-12 13:11:12 +00:00
|
|
|
polyvecl *z,
|
|
|
|
polyveck *h,
|
|
|
|
poly *c,
|
|
|
|
const uint8_t sig[PQCLEAN_DILITHIUM3_CLEAN_CRYPTO_BYTES]);
|
2019-06-11 10:18:05 +01:00
|
|
|
|
|
|
|
#endif
|