From: Antonio Quartulli <a@unstable.cc>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
WireGuard mailing list <wireguard@lists.zx2c4.com>,
Netdev <netdev@vger.kernel.org>,
keyrings@vger.kernel.org,
linux-security-module <linux-security-module@vger.kernel.org>,
Antonio Quartulli <antonio@openvpn.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
David Howells <dhowells@redhat.com>,
Jarkko Sakkinen <jarkko@kernel.org>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH cryptodev] crypto: lib/chacha20poly1305 - allow users to specify 96bit nonce
Date: Tue, 17 Nov 2020 10:41:10 +0100 [thread overview]
Message-ID: <69c23c36-60fe-2676-d07a-67ce1f752dd1@unstable.cc> (raw)
In-Reply-To: <CAHmME9q8k26a9rn72KTfcJw0kJ0iMdob6BBsAsyYBzvfYjRtQQ@mail.gmail.com>
Hello,
On 17/11/2020 09:30, Jason A. Donenfeld wrote:
> Nack.
>
> This API is meant to take simple integers, so that programmers can use
> atomic64_t with it and have safe nonces. I'm also interested in
> preserving the API's ability to safely encrypt more than 4 gigs of
> data at once. Passing a buffer also encourages people to use
> randomized nonces, which isn't really safe. Finally, there are no
> in-tree users of 96bit nonces for this interface. If you're after a
> cornucopia of compatibility primitives, the ipsec stuff might be more
> to your fitting. Or, add a new simple function/api. But adding
> complexity to users of the existing one and confusing future users of
> it is a non-starter. It's supposed to be deliberately non-awful to
> use.
>
Thanks for explaining the ratio behind this API.
At first I thought this API wanted to take over the existing one, hence
my attempt of making it more generic and re-use it.
But I understand now this was not the goal.
I will stick to the classic crypto API then.
Best Regards,
p.s. I am curious about any use case you may have in mind for encrypting
more than 4GB in one go, as there are no users doing that right now.
--
Antonio Quartulli
next prev parent reply other threads:[~2020-11-17 9:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-17 2:18 Antonio Quartulli
2020-11-17 8:30 ` Jason A. Donenfeld
2020-11-17 9:41 ` Antonio Quartulli [this message]
2020-11-17 8:31 ` Ard Biesheuvel
2020-11-17 8:35 ` Jason A. Donenfeld
2020-11-17 9:45 ` Antonio Quartulli
2020-11-17 9:52 ` Ard Biesheuvel
2020-11-17 10:06 ` Antonio Quartulli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69c23c36-60fe-2676-d07a-67ce1f752dd1@unstable.cc \
--to=a@unstable.cc \
--cc=Jason@zx2c4.com \
--cc=antonio@openvpn.net \
--cc=dhowells@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=jarkko@kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).