add chacha20-ietf support with updated libsscrypto
ChaCha20 with an extended (96 bit) nonce and a 32-bit counter has been implemented as crypto_stream_chacha20_ietf() from LibSodium 1.0.4 Please refer to https://tools.ietf.org/html/rfc7539 for details. Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
@@ -40,6 +40,9 @@ namespace Shadowsocks.Encryption
|
||||
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static int crypto_stream_chacha20_xor_ic(byte[] c, byte[] m, ulong mlen, byte[] n, ulong ic, byte[] k);
|
||||
|
||||
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static int crypto_stream_chacha20_ietf_xor_ic(byte[] c, byte[] m, ulong mlen, byte[] n, uint ic, byte[] k);
|
||||
|
||||
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static void ss_sha1_hmac_ex(byte[] key, uint keylen,
|
||||
byte[] input, int ioff, uint ilen,
|
||||
|
||||
Reference in New Issue
Block a user