Re:Introducing Sodium, a new cryptographic library
by sneak on Wednesday March 06, 2013 @08:01PM
(#5335235)
Your key setup leaves a whole lot to be desired. (There's a very real reason that PBKDF2 exists.) Bad crypto libs like this are the EXACT reason that things like NaCl and KeyCzar were created.
Please don't do things like this.
PS: It's also not clear if you're doing the HMAC check in a time-invariant manner: https://github.com/jsdalton/secrets.py/blob/master/secrets/c...
See: http://codahale.com/a-lesson-in-timing-attacks/