#ifndef __uC_LIB_C__ #define __uC_LIB_C__ #include #include "mem.h" //* functions that rely on hardware components of the Lockitall lock int verify_ed25519 (char * ed25519_pubkey, void * buf, int size, char * signature) { //FIXME: This is not correct (see ../22-Churchill/churchill.asm) INT(0x33, ed25519_pubkey, buf, size, signature); return 1; } int sha256_internal (size_t sram_in_buf, size_t size, char * out_buf) { INT(0x41, sram_in_buf, size, out_buf); return 0; } //* functions that are explicitly implemented in the standard library //void *memcpy(void *__restrict__ __dest, const void *__restrict__ __src, size_t __n); //int memcmp(const void *__s1, const void *__s2, size_t __n); void sha1 (void *buf,size_t size, char * out_buf) {/* implementation goes here */} void sha256 (void *buf,size_t size, char * out_buf) {/* implementation goes here */} void sha512 (void *buf,size_t size, char * out_buf) {/* implementation goes here */} #endif // __uC_LIB_C__