Subject: Re: [quicwg/base-drafts] ChaCha inputs (#2171)

From: Nick Harper <[email-masked]>
Date: Thu, 05 Sep 2019 13:22:06 -0700

The API I'm using for ChaCha20 takes a const uint8_t nonce[12], and I currently pass in a pointer (offset by 4 bytes) to the sample as the nonce, without doing any endianness conversions. I'm in favor of clarifying the language for this input. (Given that this has the design label instead of the editorial label, my design opinion is to keep with the simple thing of passing the bytes directly from the sample to the nonce input of ChaCha20 and not do any endianness conversions. I'm assuming that other crypto libraries have similar APIs though.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2171#issuecomment-528565409

---

From: Martin Thomson <[email-masked]>
Date: Thu, 05 Sep 2019 17:10:17 -0700

The API I have takes `const uint8_t nonce[12], uint32_t counter`.  PKCS#11 takes pointers just like the API @nharper refers to (but it fails to specify the endianness, which is a critical oversight, compounded by the fact that the size of the counter can vary).

I suspect that - as @kazuho says - the right idea is to note that ChaCha20 will interpret the nonce as three little-endian integers and that the counter might be expressed as a byte sequence that is then (probably) interpreted as a little-endian integer.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2171#issuecomment-528654401

---

From: Martin Thomson <[email-masked]>
Date: Tue, 10 Sep 2019 15:07:49 -0700

Closed #2171 via #2990.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2171#event-2623845362

---

From: Martin Thomson <[email-masked]>
Date: Tue, 10 Sep 2019 18:31:32 -0700

Reopened #2171.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2171#event-2624138587

---

From: Kazuho Oku <[email-masked]>
Date: Tue, 10 Sep 2019 18:50:00 -0700

I understand and appreciate this being marked as “design”, though I consider the text that landed in master as editorial, as it (in my view) ended as adding practical advice while retaining the definition we have had.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2171#issuecomment-530185207

---

From: Martin Thomson <[email-masked]>
Date: Tue, 10 Sep 2019 19:06:43 -0700

Yes, but as a design issue, we want to confirm that "no action" is the correct outcome.  It's cheap enough to do so.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2171#issuecomment-530188598

---

From: Martin Thomson <[email-masked]>
Date: Mon, 16 Sep 2019 16:00:46 -0700

Closed #2171.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2171#event-2638054870