These libraries have not received an independent cryptographic audit and are not production-ready. They are published for interoperability review.
Decapsulation_failed, so that it does not tell its peer which step failed. Http_binding.Gateway.error_response answers all of them alike. That includes the post-quantum KEMs: ML-KEM decapsulates a tampered ciphertext to an unrelated secret, so the request fails when it is opened, and a hybrid refuses an invalid elliptic-curve element; both are Decapsulation_failed.Chunked.Receiver.finish succeeds. Data is returned as it arrives, so a caller that acts on it earlier accepts the risks of truncation that Section 7.1 of the draft describes. Chunks beyond the size limit are refused from their length, before they are buffered.content-length before it is read, or once it has been counted past the limit, and nothing of it is kept. The limits default to 1 MiB for a request, 8 MiB for a response, and 256 requests in flight for each relay or gateway (Ohttp.Service), and a gateway checks the length of a request again before opening it.Replay.check keeps the encapsulated keys of recent requests and checks their date field, as RFC 9458 Section 6.5 describes, but only for a gateway that calls it, and only within one process. Requests that are not idempotent need it. With ~require_date:false, a request without a date can be replayed once its key has been forgotten, and a full cache refuses requests rather than let one through unremembered.mlkem package is as unaudited as these libraries.Gateway.create takes several keys so that an old one can stay beside a new one.?padding is there for callers that need to hide it (RFC 9458 Section 6.2.3).ohttp-cohttp-lwt, ohttp-cohttp-eio, ohttp-piaf) and of examples/ do not limit the rate of requests, nor how slowly a message may arrive: a client that sends slowly holds one of the places in flight for as long as it takes. A deployment puts rate limits and timeouts in front of them; only a relay can limit each client, since a gateway sees only relays. Their relays pass on only the content and its type, but do none of the traffic analysis defences of RFC 9458 Section 6.2.Ohttp.Service without the adapters must choose its targets as carefully: one that forwards anywhere is an open proxy.GET, and trusts what it gets. It is the application's to fetch them from a source that authenticates the gateway.Ohttp.Chunked follows a draft, and its interface may change.hpke.for_testing is a dependency of the tests only. Client.encapsulate_with accepts a sender setup so that the tests can reproduce published vectors; with any setup that the hpke library itself provides, it is as safe as Client.encapsulate.Report suspected vulnerabilities privately to through Github rather than through public issues.