Network wrapper protocol as part of the practical master thesis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
776 B

//
// Created by root on 10/30/19.
//
#ifndef ECDAA_ISSUER_COMMON_H
#define ECDAA_ISSUER_COMMON_H
#include <sys/random.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#define ISSUERIP "192.168.10.11"
#define ISSUERPORT 6590
#define MEMBERIP "192.168.10.12"
#define MEMBERPORT 6591
#define VERIFIERIP "192.168.10.10"
#define VERIFIERPORT 6592
#define MAX_CLIENTS 10
#define MAX_BUFSIZE 20480
#define MAX_MSGSIZE ((MAX_BUFSIZE - 1536) / 2)
#define MAX_BSNSIZE 128
#define NONCE_SIZE 384
typedef int (*conn_handler)(char *buffer);
void ecdaa_rand(void *buffer, size_t buflen);
void ecdaa_hextobin(const char *in_hex, uint8_t *out_bin, size_t outlen);
void ecdaa_bintohex(const uint8_t *in_bin, size_t inlen, char *out_hex);
#endif //ECDAA_ISSUER_COMMON_H