Wiselib
Defines | Functions | Variables
wiselib.testing/algorithms/privacy/code_pc/tests/security.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <pbc.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/signal.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <string.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include "utma_weak.h"
#include "common.h"

Defines

#define BAUDRATE   B115200
#define UART   "/dev/ttyUSB0"
#define _POSIX_SOURCE   1
#define FALSE   0
#define TRUE   1

Functions

void PrintBit (uint8_t c)
char * read_file (char *filename)
void pairing_setup ()
void load_pairing_param (int func)
void prepare_uart ()
int read_buffer (uint8_t *msg_id, uint8_t *req_id, uint8_t *payload_len, uint8_t *payload)
int uart_write (int fd, uint8_t *buff, int len)
uint8_t * encrypt (uint8_t *payload, uint8_t *req_id)
uint8_t * decrypt (char *payload, char *req_id)
uint8_t * randomize (char *payload, char *req_id)
int main (int argc, char **argv)

Variables

PubTriplepubT
Keykey
Sksk
Pkpk
Pubpub
pairing_t pairing
uint8_t * buffer
int fd
int c
int size
struct termios oldtio newtio
char * message
char * cifrato
char * randomizzato

Define Documentation

#define _POSIX_SOURCE   1
#define BAUDRATE   B115200
#define FALSE   0
#define TRUE   1
#define UART   "/dev/ttyUSB0"

Function Documentation

uint8_t* decrypt ( char *  payload,
char *  req_id 
)
uint8_t* encrypt ( uint8_t *  payload,
uint8_t *  req_id 
)
void load_pairing_param ( int  func)
int main ( int  argc,
char **  argv 
)
void pairing_setup ( )
void prepare_uart ( )
void PrintBit ( uint8_t  c)
uint8_t* randomize ( char *  payload,
char *  req_id 
)
int read_buffer ( uint8_t *  msg_id,
uint8_t *  req_id,
uint8_t *  payload_len,
uint8_t *  payload 
)
char* read_file ( char *  filename)
int uart_write ( int  fd,
uint8_t *  buff,
int  len 
)

Variable Documentation

uint8_t* buffer
int c
char* cifrato
int fd
Key* key
char* message
struct termios oldtio newtio
pairing_t pairing
Pk* pk
Pub* pub
char* randomizzato
int size
Sk* sk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines