From 825fc3d44eb6a3837bb922815c4351aa011a213c Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Tue, 30 Aug 2016 11:07:18 +0200 Subject: Proof of concept skeleton, linktime algorithm implementation selection. --- libcmix-crypto/keymanagement.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 libcmix-crypto/keymanagement.h (limited to 'libcmix-crypto/keymanagement.h') diff --git a/libcmix-crypto/keymanagement.h b/libcmix-crypto/keymanagement.h new file mode 100644 index 0000000..1db0ce6 --- /dev/null +++ b/libcmix-crypto/keymanagement.h @@ -0,0 +1,28 @@ +#pragma once + +#include "curve25519.h" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct KeyPair(*CmixKeyPairCreator)(); +typedef struct KeyPair(*CmixKeyPairLoader)(char*, char*); + +struct CmixKeyManagementImpl { + CmixKeyPairCreator create_new_keypair; + CmixKeyPairLoader load_keypair; +}; + +struct CmixKeyManagementImpl get_curve25519_key_management_implementation() { + return (struct CmixKeyManagementImpl) {\ + &curve25519_create_keypair, + NULL + };\ +} + +#ifdef __cplusplus +} // extern "C" +#endif -- cgit v1.2.3-70-g09d2