public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/2] crypto: allow NULL 'ad' to aes_siv_decrypt
@ 2021-12-15 17:41 James Prestwood
  0 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2021-12-15 17:41 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

---
 src/crypto.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/crypto.c b/src/crypto.c
index 7d5e42fe..475ebf36 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -330,7 +330,9 @@ bool aes_siv_encrypt(const void *key, size_t key_len, const void *in,
 	struct iovec iov[num_ad + 1];
 	uint8_t v[16];
 
-	memcpy(iov, ad, sizeof(struct iovec) * num_ad);
+	if (ad)
+		memcpy(iov, ad, sizeof(struct iovec) * num_ad);
+
 	iov[num_ad].iov_base = (void *)in;
 	iov[num_ad].iov_len = in_len;
 	num_ad++;
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] crypto: allow NULL 'ad' to aes_siv_decrypt
@ 2021-12-15 17:48 Denis Kenzior
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2021-12-15 17:48 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

Hi James,

On 12/15/21 11:41 AM, James Prestwood wrote:
> ---
>   src/crypto.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 

Both applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] crypto: allow NULL 'ad' to aes_siv_decrypt
@ 2021-12-16 18:00 James Prestwood
  0 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2021-12-16 18:00 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

---
 src/crypto.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/crypto.c b/src/crypto.c
index 475ebf36..cd50d6f7 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -389,7 +389,9 @@ bool aes_siv_decrypt(const void *key, size_t key_len, const void *in,
 	if (in_len < 16)
 		return false;
 
-	memcpy(iov, ad, sizeof(struct iovec) * num_ad);
+	if (ad)
+		memcpy(iov, ad, sizeof(struct iovec) * num_ad);
+
 	iov[num_ad].iov_base = (void *)out;
 	iov[num_ad].iov_len = in_len - 16;
 	num_ad++;
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] crypto: allow NULL 'ad' to aes_siv_decrypt
@ 2021-12-16 18:20 Denis Kenzior
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2021-12-16 18:20 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

On 12/16/21 12:00, James Prestwood wrote:
> ---
>   src/crypto.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 

Applied, thanks.

I amended the description of your earlier patch to refer to 'aes_siv_encrypt'

Regards,
-Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-16 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-16 18:20 [PATCH 1/2] crypto: allow NULL 'ad' to aes_siv_decrypt Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2021-12-16 18:00 James Prestwood
2021-12-15 17:48 Denis Kenzior
2021-12-15 17:41 James Prestwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox