mirror of
https://github.com/luxfi/pqclean.git
synced 2026-11-02 15:23:24 +00:00
40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
#ifndef PQCLEAN_MLKEM512_AARCH64_PARAMS_H
|
|
#define PQCLEAN_MLKEM512_AARCH64_PARAMS_H
|
|
|
|
/*
|
|
* This file is licensed
|
|
* under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.html) or
|
|
* public domain at https://github.com/pq-crystals/kyber/tree/master/ref
|
|
*/
|
|
|
|
#define KYBER_NAMESPACE(s) PQCLEAN_MLKEM512_AARCH64_##s
|
|
|
|
/* Don't change parameters below this line */
|
|
#define KYBER_N 256
|
|
#define KYBER_Q 3329
|
|
|
|
#define KYBER_SYMBYTES 32 /* size in bytes of hashes, and seeds */
|
|
#define KYBER_SSBYTES 32 /* size in bytes of shared key */
|
|
|
|
#define KYBER_POLYBYTES 384
|
|
#define KYBER_POLYVECBYTES (KYBER_K * KYBER_POLYBYTES)
|
|
|
|
#define KYBER_K 2
|
|
#define KYBER_ETA1 3
|
|
#define KYBER_POLYCOMPRESSEDBYTES 128
|
|
#define KYBER_POLYVECCOMPRESSEDBYTES (KYBER_K * 320)
|
|
|
|
#define KYBER_ETA2 2
|
|
|
|
#define KYBER_INDCPA_MSGBYTES (KYBER_SYMBYTES)
|
|
#define KYBER_INDCPA_PUBLICKEYBYTES (KYBER_POLYVECBYTES + KYBER_SYMBYTES)
|
|
#define KYBER_INDCPA_SECRETKEYBYTES (KYBER_POLYVECBYTES)
|
|
#define KYBER_INDCPA_BYTES (KYBER_POLYVECCOMPRESSEDBYTES + KYBER_POLYCOMPRESSEDBYTES)
|
|
|
|
#define KYBER_PUBLICKEYBYTES (KYBER_INDCPA_PUBLICKEYBYTES)
|
|
/* 32 bytes of additional space to save H(pk) */
|
|
#define KYBER_SECRETKEYBYTES (KYBER_INDCPA_SECRETKEYBYTES + KYBER_INDCPA_PUBLICKEYBYTES + 2*KYBER_SYMBYTES)
|
|
#define KYBER_CIPHERTEXTBYTES (KYBER_INDCPA_BYTES)
|
|
|
|
#endif
|