[GCrypt] Implement PBKDF2 support
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Apr 2017 18:10:29 +0000 (18:10 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Apr 2017 18:10:29 +0000 (18:10 +0000)
commitb75e8898130df303751188f20ab857a133eb732a
treeeaaede32ada36010e9cc9fbecf62bc8dccd23f84
parent60016976c712d90d473fda84b1424abbb29ae4a4
[GCrypt] Implement PBKDF2 support
https://bugs.webkit.org/show_bug.cgi?id=170270

Reviewed by Michael Catanzaro.

Implement the CryptoAlgorithmPBKDF2::platformDeriveBits() functionality
for configurations that use libgcrypt. This is done by leveraging the
gcry_kdf_derive() API, using GCRY_KDF_PBKDF2 as the preferred KDF
along with the properly deducted SHA algorithm.

No new tests -- current ones cover this sufficiently, but are not yet
enabled due to other missing platform-specific SUBTLE_CRYPTO
implementations.

* crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:
(WebCore::gcryptDeriveBits):
(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp