#include "params.h"
#include "gf.h"
Go to the source code of this file.
Defines | |
#define | NB_ERRORS ERROR_WEIGHT |
#define | EXT_DEGREE LOG_LENGTH |
#define | LENGTH (1 << EXT_DEGREE) |
#define | CODIMENSION (NB_ERRORS * EXT_DEGREE) |
#define | DIMENSION (LENGTH - CODIMENSION) |
#define | BITS_TO_BYTES(nb_bits) (((nb_bits) - 1) / 8 + 1) |
#define | BIT_SIZE_OF_LONG (8 * sizeof(long)) |
#define | BITS_TO_LONG(nb_bits) (((nb_bits) - 1) / BIT_SIZE_OF_LONG + 1) |
#define | SECRETKEY_BYTES (LENGTH * sizeof (long) * BITS_TO_LONG(CODIMENSION) + (LENGTH + 1 + (NB_ERRORS + 1) * NB_ERRORS) * sizeof (gf_t)) |
#define | PUBLICKEY_BYTES (BITS_TO_LONG(CODIMENSION) * sizeof(long) * DIMENSION) |
#define | CLEARTEXT_LENGTH (DIMENSION + ERROR_SIZE) |
#define | CLEARTEXT_BYTES BITS_TO_BYTES(CLEARTEXT_LENGTH) |
#define | CIPHERTEXT_BYTES BITS_TO_BYTES(LENGTH) |
#define | MESSAGE_BYTES (CLEARTEXT_LENGTH / 8) |
#define BIT_SIZE_OF_LONG (8 * sizeof(long)) |
#define BITS_TO_BYTES | ( | nb_bits | ) | (((nb_bits) - 1) / 8 + 1) |
#define BITS_TO_LONG | ( | nb_bits | ) | (((nb_bits) - 1) / BIT_SIZE_OF_LONG + 1) |
Definition at line 16 of file sizes.h.
Referenced by addto(), encrypt_block(), keypair(), sk_from_string(), syndrome(), and xor().
#define CIPHERTEXT_BYTES BITS_TO_BYTES(LENGTH) |
#define CLEARTEXT_BYTES BITS_TO_BYTES(CLEARTEXT_LENGTH) |
#define CLEARTEXT_LENGTH (DIMENSION + ERROR_SIZE) |
Definition at line 21 of file sizes.h.
Referenced by check(), decrypt_block_ss(), encrypt_block_ss(), and main().
#define CODIMENSION (NB_ERRORS * EXT_DEGREE) |
Definition at line 8 of file sizes.h.
Referenced by addto(), encrypt_block(), keypair(), sk_from_string(), syndrome(), vec_concat(), and xor().
#define DIMENSION (LENGTH - CODIMENSION) |
Definition at line 9 of file sizes.h.
Referenced by decrypt_block(), encrypt_block(), and vec_concat().
#define EXT_DEGREE LOG_LENGTH |
Definition at line 5 of file sizes.h.
Referenced by decode(), key_genmat(), keypair(), main(), roots_berl(), roots_berl_aux(), and syndrome().
#define LENGTH (1 << EXT_DEGREE) |
Definition at line 7 of file sizes.h.
Referenced by key_genmat(), keypair(), sk_from_string(), and syndrome().
#define MESSAGE_BYTES (CLEARTEXT_LENGTH / 8) |
#define NB_ERRORS ERROR_WEIGHT |
Definition at line 4 of file sizes.h.
Referenced by decode(), decrypt_block(), encrypt_block(), key_genmat(), keypair(), main(), roots_berl(), roots_berl_aux(), sk_free(), sk_from_string(), and syndrome().
#define PUBLICKEY_BYTES (BITS_TO_LONG(CODIMENSION) * sizeof(long) * DIMENSION) |
#define SECRETKEY_BYTES (LENGTH * sizeof (long) * BITS_TO_LONG(CODIMENSION) + (LENGTH + 1 + (NB_ERRORS + 1) * NB_ERRORS) * sizeof (gf_t)) |