Skip to main content

wrap_group_key

Function wrap_group_key 

Source
pub fn wrap_group_key(
    wrap_key: &[u8; 32],
    group_key: &[u8; 32],
    tenant: &str,
    sub_hash: &[u8; 32],
    prefix: &str,
) -> Result<Vec<u8>, String>
Expand description

Wrap a group key for a specific subscriber.

Returns (nonce || ciphertext) as an opaque blob suitable for wire transport.

ยงArguments

  • wrap_key - 32-byte key derived from derive_wrap_key()
  • group_key - 32-byte group key to wrap
  • tenant - verified tenant/domain (bound via AAD)
  • sub_hash - 32-byte subscriber identity hash (bound via AAD)
  • prefix - Topic prefix string (bound via AAD)