#pragma once #include #include #include "bigint.h" namespace RSA{ struct Key{ Bigint mod,exp; }; Bigint encrypt(Bigint msg,const Key &key); Bigint decrypt(Bigint msg,const Key &key); std::pair genkeys(int nbits); //nbits is target number of bits of modulus std::string exportKey(const Key&); //throws invalid_argument if the imported key is of invalid format Key importKey(const std::string &repr); }