SATP: Symmetric Authenticated Tunneling Protocol
1.0.0.0a (A1)
A quantum secure symmetric pre-shared key tunneling protocol
satpcommon.h
1
/* 2025 Quantum Resistant Cryptographic Solutions Corporation
2
* All Rights Reserved.
3
*
4
* NOTICE: This software and all accompanying materials are the exclusive
5
* property of Quantum Resistant Cryptographic Solutions Corporation (QRCS).
6
* The intellectual and technical concepts contained within this implementation
7
* are proprietary to QRCS and its authorized licensors and are protected under
8
* applicable U.S. and international copyright, patent, and trade secret laws.
9
*
10
* CRYPTOGRAPHIC STANDARDS:
11
* - This software includes implementations of cryptographic algorithms such as
12
* SHA3, AES, and others. These algorithms are public domain or standardized
13
* by organizations such as NIST and are NOT the property of QRCS.
14
* - However, all source code, optimizations, and implementations in this library
15
* are original works of QRCS and are protected under this license.
16
*
17
* RESTRICTIONS:
18
* - Redistribution, modification, or unauthorized distribution of this software,
19
* in whole or in part, is strictly prohibited.
20
* - This software is provided for non-commercial, educational, and research
21
* purposes only. Commercial use in any form is expressly forbidden.
22
* - Licensing and authorized distribution are solely at the discretion of QRCS.
23
* - Any use of this software implies acceptance of these restrictions.
24
*
25
* DISCLAIMER:
26
* This software is provided "as is," without warranty of any kind, express or
27
* implied, including but not limited to warranties of merchantability or fitness
28
* for a particular purpose. QRCS disclaims all liability for any direct, indirect,
29
* incidental, or consequential damages resulting from the use or misuse of this software.
30
*
31
* FULL LICENSE:
32
* This software is subject to the **Quantum Resistant Cryptographic Solutions
33
* Proprietary License (QRCS-PL)**. The complete license terms are included
34
* in the LICENSE.txt file distributed with this software.
35
*
36
* Written by: John G. Underhill
37
* Contact: contact@qrcscorp.ca
38
*/
39
40
#ifndef SATP_COMMON_H
41
#define SATP_COMMON_H
42
43
#include <errno.h>
44
#include <stdbool.h>
45
#include <stdint.h>
46
#include <limits.h>
47
#include <string.h>
48
#include "qsccommon.h"
49
#include "intrinsics.h"
50
57
59
64
#if defined(_DLL)
65
# define SATP_DLL_API
66
#endif
71
#if defined(SATP_DLL_API)
72
# if defined(QSC_SYSTEM_COMPILER_MSC)
73
# if defined(QSC_DLL_IMPORT)
74
# define SATP_EXPORT_API __declspec(dllimport)
75
# else
76
# define SATP_EXPORT_API __declspec(dllexport)
77
# endif
78
# elif defined(QSC_SYSTEM_COMPILER_GCC)
79
# if defined(QSC_DLL_IMPORT)
80
# define SATP_EXPORT_API __attribute__((dllimport))
81
# else
82
# define SATP_EXPORT_API __attribute__((dllexport))
83
# endif
84
# else
85
# if defined(__SUNPRO_C)
86
# if !defined(__GNU_C__)
87
# define SATP_EXPORT_API __attribute__ (visibility(__global))
88
# else
89
# define SATP_EXPORT_API __attribute__ __global
90
# endif
91
# elif defined(_MSG_VER)
92
# define SATP_EXPORT_API extern __declspec(dllexport)
93
# else
94
# define SATP_EXPORT_API __attribute__ ((visibility ("default")))
95
# endif
96
# endif
97
#else
98
# define SATP_EXPORT_API
99
#endif
100
101
#if defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG__) || (defined(__GNUC__) && !defined(__OPTIMIZE__))
106
# define SATP_DEBUG_MODE
107
#endif
108
109
#ifdef SATP_DEBUG_MODE
114
# define SATP_ASSERT(expr) assert(expr)
115
#else
116
# define SATP_ASSERT(expr) ((void)0)
117
#endif
118
120
121
#endif
SATP
satpcommon.h
Generated by
1.14.0