Closed Ekwav closed 6 years ago
Partly, because I only implemented the new functions I currently need.
lol too many changes. include line ending changes. I need time to check. I will check it later. and is there reason to change sodium.dll to libsodium.dll?
I got confused about the lib prefix or not lib prefix 😅 Windows and iOS(x64): no everything else: yes
so you just add this native functions,
+ [DllImport(DLL_NAME)] public static extern int crypto_kx_seed_keypair(byte[] publicKey, byte[] secretKey, byte[] seed);
+ [DllImport(DLL_NAME)] public static extern int crypto_kx_keypair(byte[] publicKey, byte[] secretKey);
+ [DllImport(DLL_NAME)] public static extern int crypto_kx_client_session_keys(byte[] rx, byte[] tx, byte[] client_pk, byte[] client_sk, byte[] server_pk);
+ [DllImport(DLL_NAME)] public static extern int crypto_kx_server_session_keys(byte[] rx, byte[] tx, byte[] server_pk, byte[] server_sk, byte[] client_pk);
and wraper string method
+ public static byte[] EncryptChaCha20(string message, byte[] nonce, byte[] key)
In your commit, there are some difference in indent style and file line ending. so it will make big diff on master.
I will post pone merge this commit on master, and I will ffind a way to apply 1.0.16, so it take a time to apply on your changes.
implemented the cryptokx* functions needed for keyexchange