Hide Forgot
Description of problem: I would like to request the addition of scrypt, rfc7914 [0] to NSS. Scrypt is designed as a key derivation function, and can be used as a password hashing mechanism. It uses both memory and cpu complexity to avoid hardware acceleration attacks. In many ways, it is similar to pbkdf2. The 389 DS project would like to be able to consume an interface similar to that in libscrypt: int libscrypt_scrypt(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p, /*@out@*/ uint8_t *buf, size_t buflen); This way, we do not have a complex procedure to call for password or data hashing, which will lower the risk of an implementation mistake causing a vulnerability. [0] https://tools.ietf.org/html/rfc7914
Any enhancement to the set of crypto algorithms supported by NSS will have to be requested and implemented by the upstream NSS development project. I couldn't fine an upstream bug, so nobody might have requested it yet. Who would like to file the upstream request? Bob, are you aware of anyone already working on scrypt at NSS upstream?
No one is working on scrypt upstream. We would have to file an upstream bug and probably assign someone to it.
Note that scrypt can also be used in PKCS#12 and PKCS#8 files; https://github.com/redhat-qe-security/keyfile-corpus/blob/master/rsa(2048%2Csha256)%2Cpkcs8(PBES2(scrypt(salt(8)%2CN(16384)%2Cr(8)%2Cp(1))%2Caes-256-cbc(IV(16))))%2Cpass(ascii).key https://github.com/redhat-qe-security/keyfile-corpus/blob/master/rsa(2048%2Csha256)%2Ccert%26key(PBES2(scrypt(salt(64)%2CN(16384)%2Cr(8)%2Cp(1))%2Caes-256-cbc(IV(16))))%2Cmac(sha512%2Csalt(64)%2Citer(1000000))%2Cpass(ascii).p12