Skip to main content

Module asn1

Module asn1 

Source
Expand description

uor_addr::asn1 — the ASN.1 realization of UOR-ADDR (ARCHITECTURE.md “Format-specific realizations” § uor-addr-asn1).

ASN.1 typed-input content-addressing under ITU-T X.690 Distinguished Encoding Rules (DER), with the σ-projection bound to prism::crypto::Sha256Hasher.

§Authoritative sources

§Supported universal tags

Per ARCHITECTURE.md the typed-input shape Asn1Value is a partition_coproduct! over ASN.1 universal-tag cases. The current published support covers the cases that have unambiguous DER encoding in X.690 §8:

  • Boolean (tag 0x01) — DER encodes false as a single byte 0x00, true as a single byte 0xFF (X.690 §8.2.2).
  • Integer (tag 0x02) — minimum-octets two’s-complement big-endian (X.690 §8.3).
  • OctetString (tag 0x04) — primitive encoding (X.690 §10.2).
  • Null (tag 0x05) — zero-length content (X.690 §8.8.1).
  • Sequence (tag 0x30) — children DER-encoded in declared order (X.690 §8.9). Used for both SEQUENCE and SEQUENCE OF.

§Canonical-bytes layout (DER)

Every Asn1Value::tagged_bytes() returns a self-describing DER-encoded byte sequence; the ψ_9 canonicalizer is the identity on this layout because DER is itself the canonical form.

Re-exports§

pub use model::AddressModel;
pub use model::AddressModelBlake3;
pub use model::AddressModelKeccak256;
pub use model::AddressModelSha3_256;
pub use model::AddressModelSha512;
pub use model::AddressRoute;
pub use pipeline::address;
pub use pipeline::address_blake3;
pub use pipeline::address_keccak256;
pub use pipeline::address_sha3_256;
pub use pipeline::address_sha512;
pub use pipeline::AddressFailure;
pub use pipeline::AddressOutcome;
pub use pipeline::AddressWitness;
pub use pipeline::VerifyError;
pub use shapes::MAX_ASN1_DEPTH;
pub use value::canonicalize;
pub use value::Asn1Value;
pub use value::validate_der;
pub use value::Asn1Carrier;
pub use verbs::address_inference;
pub use verbs::VERB_TERMS_ADDRESS_INFERENCE;
pub use crate::resolvers::AddressResolverTuple;

Modules§

model
asn1::AddressModel* — the asn1 realization’s PrismModel declarations, one per admissible σ-axis (crate::hash). Each binds the shared AddressResolverTuple ψ-tower and the axis’s capacity profile (AddrBounds for the 32-byte axes, AddrBounds64 for sha512). AddressModel (sha256) is the default.
pipeline
asn1::address — the ASN.1 realization’s public entry point.
shapes
Grammar constant for the ASN.1 realization. The capacity profile is the shared crate::bounds::AddrBounds; only the recursion stack-safety bound lives here.
value
ASN.1 DER typed input (ADR-023 amended by ADR-060).
verbs
ASN.1 realization’s ψ-chain content-address derivation verb (wiki ADR-024 + ADR-035 + ADR-036 + ARCHITECTURE.md “Common verb arena”).