Amarula.Protocol.AppState.Keys (amarula v0.1.0)
View SourceExpand an app-state-sync key into the five mutation sub-keys, ported from
Baileys mutationKeys/expandAppStateKeys (pre-WASM chat-utils.ts):
HKDF(key_data, 160, salt="", info="WhatsApp Mutation Keys")sliced into 5 × 32 bytes, in order:
index_key— HMAC the record indexvalue_encryption_key— AES-256-CBC the record valuevalue_mac_key— HMAC (SHA-512) the value MACsnapshot_mac_key— HMAC the snapshot (LTHash) MACpatch_mac_key— HMAC the patch MAC
Summary
Functions
Expand the 32-byte app-state-sync key_data into the five sub-keys.