Obfuscate or deobfuscate data using ChaCha20 with an ARID-derived key.
This function uses ChaCha20 as a stream cipher to XOR the data with a
keystream derived from the ARID. Since XOR is symmetric, the same function
is used for both obfuscation and deobfuscation.
The result appears as uniform random data to anyone who doesn't have the
ARID, hiding both the structure and content of the reference envelope.
Port of obfuscate_with_arid() from arid_derivation.rs lines 47-91.
Obfuscate or deobfuscate data using ChaCha20 with an ARID-derived key.
This function uses ChaCha20 as a stream cipher to XOR the data with a keystream derived from the ARID. Since XOR is symmetric, the same function is used for both obfuscation and deobfuscation.
The result appears as uniform random data to anyone who doesn't have the ARID, hiding both the structure and content of the reference envelope.
Port of
obfuscate_with_arid()from arid_derivation.rs lines 47-91.