solo1/crypto.h

29 wiersze
721 B
C
Czysty Zwykły widok Historia

2018-05-06 18:53:43 +00:00
#ifndef _CRYPTO_H
#define _CRYPTO_H
#define USE_SOFTWARE_IMPLEMENTATION
void crypto_sha256_init();
void crypto_sha256_update(uint8_t * data, size_t len);
void crypto_sha256_update_secret();
2018-05-06 18:53:43 +00:00
void crypto_sha256_final(uint8_t * hash);
2018-05-07 00:15:18 +00:00
void crypto_ecc256_init();
void crypto_ecc256_derive_public_key(uint8_t * data, int len, uint8_t * x, uint8_t * y);
2018-05-07 00:15:18 +00:00
void crypto_ecc256_load_key(uint8_t * data, int len);
2018-05-07 00:15:18 +00:00
void crypto_ecc256_load_attestation_key();
void crypto_ecc256_sign(uint8_t * data, int len, uint8_t * sig);
void generate_private_key(uint8_t * data, int len, uint8_t * data2, int len2, uint8_t * privkey);
2018-05-07 00:15:18 +00:00
extern const uint8_t attestation_cert_der[];
extern const uint16_t attestation_cert_der_size;
2018-05-06 18:53:43 +00:00
#endif