From: "Jason A. Donenfeld" <Jason@zx2c4.com> To: Eric Biggers <email@example.com> Cc: Linux Crypto Mailing List <firstname.lastname@example.org>, email@example.com, firstname.lastname@example.org, LKML <email@example.com>, Herbert Xu <firstname.lastname@example.org>, Paul Crowley <email@example.com>, Greg Kaiser <firstname.lastname@example.org>, Michael Halcrow <email@example.com>, Samuel Neves <firstname.lastname@example.org>, Tomer Ashur <email@example.com> Subject: Re: [RFC PATCH v2 00/12] crypto: Adiantum support Date: Mon, 22 Oct 2018 00:51:56 +0200 [thread overview] Message-ID: <CAHmME9oEQVTJ0xB+dpi8MKxohRfdogqnV+bN63EWTaoS5dE6Pw@mail.gmail.com> (raw) In-Reply-To: <20181021222341.GA742@sol.localdomain> Hey Eric, On Mon, Oct 22, 2018 at 12:23 AM Eric Biggers <firstname.lastname@example.org> wrote: > I started a branch based on Zinc: Nice to see. I'm heading to bed in a second, so I'll give this a thorough read-through tomorrow, but some preliminary notes on your comments: > For Poly1305, for now I decided to just use the existing functions, passing 0 > for the 16-byte element is added at the end. This causes some unnecessary > overhead, but it's not very much. It also results in a much larger size of > 'struct nhpoly1305_state', but that doesn't matter too much anymore either . >  Originally we were going to define Adiantum's hash function to be > Poly1305(message_length || tweak_length || tweak || NH(message)), which > would have made it desirable to export the Poly1305 state before NH, so that > it could be imported for the second hash step to avoid redundantly hashing > the message length and tweak. But later we changed it to > Poly1305(message_length || tweak) + Poly1305(NH(message)). Out of curiosity, why this change? > For ChaCha, I haven't yet updated all the "Zinc" assembly to support 12 rounds. > So far I've updated my ARM scalar implementation. I still don't see how you > expect people to maintain the files like chacha20-x86_64.S from which all > comments, register aliases, etc. were removed in comparison to the original > OpenSSL code. For at least the ARM and MIPS64 code, I think it will be feasible to import the .pl eventually. There's an open PR from Andy importing some of the necessary changes. For the x86_64, that might be a little trickier, but I can take another stab at it. > I don't see how dumping thousands of lines of undocumented, > generated assembly code into the kernel fits with your goals of "Zinc's focus is > on simplicity and clarity" and "inviting collaboration". It's not totally "undocumented" and totally "dumped"; that's a bit hyperbolic. But I can understand it's not as friendly as we'd like. I'll try to improve that. > Note that the > OpenSSL-derived assembly files still have an unclear license as well. Andy's been pretty clear about the CRYPTOGAMS aspect with me. But, as you pointed out on lkml and in the private thread, it hasn't yet migrated over to the CRYPTOGAMS repo. I don't think this is a cause for immediate concern, because it seems pretty certain it will wind up there soon enough. > (I haven't yet gotten around to adding > "zinc tests" for XChaCha12, though I did add "crypto tests". Note that "crypto > tests" are much easier to add, since all algorithms of the same type share a > common test framework -- not the case for Zinc.) Actually the advantage of not working with a winding abstraction layer is that specific tests can test particular aspects of particular primitives -- for example, by looking at different chunking patterns. It also enables you to write tests for internal, non-exported functions. > nor is there a documentation file > explaining things. Sorry, my bad on delaying that one. I'll be sure the Documentation/ stuff is ready before posting another series. > So please understand that until it's clear that Zinc is > ready, I still have to have Adiantum ready to go without Zinc, just in case. Makes sense. I do really appreciate you taking the time, though, to try this out with Zinc as well. Thanks for that. Regards, Jason
next prev parent reply other threads:[~2018-10-21 22:52 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-15 17:54 Eric Biggers 2018-10-15 17:54 ` [RFC PATCH v2 01/12] crypto: chacha20-generic - add HChaCha20 library function Eric Biggers 2018-10-19 14:13 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 02/12] crypto: chacha20-generic - add XChaCha20 support Eric Biggers 2018-10-19 14:24 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 03/12] crypto: chacha20-generic - refactor to allow varying number of rounds Eric Biggers 2018-10-19 14:25 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 04/12] crypto: chacha - add XChaCha12 support Eric Biggers 2018-10-19 14:34 ` Ard Biesheuvel 2018-10-19 18:28 ` Eric Biggers 2018-10-15 17:54 ` [RFC PATCH v2 05/12] crypto: arm/chacha20 - add XChaCha20 support Eric Biggers 2018-10-20 2:29 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 06/12] crypto: arm/chacha20 - refactor to allow varying number of rounds Eric Biggers 2018-10-20 3:35 ` Ard Biesheuvel 2018-10-20 5:26 ` Eric Biggers 2018-10-15 17:54 ` [RFC PATCH v2 07/12] crypto: arm/chacha - add XChaCha12 support Eric Biggers 2018-10-20 3:36 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 08/12] crypto: poly1305 - add Poly1305 core API Eric Biggers 2018-10-20 3:45 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 09/12] crypto: nhpoly1305 - add NHPoly1305 support Eric Biggers 2018-10-20 4:00 ` Ard Biesheuvel 2018-10-20 5:38 ` Eric Biggers 2018-10-20 15:06 ` Ard Biesheuvel 2018-10-22 18:42 ` Eric Biggers 2018-10-22 22:25 ` Ard Biesheuvel 2018-10-22 22:40 ` Eric Biggers 2018-10-22 22:43 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 10/12] crypto: arm/nhpoly1305 - add NEON-accelerated NHPoly1305 Eric Biggers 2018-10-20 4:12 ` Ard Biesheuvel 2018-10-20 5:51 ` Eric Biggers 2018-10-20 15:00 ` Ard Biesheuvel 2018-10-15 17:54 ` [RFC PATCH v2 11/12] crypto: adiantum - add Adiantum support Eric Biggers 2018-10-20 4:17 ` Ard Biesheuvel 2018-10-20 7:12 ` Eric Biggers 2018-10-23 10:40 ` Ard Biesheuvel 2018-10-24 22:06 ` Eric Biggers 2018-10-30 8:17 ` Herbert Xu 2018-10-15 17:54 ` [RFC PATCH v2 12/12] fscrypt: " Eric Biggers 2018-10-19 15:58 ` [RFC PATCH v2 00/12] crypto: " Jason A. Donenfeld 2018-10-19 18:19 ` Paul Crowley 2018-10-20 3:24 ` Ard Biesheuvel 2018-10-20 5:22 ` Eric Biggers [not found] ` <email@example.com> 2018-10-22 11:20 ` Tomer Ashur 2018-10-19 19:04 ` Eric Biggers 2018-10-20 10:26 ` Milan Broz 2018-10-20 13:47 ` Jason A. Donenfeld 2018-11-16 21:52 ` Eric Biggers 2018-11-17 10:29 ` Milan Broz 2018-11-19 19:28 ` Eric Biggers 2018-11-19 20:05 ` Milan Broz 2018-11-19 20:30 ` Jason A. Donenfeld 2018-10-21 22:23 ` Eric Biggers 2018-10-21 22:51 ` Jason A. Donenfeld [this message] 2018-10-22 17:17 ` Paul Crowley
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=CAHmME9oEQVTJ0xB+dpi8MKxohRfdogqnV+bN63EWTaoS5dE6Pw@mail.gmail.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [RFC PATCH v2 00/12] crypto: Adiantum support' \ /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
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).