mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-27 01:41:40 +00:00
e56b2e5556
* fixes dynamic memory allocation test. previously a function called freeze() would trigger it * this adds DilithiumII. Preprocessor conditionals still need to be removed * fix ms Makefile * fix MS compiler warnings * clean-up * remove preprocessor conditionals * add dilithium3 * add dilithium4 * add duplicate consistency checks * SHA2 state constants in common * clean up symmetric.h * Port SPHINCS+-SHA256 to sha256ctx struct * Implement ctx struct for fips202 * Port Kyber{512,768,1024} to fips202 ctx struct * Port NewHope to fips202 structs * Port SPHINCS+-SHAKE256 to fips202 ctx structs * Use opaque fips202 structs in MQDSS * port dilithium to use fips202 ctx structs * include -Wredundant-decls * remove comment; format NTT constants * reduce casts in power2round
32 lines
1.6 KiB
C
32 lines
1.6 KiB
C
#ifndef PACKING_H
|
|
#define PACKING_H
|
|
|
|
#include "params.h"
|
|
#include "polyvec.h"
|
|
|
|
void PQCLEAN_DILITHIUM2_CLEAN_pack_pk(unsigned char pk[CRYPTO_PUBLICKEYBYTES],
|
|
const unsigned char rho[SEEDBYTES], const polyveck *t1);
|
|
void PQCLEAN_DILITHIUM2_CLEAN_pack_sk(unsigned char sk[CRYPTO_SECRETKEYBYTES],
|
|
const unsigned char rho[SEEDBYTES],
|
|
const unsigned char key[SEEDBYTES],
|
|
const unsigned char tr[CRHBYTES],
|
|
const polyvecl *s1,
|
|
const polyveck *s2,
|
|
const polyveck *t0);
|
|
void PQCLEAN_DILITHIUM2_CLEAN_pack_sig(unsigned char sig[CRYPTO_BYTES],
|
|
const polyvecl *z, const polyveck *h, const poly *c);
|
|
|
|
void PQCLEAN_DILITHIUM2_CLEAN_unpack_pk(unsigned char rho[SEEDBYTES], polyveck *t1,
|
|
const unsigned char pk[CRYPTO_PUBLICKEYBYTES]);
|
|
void PQCLEAN_DILITHIUM2_CLEAN_unpack_sk(unsigned char rho[SEEDBYTES],
|
|
unsigned char key[SEEDBYTES],
|
|
unsigned char tr[CRHBYTES],
|
|
polyvecl *s1,
|
|
polyveck *s2,
|
|
polyveck *t0,
|
|
const unsigned char sk[CRYPTO_SECRETKEYBYTES]);
|
|
int PQCLEAN_DILITHIUM2_CLEAN_unpack_sig(polyvecl *z, polyveck *h, poly *c,
|
|
const unsigned char sig[CRYPTO_BYTES]);
|
|
|
|
#endif
|