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


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


#include "defines.h"

//int createUDS();					//create rand file. to be replaced with real fuse pointer

int readUDS(uint8_t* UDSdigest);

int readFWID(uint8_t * FW_M);

int _calcCDID(uint8_t * CDID);

int _calcCDIKEY(uint8_t * CDIKEY);


int seedRNGSource(void *data, unsigned char *output, size_t len);

int deriveECCKeyPair(KeyDrv_context * KD_ctx);

int deriveRSAKeyPair(void);

