Skip to main content

Module value

Module value 

Source
Expand description

ASN.1 DER typed input (ADR-023 amended by ADR-060).

DER is the canonical form by construction (ITU-T X.690 §10): a well-formed DER byte sequence is its own canonical representative, so the ψ₉ canonicalizer is the identity on it. The realization therefore validates the input is valid DER at the host boundary and flows the input bytes themselves through the pipeline as a zero-copy [TermValue::Borrowed] carrier — no transformation, no buffer, no width / element-count ceiling. The only retained bound is MAX_ASN1_DEPTH, a native-stack-overflow guard on the recursive TLV validator.

Asn1Value (the owned DER builder, alloc-gated) constructs canonical DER programmatically (boolean, integer, sequence, set, …) for reference and testing; Asn1Carrier is the borrowed model-input handle the pipeline binds.

§Supported universal-tag cases

Boolean, Integer, BitString, OctetString, Null, ObjectIdentifier, Utf8String, PrintableString, IA5String, UTCTime, GeneralizedTime, Sequence, Set.

Structs§

Asn1Carrier
Borrowed validated-DER input handle (ADR-060 borrowed carrier). DER is canonical, so the handle borrows the input bytes directly and as_binding_value returns them as a zero-copy Borrowed carrier.
Asn1Value
Owned DER value + builder. Constructs canonical X.690 DER programmatically for reference and testing. alloc-gated — the pipeline binds the borrowed Asn1Carrier handle, which needs no allocator. There is no width or element-count ceiling.

Functions§

canonicalize
Canonical-bytes accessor — DER is the canonical form per X.690 §10, so canonicalization is the identity on validated input.
validate_der
Validate that raw is a single well-formed DER value per X.690 §§ 8 / 10 / 11 (not merely valid BER — long-form lengths below the short-form threshold and indefinite lengths are rejected).