Package-level declarations
Types
AEAD algorithms (RFC 9053 §4, RFC 8439 for ChaCha20/Poly1305).
Forward AES block permutation. CCM, CTR and CBC-MAC only ever need the encrypt direction.
A chain that a CertificateValidator does not trust.
Validates an X.509 chain against trust anchors: path, signatures, validity, usage. Shared by EDHOC (x5chain, x5t) and DTLS/TLS certificate mode. Name checks against the request belong to the caller. Parsing is not its job: dev.kcoap.crypto.x509.X509Certificate reads the parts the protocols need.
The single seam between protocol code and cryptography, in the spirit of libedhoc's crypto vtable: protocol modules never call a platform API directly, so a backend can be replaced by one for a secure element, Android KeyStore / Secure Enclave keys, a post-quantum provider, or a deterministic test double.
Converts ECDSA signatures between the raw r || s of CryptoBackend.sign and CryptoBackend.verify (COSE, RFC 9053 §2.1) and the DER ECDSA-Sig-Value ::= SEQUENCE { r INTEGER, s INTEGER } of X.509 and TLS (RFC 3279 §2.2.3, RFC 8422 §5.4).
Hash functions used by OSCORE and EDHOC. COSE ids from the IANA "COSE Algorithms" registry.
HKDF (RFC 5869) built on CryptoBackend.hmac.
Key-encapsulation mechanisms (FIPS 203), used by the post-quantum EDHOC cipher suites. The private keys of the keyType are the seed or the expanded decapsulation key (KeyType.seedLength, KeyType.expandedPrivateKeyLength).
The result of a KEM encapsulation (FIPS 203 §7.2): ciphertext goes to the key owner, the shared secret stays here.
A public key in the raw encoding of its KeyType, with the handle of its private key.
Kinds of asymmetric keys, with their raw encodings. Every public key crossing the CryptoBackend boundary uses the encoding documented here; protocol code converts to and from wire formats.
A private key, as a handle owned by a CryptoBackend. Protocol code never sees key material: it passes the handle back to the backend that created it. A backend for a secure element, Android KeyStore or the Secure Enclave subclasses this with a reference to the stored key.
Compressed SEC1 points (02 || x or 03 || x) for P-256 and P-384, expanded to the uncompressed 04 || x || y that KeyType.P256 and KeyType.P384 document (SEC 1 v2 §2.3.4).
Signature algorithms (COSE "Algorithms" registry). ML-DSA ids from draft-ietf-cose-dilithium.
A private key held in memory, used by software backends. encoded hands the raw bytes to the backend that performs the operation; nothing else should call it.
The backend does not provide algorithm where it runs. A backend reports a missing capability this way and no other, and the supports members of CryptoBackend answer false exactly where an operation would throw it.