Expand description
Shared workflow plumbing — transport exchange + SCP wrap/unwrap (PDD §5.9/§5.10).
These helpers are the single point where a built C-APDU plaintext meets the
Transport and (for an open channel) the backend’s wrap/unwrap. Keeping
them here means every workflow drives the wire identically:
transmit_plain— pre-auth exchange (SELECT, GET DATA, the IU/EA ofopen_scp): send raw, splitdata ‖ SW.transmit_in_session— over an openScpSession: wrap the plaintext (C-MAC, optional C-ENC), send, verify/strip the response, splitdata ‖ SW. The fail-closed tear-down on an unwrap failure lives in the backend (Fork F3); this helper only propagates the error.
no_std: alloc-free; the split borrows into bounded heapless buffers.