Go to the source code of this file.
Functions | |
int | encrypt_block (unsigned char *ciphertext, unsigned char *cleartext, const unsigned char *pk) |
int | encrypt_block_ss (unsigned char *ciphertext, unsigned char *message, const unsigned char *pk) |
int | decrypt_block (unsigned char *cleartext, unsigned char *ciphertext, const unsigned char *sk) |
int | decrypt_block_ss (unsigned char *message, unsigned char *ciphertext, const unsigned char *sk) |
int | keypair (unsigned char *sk, unsigned char *pk) |
int decrypt_block | ( | unsigned char * | cleartext, | |
unsigned char * | ciphertext, | |||
const unsigned char * | sk | |||
) |
Definition at line 292 of file decrypt.c.
References BITS_TO_BYTES, decode(), dicho_cw2b(), DIMENSION, ERROR_SIZE, ERROR_WEIGHT, LOG_LENGTH, NB_ERRORS, sk_free(), and sk_from_string().
Referenced by decrypt_block_ss(), and main().
int decrypt_block_ss | ( | unsigned char * | message, | |
unsigned char * | ciphertext, | |||
const unsigned char * | sk | |||
) |
Definition at line 330 of file decrypt.c.
References CLEARTEXT_LENGTH, decrypt_block(), and unrandomize().
Referenced by main().
int encrypt_block | ( | unsigned char * | ciphertext, | |
unsigned char * | cleartext, | |||
const unsigned char * | pk | |||
) |
Definition at line 62 of file encrypt.c.
References addto(), BITS_TO_LONG, CODIMENSION, dicho_b2cw(), DIMENSION, ERROR_SIZE, ERROR_WEIGHT, LOG_LENGTH, NB_ERRORS, and vec_concat().
Referenced by encrypt_block_ss(), and main().
int encrypt_block_ss | ( | unsigned char * | ciphertext, | |
unsigned char * | message, | |||
const unsigned char * | pk | |||
) |
Definition at line 108 of file encrypt.c.
References CLEARTEXT_LENGTH, encrypt_block(), and randomize().
Referenced by main().
int keypair | ( | unsigned char * | sk, | |
unsigned char * | pk | |||
) |
Definition at line 112 of file keypair.c.
References matrix::alloc_size, BIT_SIZE_OF_LONG, BITS_TO_LONG, CODIMENSION, polynome::coeff, matrix::elem, EXT_DEGREE, g, gf_init(), gop_supr(), key_genmat(), LENGTH, Linv, mat_free(), NB_ERRORS, poly_coeff, poly_free(), poly_randgen_irred(), poly_sqrtmod_init(), poly_syndrome_init(), sqrtmod, and u8rnd().
Referenced by main().