Skip to main content

codec_multikey/
lib.rs

1// SPDX-FileCopyrightText: 2026 ReallyMe Technologies Limited
2//
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5//! Multikey public-key encoding: a multicodec algorithm prefix plus multibase,
6//! with strict length and binding validation on decode.
7//!
8//! RSA public-key bytes are an opaque payload in this codec profile, bounded
9//! to 4096 bytes. Parsing an RSA multikey does not validate ASN.1 DER or the
10//! cryptographic key; the consuming crypto layer must do that before use.
11
12mod binding;
13mod encode;
14mod error;
15mod map_public_key_error;
16mod parse;
17
18#[allow(deprecated)]
19pub use binding::{
20    binding_type_matches_codec, validate_key_binding, validate_multikey_binding, KeyBindingInput,
21};
22pub use encode::encode_multikey;
23pub use error::{
24    BindingAlgorithmKind, BindingTypeKind, CodecNameReason, MultikeyCodecKind, MultikeyError,
25};
26pub use parse::{parse_multikey, ParsedMultikey};