Had the same question then read the whitepaper (section 6).

https://github.com/permissionlesstech/bitchat/blob/main/WHIT...