QSC Post Quantum Cryptographic Library
1.3.0.0 (C1)
A post quantum secure library written in Ansi C
Loading...
Searching...
No Matches
tlsdefs.h
Go to the documentation of this file.
1
/* 2020-2026 Quantum Resistant Cryptographic Solutions Corporation
2
* All Rights Reserved.
3
*
4
* NOTICE:
5
* This software and all accompanying materials are the exclusive property of
6
* Quantum Resistant Cryptographic Solutions Corporation (QRCS). The intellectual
7
* and technical concepts contained herein are proprietary to QRCS and are
8
* protected under applicable Canadian, U.S., and international copyright,
9
* patent, and trade secret laws.
10
*
11
* CRYPTOGRAPHIC ALGORITHMS AND IMPLEMENTATIONS:
12
* - This software includes implementations of cryptographic primitives and
13
* algorithms that are standardized or in the public domain, such as AES
14
* and SHA-3, which are not proprietary to QRCS.
15
* - This software also includes cryptographic primitives, constructions, and
16
* algorithms designed by QRCS, including but not limited to RCS, SCB, CSX, QMAC, and
17
* related components, which are proprietary to QRCS.
18
* - All source code, implementations, protocol compositions, optimizations,
19
* parameter selections, and engineering work contained in this software are
20
* original works of QRCS and are protected under this license.
21
*
22
* LICENSE AND USE RESTRICTIONS:
23
* - This software is licensed under the Quantum Resistant Cryptographic Solutions
24
* Public Research and Evaluation License (QRCS-PREL), 2025-2026.
25
* - Permission is granted solely for non-commercial evaluation, academic research,
26
* cryptographic analysis, interoperability testing, and feasibility assessment.
27
* - Commercial use, production deployment, commercial redistribution, or
28
* integration into products or services is strictly prohibited without a
29
* separate written license agreement executed with QRCS.
30
* - Licensing and authorized distribution are solely at the discretion of QRCS.
31
*
32
* EXPERIMENTAL CRYPTOGRAPHY NOTICE:
33
* Portions of this software may include experimental, novel, or evolving
34
* cryptographic designs. Use of this software is entirely at the user's risk.
35
*
36
* DISCLAIMER:
37
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
* IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS
39
* FOR A PARTICULAR PURPOSE, SECURITY, OR NON-INFRINGEMENT. QRCS DISCLAIMS ALL
40
* LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
41
* ARISING FROM THE USE OR MISUSE OF THIS SOFTWARE.
42
*
43
* FULL LICENSE:
44
* This software is subject to the Quantum Resistant Cryptographic Solutions
45
* Public Research and Evaluation License (QRCS-PREL), 2025-2026. The complete license terms
46
* are provided in the accompanying LICENSE file or at https://www.qrcscorp.ca.
47
*
48
* Written by: John G. Underhill
49
* Contact: contact@qrcscorp.ca
50
*/
51
52
#ifndef QSC_TLS_DEFS_H
53
#define QSC_TLS_DEFS_H
54
55
#include "
tlstypes.h
"
56
61
66
#define QSC_TLS_PROTOCOL_VERSION_12 0x0303U
67
72
#define QSC_TLS_PROTOCOL_VERSION_13 0x0304U
73
78
#define QSC_TLS_RECORD_HEADER_SIZE 5U
79
84
#define QSC_TLS_ALERT_SIZE 2U
85
90
#define QSC_TLS_INNER_CONTENT_TYPE_SIZE 1U
91
96
#define QSC_TLS_GCM_TAG_SIZE 16U
97
102
#define QSC_TLS_GCM_NONCE_SIZE 12U
103
108
#define QSC_TLS_AES128_KEY_SIZE 16U
109
114
#define QSC_TLS_AES256_KEY_SIZE 32U
115
120
#define QSC_TLS_HASH_MAX_SIZE 64U
121
126
#define QSC_TLS_LABEL_MAX_SIZE 64U
127
132
#define QSC_TLS_CONTEXT_MAX_SIZE 64U
133
138
#define QSC_TLS_HKDF_LABEL_PREFIX "tls13 "
139
144
#define QSC_TLS_HKDF_LABEL_PREFIX_SIZE 6U
145
150
#define QSC_TLS_FINISHED_LABEL "finished"
151
156
#define QSC_TLS_FINISHED_LABEL_SIZE 8U
157
162
#define QSC_TLS_DERIVED_LABEL "derived"
163
168
#define QSC_TLS_DERIVED_LABEL_SIZE 7U
169
174
#define QSC_TLS_CLIENT_HANDSHAKE_TRAFFIC_LABEL "c hs traffic"
175
180
#define QSC_TLS_CLIENT_HANDSHAKE_TRAFFIC_LABEL_SIZE 12U
181
186
#define QSC_TLS_SERVER_HANDSHAKE_TRAFFIC_LABEL "s hs traffic"
187
192
#define QSC_TLS_SERVER_HANDSHAKE_TRAFFIC_LABEL_SIZE 12U
193
198
#define QSC_TLS_CLIENT_APPLICATION_TRAFFIC_LABEL "c ap traffic"
199
204
#define QSC_TLS_CLIENT_APPLICATION_TRAFFIC_LABEL_SIZE 12U
205
210
#define QSC_TLS_SERVER_APPLICATION_TRAFFIC_LABEL "s ap traffic"
211
216
#define QSC_TLS_SERVER_APPLICATION_TRAFFIC_LABEL_SIZE 12U
217
222
#define QSC_TLS_EXT_BINDER_LABEL "ext binder"
223
228
#define QSC_TLS_EXT_BINDER_LABEL_SIZE 10U
229
234
#define QSC_TLS_RES_BINDER_LABEL "res binder"
235
240
#define QSC_TLS_RES_BINDER_LABEL_SIZE 10U
241
246
#define QSC_TLS_EXPORTER_MASTER_LABEL "exp master"
247
252
#define QSC_TLS_EXPORTER_MASTER_LABEL_SIZE 10U
253
258
#define QSC_TLS_RESUMPTION_LABEL "resumption"
259
264
#define QSC_TLS_RESUMPTION_LABEL_SIZE 10U
265
270
#define QSC_TLS_KEY_LABEL "key"
271
276
#define QSC_TLS_KEY_LABEL_SIZE 3U
277
282
#define QSC_TLS_IV_LABEL "iv"
283
288
#define QSC_TLS_IV_LABEL_SIZE 2U
289
294
#define QSC_TLS_KEY_UPDATE_LABEL "traffic upd"
295
300
#define QSC_TLS_KEY_UPDATE_LABEL_SIZE 11U
301
306
#define QSC_TLS_EXTENSION_HEADER_SIZE 4U
307
312
#define QSC_TLS_VECTOR16_HEADER_SIZE 2U
313
318
#define QSC_TLS_KEYSHARE_ENTRY_HEADER_SIZE 4U
319
320
#endif
tlstypes.h
Public TLS type definitions.
QSC
tlsdefs.h
Generated by
1.14.0