-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zxlhhyccc
committed
Nov 15, 2024
1 parent
f11eea9
commit 18bf50d
Showing
1 changed file
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ Signed-off-by: Zxl hhyccc <[email protected]> | |
#ifndef MBEDTLS_CAMELLIA_C | ||
--- a/src/aead.c | ||
+++ b/src/aead.c | ||
@@ -178,9 +178,14 @@ aead_cipher_encrypt(cipher_ctx_t *cipher_ctx, | ||
@@ -178,9 +178,14 @@ aead_cipher_encrypt(cipher_ctx_t *cipher | ||
case AES192GCM: | ||
case AES128GCM: | ||
|
||
|
@@ -91,7 +91,7 @@ Signed-off-by: Zxl hhyccc <[email protected]> | |
break; | ||
case CHACHA20POLY1305IETF: | ||
err = crypto_aead_chacha20poly1305_ietf_encrypt(c, &long_clen, m, mlen, | ||
@@ -226,8 +231,13 @@ aead_cipher_decrypt(cipher_ctx_t *cipher_ctx, | ||
@@ -226,8 +231,13 @@ aead_cipher_decrypt(cipher_ctx_t *cipher | ||
// Otherwise, just use the mbedTLS one with crappy AES-NI. | ||
case AES192GCM: | ||
case AES128GCM: | ||
|
@@ -105,7 +105,7 @@ Signed-off-by: Zxl hhyccc <[email protected]> | |
break; | ||
case CHACHA20POLY1305IETF: | ||
err = crypto_aead_chacha20poly1305_ietf_decrypt(p, &long_plen, NULL, m, mlen, | ||
@@ -724,9 +734,26 @@ aead_key_init(int method, const char *pass, const char *key) | ||
@@ -724,9 +734,26 @@ aead_key_init(int method, const char *pa | ||
if (method >= CHACHA20POLY1305IETF) { | ||
cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t)); | ||
cipher->info = cipher_info; | ||
|
@@ -134,7 +134,7 @@ Signed-off-by: Zxl hhyccc <[email protected]> | |
} | ||
--- a/src/crypto.c | ||
+++ b/src/crypto.c | ||
@@ -103,7 +103,7 @@ crypto_md5(const unsigned char *d, size_t n, unsigned char *md) | ||
@@ -103,7 +103,7 @@ crypto_md5(const unsigned char *d, size_ | ||
if (md == NULL) { | ||
md = m; | ||
} | ||
|
@@ -145,7 +145,7 @@ Signed-off-by: Zxl hhyccc <[email protected]> | |
#else | ||
--- a/src/stream.c | ||
+++ b/src/stream.c | ||
@@ -174,7 +174,11 @@ cipher_nonce_size(const cipher_t *cipher) | ||
@@ -174,7 +174,11 @@ cipher_nonce_size(const cipher_t *cipher | ||
if (cipher == NULL) { | ||
return 0; | ||
} | ||
|
@@ -169,7 +169,7 @@ Signed-off-by: Zxl hhyccc <[email protected]> | |
} | ||
|
||
const cipher_kt_t * | ||
@@ -645,9 +653,26 @@ stream_key_init(int method, const char *pass, const char *key) | ||
@@ -645,9 +653,26 @@ stream_key_init(int method, const char * | ||
if (method == SALSA20 || method == CHACHA20 || method == CHACHA20IETF) { | ||
cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t)); | ||
cipher->info = cipher_info; | ||
|
@@ -196,5 +196,3 @@ Signed-off-by: Zxl hhyccc <[email protected]> | |
} else { | ||
cipher->info = (cipher_kt_t *)stream_get_cipher_type(method); | ||
} | ||
-- | ||
2.17.1 |