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
768 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 "127.0.0.1"
#define ISSUERPORT 6590
#define MEMBERIP "127.0.0.1"
#define MEMBERPORT 6591
#define VERIFIERIP "127.0.0.1"
#define VERIFIERPORT 6592
#define MAX_CLIENTS 10
#define MAX_BUFSIZE 2048
#define MAX_MSGSIZE (MAX_BUFSIZE / 8)
#define MAX_BSNSIZE (MAX_BUFSIZE / 16)
#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