#include <stdlib.h>#include <string.h>#include "sizes.h"#include "dicho.h"#include "randomize.h"

Go to the source code of this file.
Functions | |
| void | vec_concat (unsigned long *x, unsigned long *a, unsigned long *b) |
| void | addto (unsigned long *a, unsigned long *b) |
| 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) |
Variables | |
| precomp_t | cwdata |
| void addto | ( | unsigned long * | a, | |
| unsigned long * | b | |||
| ) |
Definition at line 55 of file encrypt.c.
References BITS_TO_LONG, and CODIMENSION.
Referenced by encrypt_block().
| 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().

| void vec_concat | ( | unsigned long * | x, | |
| unsigned long * | a, | |||
| unsigned long * | b | |||
| ) |
Definition at line 31 of file encrypt.c.
References BIT_SIZE_OF_LONG, BITS_TO_BYTES, CODIMENSION, and DIMENSION.
Referenced by encrypt_block().