Getting SlowAES and RijndaelManaged class in .NET to play together

maybe I can help. I took your C# code and modified it slightly. The C# code I use, in its entirety, is: using System; using System.Security.Cryptography; public class Bob { internal static string FormatByteArray(byte[] b) { System.Text.StringBuilder sb1 = new System.Text.StringBuilder(); int i = 0; for (i = 0; i < b.Length; i++) { if … Read more

PBKDF2 using CommonCrypto on iOS

Here’s how i generate AES256 keys. The only interesting this is that i get CommonCrypto to estimate for me how many rounds to use. It seems pretty straightforwards. #import <CommonCrypto/CommonKeyDerivation.h> … // Makes a random 256-bit salt – (NSData*)generateSalt256 { unsigned char salt[32]; for (int i=0; i<32; i++) { salt[i] = (unsigned char)arc4random(); } return … Read more

Is there a SQL implementation of PBKDF2?

Here’s a dramatically faster PBKDF2/PKCS #5/RFC2898 implementation of PBKDF2(HMAC-SHA-512…, useful on SQL2012 and up, including StackOverflow and boundary size test vectors. Much of the speed increase is the usual precalculation of ipad and opad, reducing the number of hashing operations dramatically. The rest is normal code optimization, loop unrolling, and so on. USE tempdb; — … Read more