#include "layer1.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "mbedtls/aes.h"
#include "mbedtls/bignum.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/hmac_drbg.h"
#include "mbedtls/ecdh.h"
#include "mbedtls/ecdsa.h"
#include "mbedtls/ecp.h"
#include "mbedtls/rsa.h"
#include "mbedtls/sha256.h"


//#include "defines.h"



void ROMprotocol(void);

void deriveDeviceIDKeyPair(uint8_t * CDIKEY, int isECC);

void deriveAliasKeyPair(uint8_t * ALIKEY, int isECC);

void writePrivKeytoFile(char * filename, int isPEM);

void writePubKeytoFile(char* filename, int isPEM);

void genCertiicate();
