Bug 1371322 - RFE: pbkdf2 password hash interface for NSS
Summary: RFE: pbkdf2 password hash interface for NSS
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Bob Relyea
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1457789 1457794
TreeView+ depends on / blocked
 
Reported: 2016-08-29 22:32 UTC by wibrown@redhat.com
Modified: 2019-04-02 22:15 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1468075 (view as bug list)
Environment:
Last Closed: 2017-07-06 00:28:57 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description wibrown@redhat.com 2016-08-29 22:32:56 UTC
Description of problem:
The current implementation of pbkdf2 in NSS is highly targeted at the encryption key use case, where given a secret, the key is derived.

However, many sites use PBKDF2 for storing hashes of user passwords. This is due to the time factor in "repeating" the hash. This causes any potential attacker with bruteforce or rainbow table to have to expend a huge amount of work to attack the hashes.

Right now, in FIPS mode, NSS cannot be used to create hashes of passwords. Additionally, even in non-FIPS mode, the process is complex, fiddly, and prone to mistake. If the user of the library cannot use it correctly, this adds a potential weakness in the calling application. By having NSS implement this function wrapper as a whole, it can be implemented correctly, it can be verified, and it makes strong password hashing more acceptable to users of the NSS api. 

I would like to request that the authors of NSS add an interface such as:

SECStatus pbkdf2_hash(SECItem *salt, SECItem *pass, SECAlgorithmID *algid, PRUint32 rounds, SECItem *result);

Where:

salt is the salt to be combined with the password during hashing.
pass is the password material.
algid contains either SEC_OID_HMAC_SHA256, SEC_OID_HMAC_SHA1 or other relevant hash type.
rounds is the number of iterations of hashing to perform.
result is allocted by the function, containing a buffer of bytes that is the hash output. 

The function would return SECStatus to indicate success or failure. 

Thanks,


Note You need to log in before you can comment on or make changes to this bug.