/home/dko/Projects/mobilec/src/security/interface.c File Reference

#include "interface.h"
#include <sys/socket.h>

Go to the source code of this file.

Functions

static void separate_key_parts (char *key, char *N, char *E, char *D, char *P, char *Q, char *DP, char *DQ, char *QP)
int rsa_encryption (char *publickey, char *plaintext, char *ciphertext)
int rsa_decryption (char *ciphertext, char *plaintext, char *privatekey)
static int append_nonce_to_MA (int *my_nonce, char *MA_file)
static int remove_nonce_from_MA (char *MA_file)
static int extract_nonce_from_MA (int sockfd, int *my_nonce, char *MA_file)
int read_known_host_file (char *pubkey, char *hname, char *filename)
int read_encrypted_file (char *enfile, char *string, unsigned char *passphase)
int initiate_migration_process (int new_fd, int *my_nonce, char *pubkey, char *privkey, unsigned char *aes_key)
int reply_migration_process (int sockfd, int *my_nonce, char *pubkey, char *privkey, unsigned char *aes_key)
void generate_AES_key (char *key)
int aes_en_de (int mode, char *infile, char *outfile, unsigned char *AES_key, int *nonce, int new_fd)
int send_AES_en_MA (int sockfd, int *my_nonce, char *outfile, char *pubkey)
int receive_AES_en_MA (int new_fd, int *nonce, char *infile, char *privkey)
int generate_RSA_keys_plaintext (char *pubkeyfile, char *privkeyfile)
int generate_RSA_keys_ciphertext (char *pubkeyfile, char *privkeyfile, unsigned char *passphrase)

Function Documentation

int aes_en_de ( int  mode,
char *  infile,
char *  outfile,
unsigned char *  AES_key,
int nonce,
int  new_fd 
)
static int append_nonce_to_MA ( int my_nonce,
char *  MA_file 
) [static]

Definition at line 187 of file interface.c.

Referenced by aes_en_de().

static int extract_nonce_from_MA ( int  sockfd,
int my_nonce,
char *  MA_file 
) [static]

Definition at line 264 of file interface.c.

References remove_nonce_from_MA(), and send.

Referenced by aes_en_de().

void generate_AES_key ( char *  key  ) 

Definition at line 1099 of file interface.c.

References havege_init(), and havege_rand().

Referenced by initiate_migration_process(), and reply_migration_process().

int generate_RSA_keys_ciphertext ( char *  pubkeyfile,
char *  privkeyfile,
unsigned char *  passphrase 
)
int generate_RSA_keys_plaintext ( char *  pubkeyfile,
char *  privkeyfile 
)
int initiate_migration_process ( int  new_fd,
int my_nonce,
char *  pubkey,
char *  privkey,
unsigned char *  aes_key 
)
int read_encrypted_file ( char *  enfile,
char *  string,
unsigned char *  passphase 
)

Definition at line 398 of file interface.c.

References aes_en_de(), and f.

Referenced by MC_Initialize().

int read_known_host_file ( char *  pubkey,
char *  hname,
char *  filename 
)

Definition at line 329 of file interface.c.

Referenced by auth_conn_rece_key(), and auth_rece_send_msg().

int receive_AES_en_MA ( int  new_fd,
int nonce,
char *  infile,
char *  privkey 
)

Definition at line 1555 of file interface.c.

References rsa_decryption(), and size.

Referenced by rece_de_msg().

static int remove_nonce_from_MA ( char *  MA_file  )  [static]

Definition at line 220 of file interface.c.

References int.

Referenced by extract_nonce_from_MA().

int reply_migration_process ( int  sockfd,
int my_nonce,
char *  pubkey,
char *  privkey,
unsigned char *  aes_key 
)

Definition at line 777 of file interface.c.

References generate_AES_key(), md5(), rsa_decryption(), rsa_encryption(), and send.

Referenced by auth_conn_rece_key().

int rsa_decryption ( char *  ciphertext,
char *  plaintext,
char *  privatekey 
)
int rsa_encryption ( char *  publickey,
char *  plaintext,
char *  ciphertext 
)
int send_AES_en_MA ( int  sockfd,
int my_nonce,
char *  outfile,
char *  pubkey 
)

Definition at line 1419 of file interface.c.

References int, rsa_encryption(), send, and size.

Referenced by auth_rece_send_msg().

static void separate_key_parts ( char *  key,
char *  N,
char *  E,
char *  D,
char *  P,
char *  Q,
char *  DP,
char *  DQ,
char *  QP 
) [static]

Definition at line 28 of file interface.c.

Referenced by rsa_decryption(), and rsa_encryption().

Generated on Tue Dec 28 15:15:28 2010 for Mobile-C by  doxygen 1.6.3