]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Include/Library/BaseCryptLib.h
CryptoPkg: Add new hash algorithm ParallelHash256HashAll in BaseCryptLib.
[mirror_edk2.git] / CryptoPkg / Include / Library / BaseCryptLib.h
index f4bc7c0d73d9d570f6be408bf0aaee1f27d0b5af..7d1499350a495617f66e3280da071288df6ea12f 100644 (file)
@@ -4,7 +4,7 @@
   primitives (Hash Serials, HMAC, RSA, Diffie-Hellman, etc) for UEFI security\r
   functionality enabling.\r
 \r
-Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2022, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -753,6 +753,35 @@ Sha512HashAll (
   OUT  UINT8       *HashValue\r
   );\r
 \r
+/**\r
+  Parallel hash function ParallelHash256, as defined in NIST's Special Publication 800-185,\r
+  published December 2016.\r
+\r
+  @param[in]   Input            Pointer to the input message (X).\r
+  @param[in]   InputByteLen     The number(>0) of input bytes provided for the input data.\r
+  @param[in]   BlockSize        The size of each block (B).\r
+  @param[out]  Output           Pointer to the output buffer.\r
+  @param[in]   OutputByteLen    The desired number of output bytes (L).\r
+  @param[in]   Customization    Pointer to the customization string (S).\r
+  @param[in]   CustomByteLen    The length of the customization string in bytes.\r
+\r
+  @retval TRUE   ParallelHash256 digest computation succeeded.\r
+  @retval FALSE  ParallelHash256 digest computation failed.\r
+  @retval FALSE  This interface is not supported.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+ParallelHash256HashAll (\r
+  IN CONST VOID   *Input,\r
+  IN       UINTN  InputByteLen,\r
+  IN       UINTN  BlockSize,\r
+  OUT      VOID   *Output,\r
+  IN       UINTN  OutputByteLen,\r
+  IN CONST VOID   *Customization,\r
+  IN       UINTN  CustomByteLen\r
+  );\r
+\r
 /**\r
   Retrieves the size, in bytes, of the context buffer required for SM3 hash operations.\r
 \r