Skip to content

1.1.0 Features To Add #2968

Closed
Closed

Description

@reaperhulk

Activity

  1. added this to the Fifteenth release milestone on Jun 4, 2016
  2. reaperhulk commented on Jun 5, 2016

    @reaperhulk
    MemberAuthor

    Okay, so as noted by David Benjamin poly1305 intentionally isn't separately exposed by OpenSSL. Accordingly, we can't expose it as a standalone MAC, but rather only as part of the RFC 7539 AEAD construct. I've modified the list to reflect this.

  3. Ayrx commented on Jun 11, 2016

    @Ayrx
    Contributor

    Just a note so there isn't any duplication of efforts. I have WIP code going for both scrypt and blake2. I'll open up PRs once the other 1.1.0 stuff (mainly #2826) lands.

  4. reaperhulk commented on Jun 11, 2016

    @reaperhulk
    MemberAuthor

    I've actually got all the blake2 code sitting around already. The open question is how much of the blake2 API do we want to have locked behind NotImplementedError for now.

    scrypt I'll happily let you take :)

  5. alex commented on Jun 11, 2016

    @alex
    Member

    I think we shouldn't land anything that depends on 1.1.0 features until
    1.1.0 is out and in our CI. Feel free to send all the PRs you want though,
    we can use those as the place to discuss the API.

    On Sat, Jun 11, 2016 at 12:11 PM, Paul Kehrer [email protected]
    wrote:

    I've actually got all the blake2 code sitting around already. The open
    question is how much of the blake2 API do we want to have locked behind
    NotImplementedError for now.

    scrypt I'll happily let you take :)

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #2968 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe/AAADBMPGqWEr7xFGTozj5K3oMXsQtRtTks5qKt5GgaJpZM4IuObs
    .

    "I disapprove of what you say, but I will defend to the death your right to
    say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
    "The people's good is the highest law." -- Cicero
    GPG Key fingerprint: D1B3 ADC0 E023 8CA6

  6. Ayrx commented on Jun 11, 2016

    @Ayrx
    Contributor

    @reaperhulk Ah cool. :)

    @alex Yeah, no arguments there.

  7. ria4 commented on Aug 16, 2016

    @ria4

    Is there any plan to add support for CCM encryption mode?

    I've been working on a TLS implementation for scapy (https://github.com/secdev/scapy). Up to now I've been using pycrypto, which offers CCM support but only when building out of the source repository. And we're planning on switching to cryptography.

    Along with ChaCha20+Poly1305, I believe CCM would be a really valuable addition to the project. It would enable python users to cover every cipher suite specified for TLS 1.3.

  8. reaperhulk commented on Aug 17, 2016

    @reaperhulk
    MemberAuthor

    We've talked a bit in the past about CCM #1141 (comment). The primary issue is the length prefixing requiring you to know the length of your data before encrypting. Our current APIs assume a streaming interface (which was a design mistake for AEAD modes but that's what we have for now). If we build a "one shot" AEAD API (provide entire payload, get back encrypted blob, no streaming) then we can talk about whether CCM should be supported.

  9. ria4 commented on Aug 18, 2016

    @ria4

    Thanks for pointing out the issue. Indeed adding CCM support entails some work more convoluted than I expected. For now, I think that we'd be better off using pycryptodome (a fork from pycrypto), as it provides the AEAD modes we need, among other things. Hopefully we could switch to cryptography for a later release.

  10. reaperhulk commented on Sep 3, 2016

    @reaperhulk
    MemberAuthor

    Okay, AEAD API proposal time...

    To encrypt:

    encrypt(plaintext, additional_data, AEADAlgorithm(*args), backend) -> (ciphertext, tag)
    

    To decrypt:

    decrypt(ciphertext, additional_data, AEADAlgorithm(*args), tag, backend) -> plaintext or exception
    

    Where AEADAlgorithm is an interface attached classes that instantiate like:

    • ChaCha20Poly1305(key)
    • AESOCB(key, nonce)
    • AESGCM(key, iv)

    This closely mimics the low level AEAD API that BoringSSL implements.

    This has the virtue of not being exposing unauthenticated plaintext in any situation, so it's generally a superior API to our current streaming API (which only supports AEAD via GCM anyway). We would probably want to update our docs to discourage the use of our streaming interface and steer users toward the AEAD API where possible (and of course Fernet if they can).

    Disadvantages

    The creation of a new interface that combines cipher + mode (or cipher + MAC in the case of chacha20poly1305) is a shift from our current cipher interface that emphasizes composability.

    Additionally, this would be a hazmat API as it has no protection against nonce/iv misuse nor does it specify an output format (unlike Fernet).

  11. reaperhulk commented on Sep 3, 2016

    @reaperhulk
    MemberAuthor

    Oh, forgot to mention that an AEAD API would allow us to support CCM, which we have a user request for above :)

  12. 19 remaining items

  13. gpotter2 commented on Mar 23, 2017

    @gpotter2
    Contributor

    I meant ChaCha20Poly1305.
    Cool, so that's pretty soon... nice to hear :)

    Thanks

    And what about CCM ?

  14. reaperhulk commented on Mar 24, 2017

    @reaperhulk
    MemberAuthor

    CCM would come after. If we implement per-construct AEAD interfaces instead of trying to build a generic one then CCM (hopefully) becomes an easier problem.

  15. added this to the Nineteenth Release milestone on Mar 24, 2017
  16. gpotter2 commented on Mar 24, 2017

    @gpotter2
    Contributor

    Thanks a lot !

  17. reaperhulk commented on Jun 4, 2017

    @reaperhulk
    MemberAuthor

    I'm going to go ahead and close this issue and open separate ones for ChaCha and CCM (yuck). OCB is off the table until someone provides a use case. refs #3667

  18. ThomasWaldmann commented on Nov 16, 2018

    @ThomasWaldmann

    I heard good things about OCB, faster than GCM, no patent issue any more for opensource projects.

    GCM otoh seems to cause bad feelings for cryptographers, they consider it a fragile construction.

    Recently the was some breakage for OCB2 though - but guess this does not affect OCB(1), right?

    The use case is just to have a "single pass" AEAD cipher, with HW acceleration in popular cpus, without fragility. Considering it as a candidate for borgbackup.

  19. reaperhulk commented on Nov 16, 2018

    @reaperhulk
    MemberAuthor

    OCB1 and 3 are not affected by the OCB2 break. OpenSSL implements OCB3. There is no hardware acceleration for OCB outside of the core AES acceleration, although it is a fast and elegant construction in general.

    Unfortunately, OCB still has some patent considerations (grant here: https://wiki.openssl.org/images/6/66/OCB-patent-grant-OpenSSL.pdf). That should clear our users, but I'm not a huge fan of having this complexity hidden in a random mode we implement.

  20. ThomasWaldmann commented on Nov 17, 2018

    @ThomasWaldmann

    Well, the benchmarks i saw, showed it being significantly faster than GCM.
    Also, no bad feelings, so it sounded like a winner.

    As the OCB implementation is in openssl, I guess it is not a problem for cryptography or borgbackup and users can still decide whether they want to use it or not.

    Considering single-pass, accelerated AEAD modes, there are no other good options, right?

  21. locked as resolved and limited conversation to collaborators on Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions