Package-level declarations

Types

Link copied to clipboard

The capability contract of CryptoBackend (docs/adr/0001-crypto-capabilities.md), checked on one backend: supports(x) is false exactly when the operations on x throw UnsupportedAlgorithmException. So a backend that answers yes runs those operations and gets them right, one that answers no throws that exception from them and nothing else, and the answer does not change.

Link copied to clipboard

What a backend answers to every capability question (CapabilityInvariant.questions), as a few lines of text for a test log: one line per kind of question, each starting with LINE_PREFIX, so a build or a CI log can pick them out. Run on every target, the lines show what each platform's cryptography offers through the backend, for instance that WebCrypto has no ChaCha20/Poly1305.

Link copied to clipboard

A capability question whose answer a backend does not live up to (CapabilityInvariant): it says yes and an operation fails or gives a wrong result, or it says no and the operations run, or fail with another exception than UnsupportedAlgorithmException, or the answer changes.

Link copied to clipboard

The conformance suite of a CryptoBackend: its supports answers hold (CapabilityInvariant, docs/adr/0001-crypto-capabilities.md) for every AEAD, key type, signature algorithm, KEM and hash, and the capability report goes to the test output. A backend's tests extend it in their common source set, so it runs on every target the backend builds for:

Link copied to clipboard
abstract class MlDsaConformanceTest

FIPS 204 known-answer tests from NIST's ACVP vectors (github.com/usnistgov/ACVP-Server, commit 975de31e), replayed through the public operations of any backend with ML-DSA: key generation from NIST's ξ, NIST's signatures byte for byte, NIST's verdicts, and the checks on imported keys. ML-DSA here is pure ML-DSA with an empty context, as COSE uses it (draft-ietf-cose-dilithium).

Link copied to clipboard
abstract class MlKemConformanceTest

FIPS 203 known-answer tests from NIST's ACVP vectors (github.com/usnistgov/ACVP-Server, commit 975de31e), replayed through the public operations of any backend with ML-KEM: key generation from NIST's d || z, encapsulation with NIST's m, decapsulation with NIST's keys, implicit rejection, and the input checks of FIPS 203 §7.2 and §7.3.

Link copied to clipboard
class ScriptedRandom(script: ByteArray)

Random bytes from a script, handed out in order, so that a backend under test replays a known-answer vector through its public operations: the d || z and m of ML-KEM (FIPS 203 Algorithms 19 and 20), the ξ and rnd of ML-DSA (FIPS 204 Algorithms 1 and 2).