|
UDIF: Universal Digital Identification Framework 1.1.0.0a (A1)
A quantum-secure cryptographic identification
|
UDIF Common Definitions and Protocol Configuration. More...
#include "udifcommon.h"#include "sha3.h"#include "socketbase.h"#include "dilithium.h"#include "kyber.h"#include "rcs.h"Go to the source code of this file.
Data Structures | |
| struct | udif_capability_mask |
| Fixed-size capability bitset (issuer-/role-scoped). Capability bits; bit positions map to udif_capability_id. More... | |
| struct | udif_claim |
| A typed claim with deterministic canonical encoding. More... | |
| struct | udif_claim_anchor |
| Anchor (e.g., Merkle root) binding a claim set to an identity. Anchor/merkle root over canonical claim set. More... | |
| struct | udif_claim_set |
| A collection of claims bound to an identity by an anchor. More... | |
| struct | udif_encoded_blob |
| Generic encoded object buffer (for decode/encode APIs). More... | |
| struct | udif_identity_id |
| Subject identity identifier (opaque, canonicalized). Subject identifier bytes. More... | |
| struct | udif_issuer_domain_code |
| Issuer domain/controller identifier. Issuer domain code (ASCII or compact code) More... | |
| struct | udif_kem_keypair |
| KEM key pair. More... | |
| struct | udif_namespace_code |
| Namespace partition identifier. Namespace code (ASCII or compact code) More... | |
| struct | udif_permission_mask |
| Fixed-size permission bitset (subject-/resource-scoped). Permission bits; bit positions map to udif_permission_class. More... | |
| struct | udif_policy_hash |
| Policy identifier (hash of canonical policy). SHA3/SHAKE hash of policy document. More... | |
| struct | udif_signature_keypair |
| The UDIF asymmetric signature scheme key container. More... | |
| struct | udif_time_window |
| A validity interval expressed in UTC seconds. More... | |
| struct | udif_token_header |
| Common header for UDIF tokens (capability/attestation/session). More... | |
| struct | udif_token |
| Serialized token container with optional envelope protection. More... | |
| struct | udif_valid_time |
| The certificate expiration time structure. More... | |
| struct | udif_identity_record |
| Core identity record bound to a namespace and issuer. More... | |
Macros | |
| #define | UDIF_CONFIG_DILITHIUM_KYBER |
| #define | UDIF_USE_RCS_ENCRYPTION |
| If the RCS encryption option is chosen SKDP uses the more modern RCS stream cipher with KMAC/QMAC authentication. The default symmetric cipher/authenticator is AES-256/GCM (GMAC Counter Mode) NIST standardized per SP800-38a. | |
| #define | udif_cipher_state qsc_rcs_state |
| #define | udif_cipher_dispose qsc_rcs_dispose |
| #define | udif_cipher_initialize qsc_rcs_initialize |
| #define | udif_cipher_keyparams qsc_rcs_keyparams |
| #define | udif_cipher_set_associated qsc_rcs_set_associated |
| #define | udif_cipher_transform qsc_rcs_transform |
| #define | udif_cipher_generate_keypair qsc_kyber_generate_keypair |
| UDIF function mapping macros. | |
| #define | udif_cipher_decapsulate qsc_kyber_decapsulate |
| Decapsulate a shared-secret with the asymmetric cipher. | |
| #define | udif_cipher_encapsulate qsc_kyber_encapsulate |
| Encapsulate a shared-secret with the asymmetric cipher. | |
| #define | udif_signature_generate_keypair qsc_dilithium_generate_keypair |
| Generate an asymmetric signature key-pair. | |
| #define | udif_signature_sign qsc_dilithium_sign |
| Sign a message with the asymmetric signature scheme. | |
| #define | udif_signature_verify qsc_dilithium_verify |
| Verify a message with the asymmetric signature scheme. | |
| #define | UDIF_ASYMMETRIC_CIPHERTEXT_SIZE (QSC_KYBER_CIPHERTEXT_SIZE) |
| The byte size of the asymmetric cipher-text array. | |
| #define | UDIF_ASYMMETRIC_PRIVATE_KEY_SIZE (QSC_KYBER_PRIVATEKEY_SIZE) |
| The byte size of the asymmetric cipher private-key array. | |
| #define | UDIF_ASYMMETRIC_PUBLIC_KEY_SIZE (QSC_KYBER_PUBLICKEY_SIZE) |
| The byte size of the asymmetric cipher public-key array. | |
| #define | UDIF_ASYMMETRIC_SIGNATURE_SIZE (QSC_DILITHIUM_SIGNATURE_SIZE) |
| The byte size of the asymmetric signature array. | |
| #define | UDIF_ASYMMETRIC_SIGNING_KEY_SIZE (QSC_DILITHIUM_PRIVATEKEY_SIZE) |
| The byte size of the asymmetric signature signing-key array. | |
| #define | UDIF_ASYMMETRIC_VERIFICATION_KEY_SIZE (QSC_DILITHIUM_PUBLICKEY_SIZE) |
| The byte size of the asymmetric signature verification-key array. | |
| #define | UDIF_CAPABILITY_BITMAP_SIZE 8U |
| Capability bitmap size in bytes (64-bit) | |
| #define | UDIF_CAPABILITY_MASK_SIZE 8U |
| The size of a capability mask in hex characters. | |
| #define | UDIF_CAPABILITY_TOKEN_MAX_SIZE 2048U |
| The maximum size of a serialized capability token. | |
| #define | UDIF_CLAIM_ANCHOR_SIZE 32U |
| The size of a claim anchor or merkle root in bytes. | |
| #define | UDIF_CRYPTO_HASH_SIZE 32U |
| The size of the certificate hash in bytes. | |
| #define | UDIF_CRYPTO_KEY_SIZE 32U |
| The byte length of the symmetric cipher key. | |
| #define | UDIF_CRYPTO_MAC_SIZE 32U |
| The MAC function output byte size. | |
| #define | UDIF_CRYPTO_NONCE_SIZE 32U |
| The byte length of the symmetric cipher nonce. | |
| #define | UDIF_IDENTITY_ID_SIZE 32U |
| The size of a subject identity identifier in bytes. | |
| #define | UDIF_ISSUER_DOMAIN_CODE_SIZE 8U |
| The size of an issuer domain code (unique identifier). | |
| #define | UDIF_NAMESPACE_CODE_SIZE 8U |
| The size of a namespace code (short string or numeric). | |
| #define | UDIF_PERMISSION_MASK_SIZE 8U |
| The size of a permission mask in bytes. | |
| #define | UDIF_POLICY_HASH_SIZE 32U |
| The size of a policy identifier hash in bytes. | |
| #define | UDIF_POLICY_VERB_SIZE 4U |
| The size of a policy verb in bytes. | |
| #define | UDIF_PROTOCOL_SET_SIZE 41U |
| The size of the protocol configuration string. | |
| #define | UDIF_ROLE_SIZE 1U |
| The UDIF role parameter size. | |
| #define | UDIF_CERT_SERIAL_SIZE 16U |
| The certificate serial number field length in bytes. | |
| #define | UDIF_OBJECT_SERIAL_SIZE 32U |
| The object serial number field length in bytes. | |
| #define | UDIF_QUERY_ID_SIZE 16U |
| The query identifier field length in bytes. | |
| #define | UDIF_TX_ID_SIZE UDIF_CRYPTO_HASH_SIZE |
| The transaction identifier field length in bytes. | |
| #define | UDIF_SERIAL_NUMBER_SIZE UDIF_CERT_SERIAL_SIZE |
| The certificate serial number field length. | |
| #define | UDIF_REGISTRY_LEAF_FLAGS_SIZE 4U |
| The registry leaf flags field length in bytes. | |
| #define | UDIF_REGISTRY_LEAF_ENCODED_SIZE |
| The canonical registry leaf encoding length in bytes. | |
| #define | UDIF_SIGNED_HASH_SIZE (UDIF_ASYMMETRIC_SIGNATURE_SIZE + UDIF_CRYPTO_HASH_SIZE) |
| The combined size of a signature and hash. | |
| #define | UDIF_SUITEID_SIZE 1U |
| The UDIF suite id parameter size. | |
| #define | UDIF_TIME_WINDOW_SECONDS 60U |
| The query time window seconds. | |
| #define | UDIF_VALID_TIME_SIZE 8U |
| #define | UDIF_VALID_TIME_STRUCTURE_SIZE 16U |
| The certificate expiration date length. | |
| #define | UDIF_POLICY_NONE (UINT64_C(0)) |
| Empty UDIF policy mask. | |
| #define | UDIF_POLICY_DEFAULT_DENY (UINT64_C(1) << 0) |
| Enforces default-deny authorization semantics. | |
| #define | UDIF_POLICY_REQUIRE_SUITE_MATCH (UINT64_C(1) << 1) |
| Requires all communicating parties to use the same UDIF suite. | |
| #define | UDIF_POLICY_REQUIRE_CANONICAL_ENCODING (UINT64_C(1) << 2) |
| Requires strict UDIF canonical binary encoding. | |
| #define | UDIF_POLICY_REQUIRE_PARENT_SIGNATURE (UINT64_C(1) << 3) |
| Requires non-root certificates to verify against the issuer key. | |
| #define | UDIF_POLICY_REQUIRE_REVOCATION_CHECK (UINT64_C(1) << 4) |
| Requires revocation and suspension state checking. | |
| #define | UDIF_POLICY_REQUIRE_CAPABILITY_INTERSECT (UINT64_C(1) << 5) |
| Requires capability intersection before authorization. | |
| #define | UDIF_POLICY_REQUIRE_POLICY_EPOCH_MATCH (UINT64_C(1) << 6) |
| Requires policy epoch consistency during validation. | |
| #define | UDIF_POLICY_REQUIRE_MEMBERSHIP_LOG (UINT64_C(1) << 7) |
| Requires membership events to be logged. | |
| #define | UDIF_POLICY_REQUIRE_TRANSACTION_LOG (UINT64_C(1) << 8) |
| Requires object and transfer events to be logged. | |
| #define | UDIF_POLICY_REQUIRE_REGISTRY_COMMIT (UINT64_C(1) << 9) |
| Requires registry roots to be committed. | |
| #define | UDIF_POLICY_REQUIRE_ANCHORING (UINT64_C(1) << 10) |
| Requires periodic upstream Anchor Records. | |
| #define | UDIF_POLICY_REQUIRE_ANCHOR_SEQUENCE (UINT64_C(1) << 11) |
| Requires monotonic Anchor Record sequencing. | |
| #define | UDIF_POLICY_REQUIRE_MINIMAL_DISCLOSURE (UINT64_C(1) << 12) |
| Requires minimal-disclosure query responses. | |
| #define | UDIF_POLICY_REQUIRE_AUDIT_COUNTERS (UINT64_C(1) << 13) |
| Requires auditable operational counters where applicable. | |
| #define | UDIF_POLICY_REQUIRE_TIME_WINDOW (UINT64_C(1) << 14) |
| Requires protocol timestamp acceptance windows. | |
| #define | UDIF_POLICY_REQUIRE_SEQUENCE_CHECK (UINT64_C(1) << 15) |
| Requires strict transport sequence checking. | |
| #define | UDIF_POLICY_REQUIRE_EPOCH_CHECK (UINT64_C(1) << 16) |
| Requires session and policy epoch validation. | |
| #define | UDIF_POLICY_REQUIRE_AEAD_AAD_HEADER (UINT64_C(1) << 17) |
| Requires authenticated transport headers. | |
| #define | UDIF_POLICY_REQUIRE_RATCHET_REKEY (UINT64_C(1) << 18) |
| Requires periodic ratchet rekeying where applicable. | |
| #define | UDIF_POLICY_FORBID_RUNTIME_NEGOTIATION (UINT64_C(1) << 19) |
| Forbids runtime cryptographic suite negotiation. | |
| #define | UDIF_POLICY_FORBID_ADMIN_OBJECT_OWNERSHIP (UINT64_C(1) << 20) |
| Forbids Roots, BCs, and GCs from owning objects. | |
| #define | UDIF_POLICY_FORBID_CLIENT_ADMIN (UINT64_C(1) << 21) |
| Forbids User Agents from administrative authority. | |
| #define | UDIF_POLICY_FORBID_CLIENT_LATERAL_QUERY (UINT64_C(1) << 22) |
| Forbids direct lateral User Agent interaction. | |
| #define | UDIF_POLICY_FORBID_IMPLICIT_TREATY_RIGHTS (UINT64_C(1) << 23) |
| Forbids implicit cross-domain treaty authority. | |
| #define | UDIF_POLICY_REQUIRE_TREATY_SCOPE_CHECK (UINT64_C(1) << 24) |
| Requires treaty-scope validation. | |
| #define | UDIF_POLICY_ALLOW_TREATY_NEGOTIATION (UINT64_C(1) << 25) |
| Allows authorized treaty negotiation. | |
| #define | UDIF_POLICY_ALLOW_TREATY_QUERY_ORIGIN (UINT64_C(1) << 26) |
| Allows treaty-scoped query origination. | |
| #define | UDIF_POLICY_ALLOW_TREATY_QUERY_EXEC (UINT64_C(1) << 27) |
| Allows execution of incoming treaty-scoped queries. | |
| #define | UDIF_POLICY_ALLOW_TELEMETRY_EXPORT (UINT64_C(1) << 28) |
| Allows export of bounded operational telemetry. | |
| #define | UDIF_POLICY_ALLOW_ERROR_REPORTING (UINT64_C(1) << 29) |
| Allows signed operational error reporting. | |
| #define | UDIF_POLICY_ALLOW_PROFILE_HOOKS (UINT64_C(1) << 30) |
| Allows non-canonical profile policy hooks. | |
| #define | UDIF_POLICY_REQUIRE_PROFILE_HOOK_AUDIT (UINT64_C(1) << 31) |
| Requires audit records for profile hook decisions. | |
| #define | UDIF_POLICY_RESERVED_CORE_MASK (UINT64_C(0x0000FFFF00000000)) |
| Reserved policy bits for future UDIF core policy assignments. | |
| #define | UDIF_POLICY_RESERVED_PROFILE_MASK (UINT64_C(0xFFFF000000000000)) |
| Reserved policy bits for implementation or deployment profiles. | |
| #define | UDIF_POLICY_BASELINE_SECURITY_MASK |
| Mandatory baseline policy bits for all UDIF certificates. | |
| #define | UDIF_POLICY_TRANSPORT_SECURITY_MASK |
| Mandatory transport-session policy bits. | |
| #define | UDIF_POLICY_LOGGING_MASK |
| Mandatory logging and audit policy bits. | |
| #define | UDIF_POLICY_ADMIN_SEPARATION_MASK |
| Policy bits enforcing administrative role separation. | |
| #define | UDIF_POLICY_TREATY_BASE_MASK |
| Policy bits enforcing treaty containment. | |
| #define | UDIF_POLICY_TREATY_ENABLE_MASK |
| Optional treaty enablement policy bits. | |
| #define | UDIF_POLICY_PROFILE_HOOK_MASK |
| Optional profile hook policy bits. | |
| #define | UDIF_POLICY_DEFINED_CORE_MASK |
| Mask of all UDIF implementation-defined core policy bits. | |
| #define | UDIF_ROOT_POLICY_DEFAULT |
| Default policy mask for a UDIF Root certificate. | |
| #define | UDIF_BC_POLICY_DEFAULT |
| Default policy mask for a UDIF Branch Controller certificate. | |
| #define | UDIF_GC_POLICY_DEFAULT |
| Default policy mask for a UDIF Group Controller certificate. | |
| #define | UDIF_CLIENT_POLICY_DEFAULT |
| Default policy mask for a UDIF client or User Agent certificate. | |
Typedefs | |
| typedef enum udif_claim_type | udif_claim_type |
| typedef enum udif_configuration_sets | udif_configuration_sets |
| typedef enum udif_errors | udif_errors |
| typedef enum udif_error_capability | udif_error_capability |
| typedef enum udif_error_claims | udif_error_claims |
| typedef enum udif_error_encoding | udif_error_encoding |
| typedef enum udif_error_identity | udif_error_identity |
| typedef enum udif_error_policy | udif_error_policy |
| typedef enum udif_logging_event_codes | udif_logging_event_codes |
| typedef enum udif_permission_class | udif_permission_class |
| typedef enum udif_policy_decision | udif_policy_decision |
| typedef enum udif_roles | udif_roles |
| typedef enum udif_time_validation | udif_time_validation |
| typedef enum udif_token_type | udif_token_type |
| typedef enum udif_status | udif_status |
| typedef enum udif_verify_policy | udif_verify_policy |
| typedef enum udif_version_sets | udif_version_sets |
| typedef UDIF_EXPORT_API struct udif_capability_mask | udif_capability_mask |
| typedef UDIF_EXPORT_API struct udif_claim | udif_claim |
| typedef UDIF_EXPORT_API struct udif_claim_anchor | udif_claim_anchor |
| typedef UDIF_EXPORT_API struct udif_claim_set | udif_claim_set |
| typedef UDIF_EXPORT_API struct udif_encoded_blob | udif_encoded_blob |
| typedef UDIF_EXPORT_API struct udif_identity_id | udif_identity_id |
| typedef UDIF_EXPORT_API struct udif_issuer_domain_code | udif_issuer_domain_code |
| typedef UDIF_EXPORT_API struct udif_kem_keypair | udif_kem_keypair |
| typedef UDIF_EXPORT_API struct udif_namespace_code | udif_namespace_code |
| typedef UDIF_EXPORT_API struct udif_permission_mask | udif_permission_mask |
| typedef UDIF_EXPORT_API struct udif_policy_hash | udif_policy_hash |
| typedef UDIF_EXPORT_API struct udif_signature_keypair | udif_signature_keypair |
| typedef UDIF_EXPORT_API struct udif_time_window | udif_time_window |
| typedef UDIF_EXPORT_API struct udif_token_header | udif_token_header |
| typedef UDIF_EXPORT_API struct udif_token | udif_token |
| typedef UDIF_EXPORT_API struct udif_valid_time | udif_valid_time |
| typedef UDIF_EXPORT_API struct udif_identity_record | udif_identity_record |
Functions | |
| UDIF_EXPORT_API bool | udif_suite_is_valid (uint8_t suiteid) |
| Check if the suite id valid. | |
| UDIF_EXPORT_API const char * | udif_error_to_string (udif_errors error) |
| Convert an error to a string. | |
| UDIF_EXPORT_API const char * | udif_role_to_string (udif_roles role) |
| Convert a role to its string name. | |
UDIF Common Definitions and Protocol Configuration.
This header defines the common constants, macros, enumerations, structures, and function prototypes for the Anonymous Encrypted Relay Network (UDIF). It provides configuration for the cryptographic parameter sets, certificate handling, network protocol operations, and socket communication required to implement the UDIF protocol.
The UDIF protocol leverages a combination of asymmetric cipher and signature schemes from the QSC library. The parameter sets can be configured in the QSC library's common.h file. For maximum security, the McEliece/SPHINCS+ parameter set is recommended; for a balance of performance and security, the Dilithium/Kyber parameter set is advised.
Key components defined in this header include:
These tests collectively ensure the robustness, consistency, and security of the UDIF protocol configuration.
| #define UDIF_BC_POLICY_DEFAULT |
Default policy mask for a UDIF Branch Controller certificate.
The Branch Controller policy enforces default-deny authorization, parent signature validation, revocation checking, canonical encoding, capability intersection, membership logging, anchoring, anchor sequence validation, transport security, administrative separation, and treaty containment.
This default is suitable for a Branch Controller operating in branch-admin mode. Treaty enablement remains excluded unless explicitly granted.
| #define udif_cipher_generate_keypair qsc_kyber_generate_keypair |
UDIF function mapping macros.
These macros alias the high-level UDIF cryptographic operations to the corresponding QSC library functions. The mapping depends on the selected parameter set. For instance, if UDIF_CONFIG_SPHINCS_MCELIECE is defined, then the UDIF cipher and signature functions map to the McEliece/SPHINCS+ routines. Alternatively, if UDIF_CONFIG_DILITHIUM_KYBER is defined, the corresponding Dilithium/Kyber routines are used.
Generate an asymmetric cipher key-pair
| #define UDIF_CLIENT_POLICY_DEFAULT |
Default policy mask for a UDIF client or User Agent certificate.
The client policy enforces end-entity constraints. It requires default-deny authorization, canonical encoding, revocation checking, capability intersection, minimal disclosure, registry commitment, transaction logging, transport validation, and prohibition of administrative and lateral interaction.
A client may own objects and initiate or accept transactions subject to capability and registry checks, but it must not enroll, suspend, revoke, forward, or administer other entities.
| #define UDIF_GC_POLICY_DEFAULT |
Default policy mask for a UDIF Group Controller certificate.
The Group Controller policy enforces user lifecycle logging, registry commitment, transaction logging, upstream anchoring, capability intersection, minimal disclosure, transport validation, treaty containment, and the rule that administrative controllers do not own objects.
The Group Controller is the primary enforcement point for User Agent operations, but it must not receive branch-creation policy unless acting under a separate branch-admin certificate.
| #define UDIF_POLICY_ADMIN_SEPARATION_MASK |
Policy bits enforcing administrative role separation.
This mask prevents administrative controllers from owning objects and prevents clients from acting as administrative authorities.
| #define UDIF_POLICY_ALLOW_ERROR_REPORTING (UINT64_C(1) << 29) |
Allows signed operational error reporting.
Permits nodes to create signed error reports and append them to the relevant operational, membership, or audit log.
| #define UDIF_POLICY_ALLOW_PROFILE_HOOKS (UINT64_C(1) << 30) |
Allows non-canonical profile policy hooks.
Permits deployment-specific policy hooks for predicates, retention, jurisdictional restrictions, consent, delegation, or profile-defined checks. Hooks must not change canonical encodings or weaken default-deny behavior.
| #define UDIF_POLICY_ALLOW_TELEMETRY_EXPORT (UINT64_C(1) << 28) |
Allows export of bounded operational telemetry.
Permits export of non-identifying counters and operational status values. This policy must not permit raw identifiers, attributes, registry entries, or transaction contents to be exported.
| #define UDIF_POLICY_ALLOW_TREATY_NEGOTIATION (UINT64_C(1) << 25) |
Allows authorized treaty negotiation.
Permits a suitably authorized Branch Controller or designated controller to negotiate and sign treaty records. This policy bit does not by itself grant treaty capability bits.
| #define UDIF_POLICY_ALLOW_TREATY_QUERY_EXEC (UINT64_C(1) << 27) |
Allows execution of incoming treaty-scoped queries.
Permits processing of treaty queries received from a peer domain when the holder also has the required treaty capability and the treaty permits the predicate.
| #define UDIF_POLICY_ALLOW_TREATY_QUERY_ORIGIN (UINT64_C(1) << 26) |
Allows treaty-scoped query origination.
Permits treaty query origination when the holder also has the required treaty capability and a valid treaty permits the requested predicate.
| #define UDIF_POLICY_BASELINE_SECURITY_MASK |
Mandatory baseline policy bits for all UDIF certificates.
This mask covers default denial, suite matching, canonical encoding, signature verification, revocation checking, capability intersection, policy epoch validation, minimal disclosure, and runtime negotiation prohibition.
| #define UDIF_POLICY_DEFAULT_DENY (UINT64_C(1) << 0) |
Enforces default-deny authorization semantics.
Requires all operations to be denied unless explicitly permitted by the intersection of the caller certificate, capability bitmap, local policy, and any applicable treaty or profile rule.
| #define UDIF_POLICY_DEFINED_CORE_MASK |
Mask of all UDIF implementation-defined core policy bits.
| #define UDIF_POLICY_FORBID_ADMIN_OBJECT_OWNERSHIP (UINT64_C(1) << 20) |
Forbids Roots, BCs, and GCs from owning objects.
Enforces the UDIF separation between administration and ownership. Objects must be owned by User Agents, not by administrative controllers.
| #define UDIF_POLICY_FORBID_CLIENT_ADMIN (UINT64_C(1) << 21) |
Forbids User Agents from administrative authority.
Prevents clients and User Agents from enrolling, suspending, resuming, revoking, or creating subordinate certificates or branches.
| #define UDIF_POLICY_FORBID_CLIENT_LATERAL_QUERY (UINT64_C(1) << 22) |
Forbids direct lateral User Agent interaction.
Requires User Agent interaction with other users, registries, or domains to be mediated by the assigned Group Controller.
| #define UDIF_POLICY_FORBID_IMPLICIT_TREATY_RIGHTS (UINT64_C(1) << 23) |
Forbids implicit cross-domain treaty authority.
Requires treaty rights to be explicitly granted by certificate capability, local policy, and a valid treaty record. No domain may infer treaty rights from ordinary branch or group status.
| #define UDIF_POLICY_FORBID_RUNTIME_NEGOTIATION (UINT64_C(1) << 19) |
Forbids runtime cryptographic suite negotiation.
Requires all cryptographic algorithms and suite identifiers to be fixed by the compiled UDIF domain profile.
| #define UDIF_POLICY_LOGGING_MASK |
Mandatory logging and audit policy bits.
This mask covers membership logs, transaction logs, registry commits, anchoring, anchor sequencing, and audit counters.
| #define UDIF_POLICY_NONE (UINT64_C(0)) |
Empty UDIF policy mask.
Represents the absence of policy permissions or constraints. In UDIF this value is not permissive; it is interpreted together with default-deny semantics and therefore grants no policy relaxation.
| #define UDIF_POLICY_PROFILE_HOOK_MASK |
Optional profile hook policy bits.
This mask enables non-canonical policy hooks and requires their decisions to be auditable under the active policy epoch.
| #define UDIF_POLICY_REQUIRE_AEAD_AAD_HEADER (UINT64_C(1) << 17) |
Requires authenticated transport headers.
Requires UDIF transport headers to be authenticated as AEAD associated data, including flags, sequence, timestamp, epoch, and suite identifier.
| #define UDIF_POLICY_REQUIRE_ANCHOR_SEQUENCE (UINT64_C(1) << 11) |
Requires monotonic Anchor Record sequencing.
Requires each child Anchor Record sequence to start at zero and increment monotonically by one, rejecting rollback, replay, or skipped anchor states.
| #define UDIF_POLICY_REQUIRE_ANCHORING (UINT64_C(1) << 10) |
Requires periodic upstream Anchor Records.
Requires Branch Controllers and Group Controllers to periodically submit signed Anchor Records to their parent authority.
| #define UDIF_POLICY_REQUIRE_AUDIT_COUNTERS (UINT64_C(1) << 13) |
Requires auditable operational counters where applicable.
Requires anchor, membership, transaction, registry, and treaty operations to maintain counters sufficient for audit and rollback detection.
| #define UDIF_POLICY_REQUIRE_CANONICAL_ENCODING (UINT64_C(1) << 2) |
Requires strict UDIF canonical binary encoding.
Requires fixed field order, little-endian integer encoding, exact structure sizes, and rejection of malformed, truncated, overlong, or ambiguously encoded records.
| #define UDIF_POLICY_REQUIRE_CAPABILITY_INTERSECT (UINT64_C(1) << 5) |
Requires capability intersection before authorization.
Requires authorization to be computed by intersecting requested operation rights with the holder certificate bitmap, issued capability tokens, parent constraints, local policy, and treaty scope where applicable.
| #define UDIF_POLICY_REQUIRE_EPOCH_CHECK (UINT64_C(1) << 16) |
Requires session and policy epoch validation.
Requires protocol messages, ratchet states, and policy-governed records to be evaluated under the expected epoch value.
| #define UDIF_POLICY_REQUIRE_MEMBERSHIP_LOG (UINT64_C(1) << 7) |
Requires membership events to be logged.
Requires enrollment, suspension, resumption, revocation, capability grants, capability revocations, registry commits, and branch lifecycle events to be written to the membership log.
| #define UDIF_POLICY_REQUIRE_MINIMAL_DISCLOSURE (UINT64_C(1) << 12) |
Requires minimal-disclosure query responses.
Requires query processing to return only authorized predicate results, digest proofs, or Boolean responses, and forbids disclosure of unrelated raw identifiers, attributes, registry contents, or object data.
| #define UDIF_POLICY_REQUIRE_PARENT_SIGNATURE (UINT64_C(1) << 3) |
Requires non-root certificates to verify against the issuer key.
Enforces parent-signed certificate issuance. The only exception is the Root trust anchor, where issuer_serial equals serial and trust is established out of band.
| #define UDIF_POLICY_REQUIRE_POLICY_EPOCH_MATCH (UINT64_C(1) << 6) |
Requires policy epoch consistency during validation.
Requires certificate, capability, anchor, and profile decisions to be evaluated under the active policy_epoch. Epoch changes must be explicit and auditable.
| #define UDIF_POLICY_REQUIRE_PROFILE_HOOK_AUDIT (UINT64_C(1) << 31) |
Requires audit records for profile hook decisions.
Requires profile hook decisions affecting authorization, query execution, treaty forwarding, or disclosure to be logged or accounted for under the active policy_epoch.
| #define UDIF_POLICY_REQUIRE_RATCHET_REKEY (UINT64_C(1) << 18) |
Requires periodic ratchet rekeying where applicable.
Requires long-lived controller-to-controller tunnels to perform configured asymmetric rekeying and epoch transition.
| #define UDIF_POLICY_REQUIRE_REGISTRY_COMMIT (UINT64_C(1) << 9) |
Requires registry roots to be committed.
Requires User Agent registry roots, or group-level aggregates of registry roots, to be committed through the applicable membership or registry ledger.
| #define UDIF_POLICY_REQUIRE_REVOCATION_CHECK (UINT64_C(1) << 4) |
Requires revocation and suspension state checking.
Requires certificates and capabilities to be checked against local and upstream revocation or suspension state before use.
| #define UDIF_POLICY_REQUIRE_SEQUENCE_CHECK (UINT64_C(1) << 15) |
Requires strict transport sequence checking.
Requires message sequence numbers to be strictly monotonic within each session epoch. Missing, repeated, or reordered records must fail validation.
| #define UDIF_POLICY_REQUIRE_SUITE_MATCH (UINT64_C(1) << 1) |
Requires all communicating parties to use the same UDIF suite.
Enforces the compile-time suite model. Certificates, sessions, anchors, and protocol messages using a mismatched suite identifier must be rejected.
| #define UDIF_POLICY_REQUIRE_TIME_WINDOW (UINT64_C(1) << 14) |
Requires protocol timestamp acceptance windows.
Requires transport and control messages to be rejected when their timestamp falls outside the configured acceptance window.
| #define UDIF_POLICY_REQUIRE_TRANSACTION_LOG (UINT64_C(1) << 8) |
Requires object and transfer events to be logged.
Requires object creation, update, transfer, suspension, destruction, and treaty-scoped transaction evidence to be written to the transaction log.
| #define UDIF_POLICY_REQUIRE_TREATY_SCOPE_CHECK (UINT64_C(1) << 24) |
Requires treaty-scope validation.
Requires treaty queries and proofs to be constrained by peer identity, predicate family, allowed scope, policy epoch, and capability intersection.
| #define UDIF_POLICY_RESERVED_CORE_MASK (UINT64_C(0x0000FFFF00000000)) |
Reserved policy bits for future UDIF core policy assignments.
Bits 32 through 47 are reserved for future core policy definitions. They must be zero unless assigned by a later UDIF core revision.
| #define UDIF_POLICY_RESERVED_PROFILE_MASK (UINT64_C(0xFFFF000000000000)) |
Reserved policy bits for implementation or deployment profiles.
Bits 48 through 63 are reserved for jurisdictional, institutional, regulatory, or application-specific policy profiles.
| #define UDIF_POLICY_TRANSPORT_SECURITY_MASK |
Mandatory transport-session policy bits.
This mask covers timestamp windows, sequence validation, epoch validation, authenticated headers, and ratchet rekeying where applicable.
| #define UDIF_POLICY_TREATY_BASE_MASK |
Policy bits enforcing treaty containment.
This mask forbids implicit treaty authority and requires explicit treaty scope checks before cross-domain operation.
| #define UDIF_POLICY_TREATY_ENABLE_MASK |
Optional treaty enablement policy bits.
This mask enables treaty negotiation, treaty query origination, and treaty query execution. It must be applied only where parent policy and certificate capabilities explicitly allow cross-domain operation.
| #define UDIF_REGISTRY_LEAF_ENCODED_SIZE |
The canonical registry leaf encoding length in bytes.
| #define UDIF_ROOT_POLICY_DEFAULT |
Default policy mask for a UDIF Root certificate.
The Root policy defines the baseline rules for the domain. It enforces the canonical suite, canonical encoding, revocation model, policy epoch model, default-deny authorization, strict administrative separation, and anchoring requirements for subordinate controllers.
The Root default excludes ordinary treaty execution by default. Treaty enablement should be added explicitly through deployment policy if the Root is intended to authorize treaty-capable controllers.
| #define UDIF_SERIAL_NUMBER_SIZE UDIF_CERT_SERIAL_SIZE |
The certificate serial number field length.
This compatibility alias is retained for certificate and entity serials. Object serials MUST use UDIF_OBJECT_SERIAL_SIZE.
| enum udif_claim_type |
Claim type identifiers (deterministic canonicalization required).
The UDIF algorithm configuration sets.
| enum udif_error_claims |
Claim/claim-set error codes.
| enum udif_error_encoding |
| enum udif_error_identity |
Identity-specific error codes.
| enum udif_error_policy |
| enum udif_errors |
UDIF error codes.
Membership and transaction log event codes.
Permission classes whose bits populate the permission mask.
| enum udif_policy_decision |
| enum udif_roles |
UDIF entity roles.
| enum udif_status |
Generic status codes for UDIF operations.
| enum udif_time_validation |
| enum udif_token_type |
| enum udif_verify_policy |
| enum udif_version_sets |
| UDIF_EXPORT_API const char * udif_error_to_string | ( | udif_errors | error | ) |
Convert an error to a string.
| error | The error enumerator. |
| UDIF_EXPORT_API const char * udif_role_to_string | ( | udif_roles | role | ) |
Convert a role to its string name.
| role | The role enumerator. |
| UDIF_EXPORT_API bool udif_suite_is_valid | ( | uint8_t | suiteid | ) |
Check if the suite id valid.
| suiteid | The suite id. |