Function split_composite
pub fn split_composite(
bytes: &[u8],
) -> Result<(Vec<u8>, Option<Vec<u8>>), Error>Expand description
Split a nested composite blob into its raw component signatures
(ed25519_signature, Option<mldsa65_signature>).
This is the inverse projection of assemble_composite_nested: record
layers that persist the composite in a decomposed schema (e.g. the at9p
capsule/update CoseCompositeSignature, storing the EdDSA and ML-DSA-65
signatures in separate fields) sign via sign_composite, store the two
raw signatures returned here, then reconstruct the nested blob with
assemble_composite_nested for verify_composite. The signatures are
the raw component signatures (64-byte Ed25519, 3309-byte ML-DSA-65); the
kids and protected headers are deterministic and rebuilt on reassembly.
The inner→outer binding (the outer ML-DSA layer signs payload ‖ inner_sig)
is preserved by that reassembly + verify round-trip — it is not something
the decomposed store has to carry.