PKCS #7 message decryption. More...
Go to the source code of this file.
Functions | |
error_t | pkcs7DecryptEnvelopedData (const Pkcs7EnvelopedData *envelopedData, const X509CertInfo *recipientCertInfo, const void *recipientPrivateKey, uint8_t *plaintext, size_t *plaintextLen) |
Decrypt enveloped-data content. More... | |
error_t | pkcs7DecryptKey (const Pkcs7RecipientInfo *recipientInfo, const void *recipientPrivateKey, uint8_t *plaintext, size_t *plaintextLen) |
Perform key decryption. More... | |
error_t | pkcs7DecryptData (const Pkcs7EncryptedContentInfo *encryptedContentInfo, const uint8_t *key, size_t keyLen, uint8_t *plaintext, size_t *plaintextLen) |
Perform data decryption. More... | |
error_t | pkcs7FindRecipient (const Pkcs7RecipientInfos *recipientInfos, const X509CertInfo *recipientCertInfo, Pkcs7RecipientInfo *recipientInfo) |
Search a list of per-recipient informations for a given recipient. More... | |
Detailed Description
PKCS #7 message decryption.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.5.2
Definition in file pkcs7_decrypt.h.
Function Documentation
◆ pkcs7DecryptData()
error_t pkcs7DecryptData | ( | const Pkcs7EncryptedContentInfo * | encryptedContentInfo, |
const uint8_t * | key, | ||
size_t | keyLen, | ||
uint8_t * | plaintext, | ||
size_t * | plaintextLen | ||
) |
Perform data decryption.
- Parameters
-
[in] encryptedContentInfo Pointer to the encryptedContentInfo structure [in] key Pointer to the encryption key [in] keyLen Length of the encryption key, in bytes [out] plaintext Plaintext resulting from the decryption operation [out] plaintextLen Length of the resulting plaintext
- Returns
- Error code
Definition at line 138 of file pkcs7_decrypt.c.
◆ pkcs7DecryptEnvelopedData()
error_t pkcs7DecryptEnvelopedData | ( | const Pkcs7EnvelopedData * | envelopedData, |
const X509CertInfo * | recipientCertInfo, | ||
const void * | recipientPrivateKey, | ||
uint8_t * | plaintext, | ||
size_t * | plaintextLen | ||
) |
Decrypt enveloped-data content.
- Parameters
-
[in] envelopedData Pointer to the enveloped-data content [in] recipientCertInfo Recipient's certificate [in] recipientPrivateKey Recipient's private key [out] plaintext Plaintext resulting from the decryption operation [out] plaintextLen Length of the resulting plaintext
- Returns
- Error code
Definition at line 57 of file pkcs7_decrypt.c.
◆ pkcs7DecryptKey()
error_t pkcs7DecryptKey | ( | const Pkcs7RecipientInfo * | recipientInfo, |
const void * | recipientPrivateKey, | ||
uint8_t * | plaintext, | ||
size_t * | plaintextLen | ||
) |
Perform key decryption.
- Parameters
-
[in] recipientInfo Pointer to the RecipientInfo structure [in] recipientPrivateKey Recipient's private key [out] plaintext Key resulting from the decryption operation [out] plaintextLen Length of the resulting key
- Returns
- Error code
Definition at line 100 of file pkcs7_decrypt.c.
◆ pkcs7FindRecipient()
error_t pkcs7FindRecipient | ( | const Pkcs7RecipientInfos * | recipientInfos, |
const X509CertInfo * | recipientCertInfo, | ||
Pkcs7RecipientInfo * | recipientInfo | ||
) |
Search a list of per-recipient informations for a given recipient.
- Parameters
-
[in] recipientInfos Pointer to the collection of per-recipient information [in] recipientCertInfo Recipient's certificate [out] recipientInfo Pointer to the matching RecipientInfo structure, if any
- Returns
- Error code
Definition at line 230 of file pkcs7_decrypt.c.