sizes.h File Reference

#include "params.h"
#include "gf.h"

Include dependency graph for sizes.h:

This graph shows which files directly or indirectly include this file:

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 Documentation

#define BIT_SIZE_OF_LONG   (8 * sizeof(long))

Definition at line 14 of file sizes.h.

Referenced by keypair(), syndrome(), and vec_concat().

#define BITS_TO_BYTES ( nb_bits   )     (((nb_bits) - 1) / 8 + 1)

Definition at line 12 of file sizes.h.

Referenced by decrypt_block(), and vec_concat().

#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)

Definition at line 25 of file sizes.h.

Referenced by main().

#define CLEARTEXT_BYTES   BITS_TO_BYTES(CLEARTEXT_LENGTH)

Definition at line 23 of file sizes.h.

Referenced by check(), and main().

#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)

Definition at line 35 of file sizes.h.

Referenced by main(), randomize(), and unrandomize().

#define NB_ERRORS   ERROR_WEIGHT

#define PUBLICKEY_BYTES   (BITS_TO_LONG(CODIMENSION) * sizeof(long) * DIMENSION)

Definition at line 19 of file sizes.h.

Referenced by main().

#define SECRETKEY_BYTES   (LENGTH * sizeof (long) * BITS_TO_LONG(CODIMENSION) + (LENGTH + 1 + (NB_ERRORS + 1) * NB_ERRORS) * sizeof (gf_t))

Definition at line 18 of file sizes.h.

Referenced by main().


This work was partially suported by Europian Network of Excellence, ECRYPT; ECRYPT