bcgit / pc-dart

Pointy Castle - Dart Derived Bouncy Castle APIs
MIT License
237 stars 122 forks source link

AES CCM mode #64

Closed mneber closed 1 year ago

mneber commented 3 years ago

Sorry I should have posted this here not the pre fold repo.

Is there any plan to add CCM mode in the near future?

128 bit AES CCM is very common for Bluetooth. I need it for a project that I'm on now and can't find any dart plugin.

AKushWarrior commented 3 years ago

This project is heavily dependent on user pull requests. The original implementation (in BouncyCastle) is here: https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/modes/CCMBlockCipher.java

If people need this, please upvote the original post in this issue (at least) or implement it yourself (if you can).

AKushWarrior commented 3 years ago

If there's a significant need for it, I can take some time and port it. I might not have time for a month or so, though.

AKushWarrior commented 3 years ago

@mneber done. It's included in #77. You can add my fork of this repository as a git dependency if you need it urgently.

AKushWarrior commented 3 years ago

This was released in the latest update, which is labeled 3.0.0-nullsafety.2 on https://pub.dev and has code in a branch of this repository. As of right now, the algorithm is only available in the null-safe version of this library, but you can trivially port it to non-null-safety. @mwcw you can close this.