22 lines
478 B
C
22 lines
478 B
C
#include <stdio.h>
|
|
#include <stdint.h>
|
|
|
|
#include <openssl/rand.h>
|
|
#include <openssl/bio.h>
|
|
#include <openssl/err.h>
|
|
#include <openssl/sha.h>
|
|
|
|
|
|
|
|
#define SHA256_DGST_SIZE 32 //bytes
|
|
#define ECC_curve
|
|
|
|
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 * UDS_M, uint8_t * FW_M, uint8_t * CDID);
|
|
int _calcCDID(uint8_t * CDID); //wrapper function broken, do not use
|
|
|
|
|