Skip to main content

build_error_envelope

Function build_error_envelope 

Source
pub fn build_error_envelope(
    signing_key: &SigningKey,
    pq_signing_key: &MlDsaSigningKey,
    message: &str,
) -> Bytes
Expand description

Build a signed ResponseEnvelope (request_id = 0) carrying message as the payload. Used when the processor itself fails — guarantees the client sees a parseable envelope rather than EOF.

#275: emits the mandatory Hybrid COSE composite. Callers must supply both signing components; this constructor has no classical fallback.