#ifndef _RSA_H #define _RSA_H 1 #include #include #include #include #include #include #include #include #define RSA_BLOCK_SIZE 128 typedef struct rsa_s { uint64_t n; uint64_t d; } rsa_t; void *protected_malloc(size_t size); rsa_t rsa_generate_keys(); uint16_t generate_prime(); uint64_t pow_mod(uint64_t nn, uint64_t e, uint64_t mm); uint16_t get_random_bytes(int fd); #endif