diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-02 15:29:09 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-02 15:29:09 +0200 |
| commit | 4f13051f763cab3d431847305eff913e4bf9d77a (patch) | |
| tree | bb20393d714ede1a0200653e2bddbbb694b56f16 /libcmix-crypto/curve25519/null | |
| parent | dffdb1388991c5b5688139bfa093c8581a0f3a36 (diff) | |
| download | cmix-4f13051f763cab3d431847305eff913e4bf9d77a.tar.gz cmix-4f13051f763cab3d431847305eff913e4bf9d77a.tar.bz2 cmix-4f13051f763cab3d431847305eff913e4bf9d77a.zip | |
Changed to api to be less repetative in use.
Diffstat (limited to 'libcmix-crypto/curve25519/null')
| -rw-r--r-- | libcmix-crypto/curve25519/null/CMakeLists.txt | 17 | ||||
| -rw-r--r-- | libcmix-crypto/curve25519/null/null_curve25519.c | 25 |
2 files changed, 42 insertions, 0 deletions
diff --git a/libcmix-crypto/curve25519/null/CMakeLists.txt b/libcmix-crypto/curve25519/null/CMakeLists.txt new file mode 100644 index 0000000..bf30adc --- /dev/null +++ b/libcmix-crypto/curve25519/null/CMakeLists.txt @@ -0,0 +1,17 @@ +include(get_target_name) + +get_target_name(target_name) + +add_library(${target_name} SHARED + null_curve25519.c +) + +target_compile_options(${target_name} + PRIVATE -std=c99 +) + +target_link_libraries(${target_name} + INTERFACE cmix-crypto + PRIVATE curve25519-interface + PUBLIC sodium +) diff --git a/libcmix-crypto/curve25519/null/null_curve25519.c b/libcmix-crypto/curve25519/null/null_curve25519.c new file mode 100644 index 0000000..317455f --- /dev/null +++ b/libcmix-crypto/curve25519/null/null_curve25519.c @@ -0,0 +1,25 @@ + +#include "api.h" + +#include <stddef.h> +#include <stdbool.h> + +void curve25519_keypair_deleter(struct KeyPair p) {} + +struct KeyPair curve25519_create_keypair() { + return (struct KeyPair){ + NULL, + NULL, + 0, + 0 + }; +} + +void curve25519_shared_key_deleter(struct SharedKey s) {} + +struct SharedKey curve25519_derive_shared_key(struct KeyPair pair, unsigned char* pub_key, bool swap_pub_order) { + return (struct SharedKey){ + NULL, + 0 + }; +} |
