]>
Commit | Line | Data |
---|---|---|
22ac5cc9 SA |
1 | /** @file\r |
2 | RSA-PSS Asymmetric Cipher Wrapper Implementation over OpenSSL.\r | |
3 | \r | |
4 | This file does not provide real capabilities for following APIs in RSA handling:\r | |
5 | 1) RsaPssVerify\r | |
6 | \r | |
7 | Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r | |
8 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
9 | \r | |
10 | **/\r | |
11 | \r | |
12 | #include "InternalCryptLib.h"\r | |
13 | \r | |
14 | /**\r | |
15 | Verifies the RSA signature with RSASSA-PSS signature scheme defined in RFC 8017.\r | |
16 | Implementation determines salt length automatically from the signature encoding.\r | |
17 | Mask generation function is the same as the message digest algorithm.\r | |
18 | Salt length should atleast be equal to digest length.\r | |
19 | \r | |
20 | @param[in] RsaContext Pointer to RSA context for signature verification.\r | |
21 | @param[in] Message Pointer to octet message to be verified.\r | |
22 | @param[in] MsgSize Size of the message in bytes.\r | |
23 | @param[in] Signature Pointer to RSASSA-PSS signature to be verified.\r | |
24 | @param[in] SigSize Size of signature in bytes.\r | |
25 | @param[in] DigestLen Length of digest for RSA operation.\r | |
26 | @param[in] SaltLen Salt length for PSS encoding.\r | |
27 | \r | |
28 | @retval TRUE Valid signature encoded in RSASSA-PSS.\r | |
29 | @retval FALSE Invalid signature or invalid RSA context.\r | |
30 | \r | |
31 | **/\r | |
32 | BOOLEAN\r | |
33 | EFIAPI\r | |
34 | RsaPssVerify (\r | |
35 | IN VOID *RsaContext,\r | |
36 | IN CONST UINT8 *Message,\r | |
37 | IN UINTN MsgSize,\r | |
38 | IN CONST UINT8 *Signature,\r | |
39 | IN UINTN SigSize,\r | |
40 | IN UINT16 DigestLen,\r | |
41 | IN UINT16 SaltLen\r | |
42 | )\r | |
43 | {\r | |
44 | ASSERT (FALSE);\r | |
45 | return FALSE;\r | |
46 | }\r |