Skip to content

Missing block ciphers #1

Open
Open

Description

@newpavlov

List of "would be nice to have" block ciphers:

Activity

  1. tvladyslav commented on Jan 6, 2017

    @tvladyslav
  2. newpavlov commented on Jan 7, 2017

    @newpavlov
    MemberAuthor

    Missed it for some reason while compiling the list. Added Speck and Simon to it.

  3. k3d3 commented on Jan 11, 2017

    @k3d3

    Is Rijndael/AES being covered?

  4. newpavlov commented on Jan 11, 2017

    @newpavlov
    MemberAuthor

    AES is present in the rust-crypto codebase, so it's already "implemented", this is why I haven't included it into this list. But it's not the easiest code to work with and better implementations exist (e.g. one in the ring), so for now it's not a highest priority for me.

  5. gsingh93 commented on Jan 18, 2017

    @gsingh93
    Contributor

    I'm claiming DES, just need a bit of time to finish up Grostl over in the hashes repo before starting it.

  6. Trojan295 commented on Apr 17, 2017

    @Trojan295
    Contributor

    I started to work on the RC2 cipher.

  7. Trojan295 commented on Apr 18, 2017

    @Trojan295
    Contributor

    BTW. What about modes of operation for the block ciphers (CBC, OFB, etc.)? In this repo we have only the raw block ciphers. How do we progress to make them usable in different modes?

  8. newpavlov commented on Apr 19, 2017

    @newpavlov
    MemberAuthor

    @Trojan295
    Sorry for the late answer. They will be implemented generically, though not sure if they should be placed here or in the traits repo, also I haven't yet decided on how exactly API should look like. We will probably need some kind of generic trait which will unite block ciphers under different modes of operation and stream ciphers.

  9. Trojan295 commented on Apr 28, 2017

    @Trojan295
    Contributor

    I will start working on the Serpent implementation.

  10. link2xt commented on Jun 12, 2017

    @link2xt
    Contributor

    Working on twofish, PR #7

    It is used in passwordsafe password manager, I wanted to port it to Rust but twofish package on crates.io seems to be reserved for this project and there is no implementation yet.

  11. dignifiedquire commented on Nov 8, 2018

    @dignifiedquire
    Member

    Implemented Cast5 in #36

  12. WildCryptoFox commented on Sep 20, 2019

    @WildCryptoFox

    OCB3, a solid single-pass high-performance CAESAR candidate, could do with a Rust implementation.

    The ciphertext is expanded by a variable length tag (whose tag length is committed). Only slightly slower than unauthenticated CTR, OCB3 could make a useful alternative when the costs of nonce-misuse resistance of HCTR or SIV are too high for an application (doubtful but nice to have). OCB3 does not resist nonce-misuse, nor does it aim for beyond birthday bound security.

    The biggest issue harming OCB's deployment is its patent; but Rogaway has public free licenses available since 2013 and is open to negotiating additional licenses if needed.

    License 1 — License for Open-Source Software Implementations of OCB (Jan 9, 2013)
    Under this license, you are authorized to make, use, and distribute open-source software implementations of OCB. This license terminates for you if you sue someone over their open-source software implementation of OCB claiming that you have a patent covering their implementation.

    License 2 — General License for Non-Military Software Implementations OCB (Jan 10, 2013).
    This license does not authorize any military use of OCB. Aside from military uses, you are authorized to make, use, and distribute (1) any software implementation of OCB and (2) non-software implementations of OCB for noncommercial or research purposes. You are required to include notice of this license to users of your work so that they are aware of the prohibition against military use. This license terminates for you if you sue someone over an implementation of OCB authorized by this license claiming that you have a patent covering their implementation.

  13. tarcieri commented on Sep 20, 2019

    @tarcieri
    Member

    Unfortunately Rogaway's patents aren't the only ones that matter:

    Jutla (IBM)— 6,963,976, 7,093,126, and 8,107,620—and of Gligor and Donescu (VDG)—6,973,187.

    https://web.cs.ucdavis.edu/~rogaway/ocb/patent-jutla-1.pdf
    https://web.cs.ucdavis.edu/~rogaway/ocb/patent-jutla-2.pdf
    https://web.cs.ucdavis.edu/~rogaway/ocb/patent-jutla-3.pdf
    https://web.cs.ucdavis.edu/~rogaway/ocb/patent-gligor-1.pdf

  14. WildCryptoFox commented on Sep 21, 2019

    @WildCryptoFox

    Gligor and Donescu (VDG) and Jutla (IBM) are inventors (owners) on US patents 6,963,976, 6,973,187, 7,093,126, and 8,107,620, all which concern AE but which may or may not apply to OCB.

    "may or may not" uh. When even the authors of the mode doesn't know. :/

  15. 5 remaining items

  16. tarcieri commented on Apr 7, 2021

    @tarcieri
    Member

    AES is effectively a subset of Rijndael, so if we were to support it, it would probably make sense for it to either be part of the aes crate or reuse parts of it (e.g. making some of the private API public under a special feature flag)

    However, it's a bit tricky because our implementation is currently heavily specialized to AES and there are multiple backends, all of which would need to be modified to support a more general Rijndael. As an example, the number of rounds varies only with the key size in AES, whereas in the more general Rijndael it varies with either/both the key size and block size.

    It's something we could potentially do although I would want to be careful that we don't overcomplicate or otherwise harm the AES implementation by doing so, which might be tricky.

  17. sorairolake commented on Dec 15, 2021

    @sorairolake
    Contributor

    Implemented Camellia in #293.

  18. lumag commented on Oct 5, 2022

    @lumag
    Contributor

    ARIA implementation: #340

  19. pinned this issue on Oct 11, 2022
  20. sorairolake commented on May 14, 2024

    @sorairolake
    Contributor

    @newpavlov @tarcieri Why isn't speck-cipher crate (Speck) published yet?

  21. tarcieri commented on May 16, 2024

    @tarcieri
    Member

    @sorairolake unfortunately only @newpavlov currently has access to publish it.

    I would suggest we publish a v0.0.1 based on 8b1499c, since the current master is on the newest prerelease cipher crate.

  22. newpavlov commented on May 16, 2024

    @newpavlov
    MemberAuthor

    Oh, we have indeed forgot to publish the Speck crate (I think we were hoping for potential transfer of the speck name). I've added the block ciphers group to owners of the speck-cipher crate.

  23. tarcieri commented on May 16, 2024

    @tarcieri
    Member
  24. added a commit that references this issue on Jul 29, 2024
  25. OctopusET commented on Feb 17, 2026

    @OctopusET

    https://en.wikipedia.org/wiki/LEA_(cipher)

    Can we add LEA? I'm working on that

  26. newpavlov commented on Feb 18, 2026

    @newpavlov
    MemberAuthor

    @OctopusET
    There is an existing implementation: https://github.com/sitd2813/lea-rust I will ask whether the owner is open to transferring it to us.

  27. sorairolake commented on Feb 25, 2026

    @sorairolake
    Contributor

    I implemented Simon in #523.

  28. sorairolake commented on Apr 13, 2026

    @sorairolake
    Contributor

    I think it would be good to add an implementation of the CLEFIA block cipher as described in RFC 6114 to this project in the future. This block cipher is the one of three 128-bit block ciphers listed on the Candidate Recommended Ciphers List by the Japanese Government's CRYPTREC as of April 2026.

    However, as of 2012, this block cipher was protected by intellectual property rights and could not be implemented royalty-free.12 In other words, at least at that time, it was not licensed under a royalty-free, reasonable and non-discriminatory license to all implementers. I'm unaware of the current intellectual property rights status of it.

    I previously implemented the Camellia block cipher as described in RFC 3713 and the KCipher-2 stream cipher as described in RFC 7008 in pure Rust. Before implementing these ciphers, I confirmed that they were licensed under royalty-free, reasonable and non-discriminatory licenses to all implementers.3456

    Therefore, I believe that this block cipher can only be implemented as FOSS after it has been definitively confirmed that all intellectual property rights to it have expired.

    Footnotes

    1. Sony Corporation's Statement about IPR related to RFC 6114 ↩

    2. 知的財産権の使用の権利に係る確認書 ↩

    3. Intellectual Property Information ↩

    4. 知的財産権の使用の権利に係る確認書 ↩

    5. KDDI Corporation's Statement about IPR related to draft-kiyomoto-kcipher2-06 ↩

    6. 知的財産権の使用の権利に係る確認書 ↩

  29. tarcieri commented on Apr 14, 2026

    @tarcieri
    Member

    @sorairolake we probably want to avoid any constructions with IPR concerns

  30. randombit commented on Jun 20, 2026

    @randombit
    Contributor

    Any interest in SHACAL2? Approved by NESSIE and the best known attack breaks 44 of 64 rounds using 2^223 related key chosen ciphertexts with 2^497 complexity. Any realistic attack on it probably implies a break of SHA-256. Admittedly a bit obscure but has many good points - 256 bit block (so birthday problem type issues that can apply to 128-bit ciphers are a complete non-issue), ARX style ciphers are trivially constant time and easy to run as SIMD, can use SHA-256 instructions (SHA-NI/ARMv8) for the encryption direction, and even a baseline scalar version is quite fast.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions