MPDC: Multi Party Domain Cryptosystem 1.0.0.0b (A0)
MPDC Interior protocol
trust.h
Go to the documentation of this file.
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: john.underhill@protonmail.com
38 */
39
40#ifndef MPDC_TRUST_H
41#define MPDC_TRUST_H
42
43#include "common.h"
44#include "mpdc.h"
45#include "../../QSC/QSC/intutils.h"
46#include "../../QSC/QSC/memutils.h"
47
59
66#define MPDC_TRUST_SIZE (sizeof(mpdc_device_trust))
67
85
93MPDC_EXPORT_API void mpdc_trust_clear(mpdc_device_trust* device);
94
103MPDC_EXPORT_API void mpdc_trust_deserialize(mpdc_device_trust* device, const uint8_t* input);
104
114MPDC_EXPORT_API void mpdc_trust_serialize(uint8_t* output, size_t outlen, const mpdc_device_trust* device);
115
116#endif
MPDC Common Definitions and Protocol Configuration.
#define MPDC_AGENT_NAME_MAX_SIZE
The maximum agent name string length in characters. The last character must be a string terminator.
Definition mpdc.h:710
#define MPDC_NETWORK_DOMAIN_NAME_MAX_SIZE
The maximum domain name length in characters. The last character must be a string terminator.
Definition mpdc.h:1010
#define MPDC_DLA_IP_MAX
The maximum ip address length.
Definition mpdc.h:947
The MPDC topology device trust structure.
Definition trust.h:76
char address[MPDC_DLA_IP_MAX]
Definition trust.h:77
uint64_t dtrust
Definition trust.h:80
char name[MPDC_AGENT_NAME_MAX_SIZE]
Definition trust.h:79
bool isipv6
Definition trust.h:82
uint32_t bandwidth
Definition trust.h:81
bool local
Definition trust.h:83
char domain[MPDC_NETWORK_DOMAIN_NAME_MAX_SIZE]
Definition trust.h:78
MPDC_EXPORT_API void mpdc_trust_deserialize(mpdc_device_trust *device, const uint8_t *input)
Deserialize a device trust structure.
Definition trust.c:19
MPDC_EXPORT_API void mpdc_trust_clear(mpdc_device_trust *device)
Remove a device trust from the database.
Definition trust.c:3
MPDC_EXPORT_API void mpdc_trust_serialize(uint8_t *output, size_t outlen, const mpdc_device_trust *device)
Serialize a device trust structure.
Definition trust.c:52