pub fn encrypt_enc_to_user_id(key: &[u8; 32], to_user_id: &[u8; 32]) -> [u8; 32]Expand description
Encrypt a 32-byte identity id with AES-256-ECB (DIP-15
contactInfo.encToUserId).
Exactly two raw AES blocks — no IV, no padding. ECB is sound
for this one field per DIP-15’s own analysis: the plaintext is
itself a SHA-256 output (pseudorandom, no repeated-block structure)
and the key — a dedicated hardened child at
rootEncryptionKey/2^16'/index' — is never reused for any other
purpose. Do NOT use this for anything but encToUserId.