digitalmars.D.learn - AES in dlang?
- Andy Valencia (7/7) Feb 11 I was wondering about an @safe dlang version of AES, and just
- IchorDev (6/13) Feb 15 I made this tiny-AES port a while ago:
- Dejan Lekic (5/7) Feb 18 I am guessing you probably saw the "crypto" package and it does
- Andy Valencia (5/12) Feb 18 I explicitly wanted @safe, and thus @system and pointer mechanics
I was wondering about an safe dlang version of AES, and just couldn't find one. (Well, there was one, but without any of the nonce/IV stuff.) I know many will be perfectly happy with calls into C libraries, but for those who want to lean into D's many safety features, I've ported a "Tiny AES" and begun wiring up testing for it: https://sources.vsta.org:7100/dlang/file?name=tiny/aes.d&ci=tip
Feb 11
On Wednesday, 12 February 2025 at 00:20:02 UTC, Andy Valencia wrote:I was wondering about an safe dlang version of AES, and just couldn't find one. (Well, there was one, but without any of the nonce/IV stuff.) I know many will be perfectly happy with calls into C libraries, but for those who want to lean into D's many safety features, I've ported a "Tiny AES" and begun wiring up testing for it: https://sources.vsta.org:7100/dlang/file?name=tiny/aes.d&ci=tipI made this tiny-AES port a while ago: https://code.dlang.org/packages/encrypt It's fully ` safe`; it uses structs rather than classes, so no allocations are required; and there are already various unittests.
Feb 15
On Wednesday, 12 February 2025 at 00:20:02 UTC, Andy Valencia wrote:I was wondering about an safe dlang version of AES, and just couldn't find one. (Well, there was one, but without any ofI am guessing you probably saw the "crypto" package and it does not work the way you want it, right? Link: https://github.com/shove70/crypto
Feb 18
On Tuesday, 18 February 2025 at 10:20:44 UTC, Dejan Lekic wrote:On Wednesday, 12 February 2025 at 00:20:02 UTC, Andy Valencia wrote:I explicitly wanted safe, and thus system and pointer mechanics must be avoided. But it's a very tidy implementation, and I've added it to my collection. Thank you! AndyI was wondering about an safe dlang version of AES, and just couldn't find one. (Well, there was one, but without any ofI am guessing you probably saw the "crypto" package and it does not work the way you want it, right? Link: https://github.com/shove70/crypto
Feb 18