PBKDF2 hash is not 32 bytes long on 64bit #34

Closed
tloris opened this Issue Apr 26, 2013 · 5 comments

Projects

None yet

3 participants

@tloris
tloris commented Apr 26, 2013

hey.
I'm new to all of this; I usually just use the tools provided by awesome ppl like you, so I'm not sure how relevant this is.

As part of a project I am working on your library was included, and there was no problem on 32bit python2.7 version at work. But at home I'm using a 64bit one and I kept getting
"RuntimeError("The PBKDF2 hash is not 32 bytes long. The pycrypto library might be missing.")".
I looked around a bit and figured the problem was the hash was too long, not to short, so I shortened it. It works (apparently) flawlessly now. Since couple of ppl on the same project had this problem, and didn't find any solution on the internet, I thought I might mention this here.

@FedericoCeratto
Owner

Thank you for your bug report. I replicated the problem on a 64bit system, however I got an empty hash, not a longer one.

@shie-erlich

i'm seeing a similar problem, but in my case - the hash is empty ('').
any hints? (running on a macbook air 10.8.3)

thanks!

@shie-erlich

not sure why, but uninstall and reinstall pycrypto seem to have fixed the problem
?!

@FedericoCeratto
Owner

Empty hashes are due to a bug in Beaker - see patch in bbangert/beaker#42
The fact that reinstalling pycrypto fixes that could be due to Beaker packaging/installation issues.

@FedericoCeratto
Owner

@tloris - how long was the hash that you got? Was Cork running on Jython? Can you provide steps to reproduce it?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment