aboutsummaryrefslogtreecommitdiff
path: root/libcmix-crypto/elgamal/null
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-10-27 09:25:53 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-10-27 09:25:53 +0200
commit25db9ff8a4cfb4b98aeeaae360e8c718b9c5e20c (patch)
tree079ea63fcc874506072a91b13d2612b510cf158e /libcmix-crypto/elgamal/null
parent9eaf47d5dfa56ca79ae903aabfc2cf52bdfb981e (diff)
downloadcmix-25db9ff8a4cfb4b98aeeaae360e8c718b9c5e20c.tar.gz
cmix-25db9ff8a4cfb4b98aeeaae360e8c718b9c5e20c.tar.bz2
cmix-25db9ff8a4cfb4b98aeeaae360e8c718b9c5e20c.zip
Adds libgcrypt implementation for elgamal in multiplicative group.
Also adapts the API to both handle sodium and gcrypt libraries.
Diffstat (limited to 'libcmix-crypto/elgamal/null')
-rw-r--r--libcmix-crypto/elgamal/null/null_elgamal.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/libcmix-crypto/elgamal/null/null_elgamal.c b/libcmix-crypto/elgamal/null/null_elgamal.c
index 285e2fd..17478e1 100644
--- a/libcmix-crypto/elgamal/null/null_elgamal.c
+++ b/libcmix-crypto/elgamal/null/null_elgamal.c
@@ -4,22 +4,27 @@
#include <stddef.h>
#include <stdbool.h>
+void elgamal_initialize(void) {}
+
void elgamal_keypair_deleter(struct KeyPair p) {}
struct KeyPair elgamal_create_keypair() {
return (struct KeyPair){
NULL,
NULL,
- 0,
- 0
};
}
-void elgamal_shared_key_deleter(struct SharedKey s) {}
+void elgamal_get_key_array(char** buffer, size_t* len, void* pubkey) {}
+
+void elgamal_add_public_share(char** buffer, size_t* out_len, char const* share, size_t in_len, void* pubkey) {}
-struct SharedKey elgamal_derive_shared_key(struct KeyPair pair, unsigned char const* pub_key, bool swap_pub_order) {
+struct SharedKey elgamal_derive_shared_key(struct KeyPair pair, void const* pub_key, bool swap_pub_order) {
return (struct SharedKey){
NULL,
- 0
};
}
+
+void elgamal_shared_key_deleter(struct SharedKey* s) {}
+
+void elgamal_deinitialize(void) {}