ECDHKeypair.h 585 B

12345678910111213141516171819
  1. #ifndef ECDHKEYPAIR_H
  2. #define ECDHKEYPAIR_H
  3. #include "sgx_tcrypto.h"
  4. static const int ECDH_PUBLIC_KEY_SIZE =2*SGX_ECP256_KEY_SIZE;
  5. static const int ECDH_PRIVATE_KEY_SIZE =SGX_ECP256_KEY_SIZE;
  6. class ECDHKeypair {
  7. private:
  8. uint8_t private_key[ECDH_PUBLIC_KEY_SIZE];
  9. uint8_t public_key[ECDH_PUBLIC_KEY_SIZE];
  10. public:
  11. void set_private_public_key(uint8_t* ip_private_key, uint8_t* ip_public_key);
  12. void get_private_key(uint8_t* op_private_key);
  13. uint32_t generate_keypair();
  14. // ECDHKeypair();
  15. void get_public_key(uint8_t* op_public_key);
  16. // ~ECDHKeypair();
  17. };
  18. #endif