DTLS 1.3 record decryption. More...
#include "tls/tls.h"Go to the source code of this file.
Functions | |
| error_t | dtls13ReadRecord (TlsContext *context) |
| Receive a DTLS 1.3 record. More... | |
| error_t | dtls13ReadPlaintextRecord (TlsContext *context, uint8_t *record) |
| Receive a DTLSPlaintext record. More... | |
| error_t | dtls13ReadCiphertextRecord (TlsContext *context, uint8_t *record) |
| Receive a DTLSCiphertext record. More... | |
| error_t | dtls13DecryptRecord (TlsContext *context, TlsEncryptionEngine *decryptionEngine, const uint8_t *nonce, size_t nonceLen, const uint8_t *aad, size_t aadLen, uint8_t *data, size_t *dataLen, uint8_t *type) |
| Decrypt an incoming DTLS 1.3 record. More... | |
| error_t | dtls13DecryptAeadRecord (TlsContext *context, TlsEncryptionEngine *decryptionEngine, const uint8_t *nonce, size_t nonceLen, const uint8_t *aad, size_t aadLen, uint8_t *data, size_t dataLen, uint8_t *tag) |
| Record decryption (AEAD cipher) More... | |
| error_t | dtls13VerifyMac (TlsContext *context, TlsEncryptionEngine *decryptionEngine, const uint8_t *nonce, size_t nonceLen, const uint8_t *aad, size_t aadLen, const uint8_t *data, size_t dataLen, uint8_t *mac) |
| Check message authentication code. More... | |
| error_t | dtls13DecryptSequenceNumber (TlsEncryptionEngine *decryptionEngine, uint8_t *record) |
| Decrypt sequence number. More... | |
| void | dtls13ReconstructSequenceNumber (TlsEncryptionEngine *decryptionEngine, const uint8_t *record, DtlsSequenceNumber *seqNum) |
| Sequence number reconstruction. More... | |
Detailed Description
DTLS 1.3 record decryption.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSL 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.6.2
Definition in file dtls13_record_decrypt.h.
Function Documentation
◆ dtls13DecryptAeadRecord()
| error_t dtls13DecryptAeadRecord | ( | TlsContext * | context, |
| TlsEncryptionEngine * | decryptionEngine, | ||
| const uint8_t * | nonce, | ||
| size_t | nonceLen, | ||
| const uint8_t * | aad, | ||
| size_t | aadLen, | ||
| uint8_t * | data, | ||
| size_t | dataLen, | ||
| uint8_t * | tag | ||
| ) |
Record decryption (AEAD cipher)
- Parameters
-
[in] context Pointer to the TLS context [in] decryptionEngine Pointer to the decryption engine [in] nonce Nonce [in] nonceLen Length of the nonce, in bytes [in] aad Additional authenticated data [in] aadLen Length of the additional data [in,out] data Payload data [in] dataLen Total number of data bytes to be decrypted [out] tag Authentication tag
- Returns
- Error code
Definition at line 520 of file dtls13_record_decrypt.c.
◆ dtls13DecryptRecord()
| error_t dtls13DecryptRecord | ( | TlsContext * | context, |
| TlsEncryptionEngine * | decryptionEngine, | ||
| const uint8_t * | nonce, | ||
| size_t | nonceLen, | ||
| const uint8_t * | aad, | ||
| size_t | aadLen, | ||
| uint8_t * | data, | ||
| size_t * | dataLen, | ||
| uint8_t * | type | ||
| ) |
Decrypt an incoming DTLS 1.3 record.
- Parameters
-
[in] context Pointer to the TLS context [in] decryptionEngine Pointer to the decryption engine [in] nonce Nonce [in] nonceLen Length of the nonce, in bytes [in] aad Additional authenticated data [in] aadLen Length of the additional data [in,out] data Payload data [in] dataLen Actual length of the payload data [out] type Record type
- Returns
- Error code
Definition at line 402 of file dtls13_record_decrypt.c.
◆ dtls13DecryptSequenceNumber()
| error_t dtls13DecryptSequenceNumber | ( | TlsEncryptionEngine * | decryptionEngine, |
| uint8_t * | record | ||
| ) |
Decrypt sequence number.
- Parameters
-
[in] decryptionEngine Pointer to the decryption engine [in,out] record Pointer to the DTLS 1.3 record
- Returns
- Error code
Definition at line 629 of file dtls13_record_decrypt.c.
◆ dtls13ReadCiphertextRecord()
| error_t dtls13ReadCiphertextRecord | ( | TlsContext * | context, |
| uint8_t * | record | ||
| ) |
Receive a DTLSCiphertext record.
- Parameters
-
[in] context Pointer to the TLS context [in] record Pointer to the DTLSCiphertext structure
- Returns
- Error code
Definition at line 190 of file dtls13_record_decrypt.c.
◆ dtls13ReadPlaintextRecord()
| error_t dtls13ReadPlaintextRecord | ( | TlsContext * | context, |
| uint8_t * | record | ||
| ) |
Receive a DTLSPlaintext record.
- Parameters
-
[in] context Pointer to the TLS context [in] record Pointer to the DTLSPlaintext structure
- Returns
- Error code
Definition at line 95 of file dtls13_record_decrypt.c.
◆ dtls13ReadRecord()
| error_t dtls13ReadRecord | ( | TlsContext * | context | ) |
Receive a DTLS 1.3 record.
- Parameters
-
[in] context Pointer to the TLS context
- Returns
- Error code
Definition at line 52 of file dtls13_record_decrypt.c.
◆ dtls13ReconstructSequenceNumber()
| void dtls13ReconstructSequenceNumber | ( | TlsEncryptionEngine * | decryptionEngine, |
| const uint8_t * | record, | ||
| DtlsSequenceNumber * | seqNum | ||
| ) |
Sequence number reconstruction.
- Parameters
-
[in] decryptionEngine Pointer to the decryption engine [in,out] record Pointer to the DTLS 1.3 record [out] seqNum Reconstructed sequence number
Definition at line 739 of file dtls13_record_decrypt.c.
◆ dtls13VerifyMac()
| error_t dtls13VerifyMac | ( | TlsContext * | context, |
| TlsEncryptionEngine * | decryptionEngine, | ||
| const uint8_t * | nonce, | ||
| size_t | nonceLen, | ||
| const uint8_t * | aad, | ||
| size_t | aadLen, | ||
| const uint8_t * | data, | ||
| size_t | dataLen, | ||
| uint8_t * | mac | ||
| ) |
Check message authentication code.
- Parameters
-
[in] context Pointer to the TLS context [in] decryptionEngine Pointer to the decryption engine [in] nonce Nonce [in] nonceLen Length of the nonce, in bytes [in] aad Additional authenticated data [in] aadLen Length of the additional data [in] data Payload data [in] dataLen Total number of data bytes to be authenticated [out] mac Message authentication code
- Returns
- Error code
Definition at line 584 of file dtls13_record_decrypt.c.
