CryptoPkg: Add PKCS5 PBKDF2 interface for password derivation.

Add one new API (Pkcs5HashPassword) to provide PKCS#5 v2.0 PBKDF2
support (Password based encryption key derivation function, specified
in RFC 2898).
Also update the Cryptest utility to include the new API testing (with
the test vector from RFC6070).

Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
This commit is contained in:
Qin Long
2016-11-01 10:38:36 +08:00
parent 72009c626d
commit a8f37449c7
11 changed files with 319 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
/** @file
Application for Cryptographic Primitives Validation.
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -84,6 +84,18 @@ ValidateCryptRsa2 (
VOID
);
/**
Validate UEFI-OpenSSL PKCS#5 PBKDF2 Interface.
@retval EFI_SUCCESS Validation succeeded.
@retval EFI_ABORTED Validation failed.
**/
EFI_STATUS
ValidateCryptPkcs5Pbkdf2 (
VOID
);
/**
Validate UEFI-OpenSSL PKCS#7 Signing & Verification Interfaces.
@@ -144,4 +156,4 @@ ValidateCryptPrng (
VOID
);
#endif
#endif