bcgit / pc-dart

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

Add Threefish + Skein #20

Closed AKushWarrior closed 1 year ago

AKushWarrior commented 4 years ago

As of right now, AES is the only available block cipher. Adding other ciphers could help us in the vague sense that providing more secure primitives is never a bad thing. Threefish is generally regarded as being secure by a large margin.

On top of that, implementing Threefish would allow us to implement Skein as well, which is a well regarded hashing function. The same logic applies; Skein was a finalist (runner-up?) in the SHA-3 competition.

AKushWarrior commented 4 years ago

Implementation links: https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/engines/ThreefishEngine.java https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/digests/SkeinDigest.java

AKushWarrior commented 4 years ago

Since Threefish and Skein's implementations primarily use (signed) 64 bit integers, porting should largely be a 1:1, copy-paste type of situation.

AKushWarrior commented 4 years ago

I have some free time, but don't feel like doing any of the heftier stuff (documentation) yet. I'll get started on implementing these.

Ephenodrom commented 1 year ago

187