encrypt.c File Reference

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

Include dependency graph for encrypt.c:

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


Function Documentation

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().


Variable Documentation

Definition at line 4 of file cwdata.c.


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