New BaH.Crypto Release
BlitzMax Forums/Brucey's Modules/New BaH.Crypto Release
| ||
Version 1.03 adds AES encryption, and built-in stream support for message digests. Windows users will probably need a copy of OpenSSL. Some more information is available here and can be downloaded from here. |
| ||
Thanks for adding this Brucey! Just a note to those using this mod for AES. You can test your output against a standardized list to make sure you are using the mod correctly. AES Known Answer Test (KAT) Vectors can be found on a link on this page. Two examples for AES192 are: KEY = 000000000000000000000000000000000000000000000000 IV = 00000000000000000000000000000000 PLAINTEXT = 80000000000000000000000000000000 CIPHERTEXT = 6cd02513e8d4dc986b4afe087a60bd0c COUNT = 127 KEY = 000000000000000000000000000000000000000000000000 IV = 00000000000000000000000000000000 PLAINTEXT = ffffffffffffffffffffffffffffffff CIPHERTEXT = b13db4da1f718bc6904797c82bcf2d32 Also, just a heads up that according to this post, there apparently exists a decent attack for AES-256. Windows users will probably need a copy of OpenSSL. If you happen to be using a PostgreSQL db (and aren't we all?), then the .dll's you need will already be onboard. :-) Finally, if you are feeling lazy and just want to AES some strings, the following code passes the tests above, *seems* to work and doesn't appear to leak (at least on my XP tests). Disclaimer: I don't claim to understand AES - I've just fuddled my way through with this. If you use it, make sure you test it thoroughly! Don't forget to pass your own iv (initialisation vector) and pass! Example: |
| ||
I use this one: http://www.blitzbasic.com/codearcs/codearcs.php?code=2292 From what i've read, its not as susceptible to attack as aes and some others. |