UDIF: Universal Digital Identification Framework 1.1.0.0a (A1)
A quantum-secure cryptographic identification
event.h
Go to the documentation of this file.
1/* 2025-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 UDIF_EVENT_H
53#define UDIF_EVENT_H
54
55#include "udif.h"
56#include "mcelmanager.h"
57
72
73#define UDIF_EVENT_CONTEXT_SIZE 32U
74
83#define UDIF_EVENT_RECORD_SIZE (1U + 2U + UDIF_SERIAL_NUMBER_SIZE + UDIF_SERIAL_NUMBER_SIZE + \
84 UDIF_EVENT_CONTEXT_SIZE + 8U + UDIF_CRYPTO_HASH_SIZE + 8U)
85
101
136
161
172
198 const uint8_t* actorser, const uint8_t* subjectser, const uint8_t* contextid, uint64_t timestamp, const uint8_t* payload, size_t payloadlen);
199
214UDIF_EXPORT_API udif_errors udif_event_serialize(uint8_t* output, size_t outlen, const udif_event_record* eventrec);
215
242 const uint8_t* subjectser, const uint8_t* contextid, uint64_t timestamp, const uint8_t* payload, size_t payloadlen);
243
244#endif
udif_event_classes
UDIF audit-event ledger class identifiers.
Definition event.h:95
@ udif_event_class_error
Definition event.h:99
@ udif_event_class_transaction
Definition event.h:97
@ udif_event_class_membership
Definition event.h:96
@ udif_event_class_registry
Definition event.h:98
UDIF_EXPORT_API void udif_event_clear(udif_event_record *eventrec)
Clear a UDIF audit-event record.
Definition event.c:6
UDIF_EXPORT_API udif_errors udif_event_serialize(uint8_t *output, size_t outlen, const udif_event_record *eventrec)
Serialize a UDIF audit-event record.
Definition event.c:67
UDIF_EXPORT_API udif_errors udif_event_log(udif_mcel_manager *mgr, udif_ledger_type ledger, udif_event_codes eventcode, const uint8_t *actorser, const uint8_t *subjectser, const uint8_t *contextid, uint64_t timestamp, const uint8_t *payload, size_t payloadlen)
Create and append a UDIF audit event to an MCEL ledger.
Definition event.c:105
udif_event_codes
UDIF audit-event operation identifiers.
Definition event.h:112
@ udif_audit_event_cert_revoke
Definition event.h:116
@ udif_audit_event_query_response
Definition event.h:122
@ udif_audit_event_cert_resume
Definition event.h:118
@ udif_audit_event_object_transfer_confirm
Definition event.h:125
@ udif_audit_event_anchor_push
Definition event.h:127
@ udif_audit_event_treaty_query_forward
Definition event.h:132
@ udif_audit_event_treaty_revoke
Definition event.h:131
@ udif_audit_event_query_request
Definition event.h:121
@ udif_audit_event_cert_enroll_request
Definition event.h:114
@ udif_audit_event_cert_enroll_response
Definition event.h:115
@ udif_audit_event_registry_commit
Definition event.h:126
@ udif_audit_event_error_report
Definition event.h:134
@ udif_audit_event_none
Definition event.h:113
@ udif_audit_event_treaty_propose
Definition event.h:129
@ udif_audit_event_anchor_ack
Definition event.h:128
@ udif_audit_event_treaty_query_response
Definition event.h:133
@ udif_audit_event_cap_grant
Definition event.h:119
@ udif_audit_event_cert_suspend
Definition event.h:117
@ udif_audit_event_object_create
Definition event.h:123
@ udif_audit_event_cap_revoke
Definition event.h:120
@ udif_audit_event_object_transfer_request
Definition event.h:124
@ udif_audit_event_treaty_cosign
Definition event.h:130
UDIF_EXPORT_API udif_errors udif_event_create(udif_event_record *eventrec, udif_event_classes eventclass, udif_event_codes eventcode, const uint8_t *actorser, const uint8_t *subjectser, const uint8_t *contextid, uint64_t timestamp, const uint8_t *payload, size_t payloadlen)
Create a canonical UDIF audit-event record.
Definition event.c:16
udif_ledger_type
Ledger namespace identifiers.
Definition storage.h:108
Canonical UDIF audit-event record.
Definition event.h:151
uint8_t contextid[UDIF_EVENT_CONTEXT_SIZE]
Definition event.h:156
uint8_t payloaddigest[UDIF_CRYPTO_HASH_SIZE]
Definition event.h:158
uint8_t subjectser[UDIF_SERIAL_NUMBER_SIZE]
Definition event.h:155
uint64_t timestamp
Definition event.h:157
uint8_t actorser[UDIF_SERIAL_NUMBER_SIZE]
Definition event.h:154
uint8_t eventclass
Definition event.h:152
uint64_t payloadlen
Definition event.h:159
uint16_t eventcode
Definition event.h:153
MCEL manager implementation.
Definition mcelmanager.h:138
UDIF Common Definitions and Protocol Configuration.
#define UDIF_SERIAL_NUMBER_SIZE
The certificate serial number field length.
Definition udif.h:546
#define UDIF_CRYPTO_HASH_SIZE
The size of the certificate hash in bytes.
Definition udif.h:439
udif_errors
UDIF error codes.
Definition udif.h:1210
#define UDIF_EXPORT_API
The api export prefix.
Definition udifcommon.h:101