pub fn encode_tbsdata<'b>(
noc: &[u8],
icac: Option<&[u8]>,
own_eph_pub_key: &PublicKey,
peer_eph_pub_key: &PublicKey,
buf: &'b mut [u8],
) -> Result<&'b [u8]>Available on crate feature
rustcrypto only.Expand description
Encodes a sigma-2-tbsdata or sigma-3-tbsdata — the structure that is signed but never
transmitted (§4.14.2.3).
Both have the same shape: the signer’s certificate chain, then its own ephemeral public key, then the peer’s. The order of the two ephemerals is what distinguishes a Sigma2 signature from a Sigma3 one, and is therefore what stops one being replayed as the other.