aboutsummaryrefslogtreecommitdiff
path: root/libcmix-crypto/api.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix-crypto/api.h')
-rw-r--r--libcmix-crypto/api.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/libcmix-crypto/api.h b/libcmix-crypto/api.h
index 5267f33..99f6417 100644
--- a/libcmix-crypto/api.h
+++ b/libcmix-crypto/api.h
@@ -31,7 +31,7 @@ typedef void (*KeyPairDeleter)(struct KeyPair*);
* \brief Defines how a Derived Shared Key function should look like.
* Used to store a pointer to function to a implementation.
*/
-typedef struct SharedKey (*SharedKeyDeriver)(struct KeyPair, void const*, bool);
+typedef struct SharedKey (*SharedKeyDeriver)(struct KeyPair, unsigned char const*, size_t, unsigned char const*, size_t, void*, bool);
/*!
* \brief Defines how a Derived Shared Key deleter function should look like.
@@ -55,13 +55,31 @@ typedef void(*KeyArrayGetter)(char**, size_t* size, void*);
typedef void(*PublicShareAdder)(char**, size_t*, char const*, size_t, void*);
/*!
+ *
+ */
+typedef void*(*GroupElementGetter)(bool);
+
+/*!
+ *
+ */
+typedef void*(*KeyExchangeValueGetter)(void*);
+
+/*!
+ *
+ */
+typedef void(*GroupElementDeleter)(void*);
+
+/*!
* \brief The Api struct stores pointers to functions of a specific implementation. Like a Curve25519 specific one.
*/
struct Api {
Initializer initialize; ///< Function that will initialize the crypto library.
KeyPairCreator create_key_pair; ///< Pointer to keypair creation function
KeyPairDeleter free_key_pair; ///< Pointer to keypair deletor function
- KeyArrayGetter get_key_array; ///< Get the array representation of a public key;
+ KeyArrayGetter get_key_array; ///< Get the array representation of a public key
+ GroupElementGetter get_group_element; ///< get group element
+ KeyExchangeValueGetter get_key_exchange_value; ///< get generator *op* group element.
+ GroupElementDeleter free_group_element; ///< frees a base type of the cryptolibrary.
PublicShareAdder add_public_share; ///< Adds the public key stored in void* to the existing share.
SharedKeyDeriver derive_shared_key; ///< Pointer to shared key derivation function
SharedKeyDeleter free_shared_key; ///< Pointer to shared key deleter function