Hi there,
I'm wondering about the state of the Play2.1's Crypto API. I can't
find anything in the documentation so I'm looking at the source [1].
I'm wondering if the lack of documentation means that there is a plan
to deprecate (or just change) the API (or part of it) at some point.
Question: how stable is this API?
Also, I'm not an expert in crypto and security, so I'm wondering if
this is implementing what we think is now the state of the art for
storing encoded password. The intended usage may be different (Crypto
is used in the Http.scala). For example, I've found an old thread [2]
on this mailing list stating that "Crypto.passwordHash() is not secure
for hashing passwords", although I can't find passwordHash any longer.
Some people then advised (and proposed some code) that involves using
jBCrypt [3]. I've found similar concerns on the Web and Blowfish would
often be cited. Question: what is the Play Team's advice on these
concerns?
Last remark, I see two sets of functions in the Crypto API, one
involving HmacSHA1 and one with AES. The CryptoSpec [4] only
demonstrates the use of AES. I think I understand that I should use
Crypto.sign* and then the AES encrypt/decrypt functions to store user
passwords, but I'd like to know the rationale. Also, if this is the
case, maybe it would be good to add in the API a couple of dual
functions that would be specific to passwords and checking if they are
equal. That would dissipate many questions about how to use the Crypto
API. Question: where are these functions meant to be used?
Alexandre.
[1]
https://github.com/playframework/Play20/blob/master/framework/src/play/src/main/scala/play/api/libs/Crypto.scala
[2]
https://groups.google.com/forum/#!topic/play-framework/9KIUwWBjudQ/discussion
[3]
http://www.mindrot.org/projects/jBCrypt/
[4]
https://github.com/playframework/Play20/blob/master/framework/src/play/src/test/scala/play/api/libs/CryptoSpec.scala