You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Niclas Olofsson edited this page Jun 26, 2021
·
1 revision
The encryption from bedrock version 1.17 and forward changed. The new encryption use standard AES CRT non-blocking cipher, however it is used in a non standard way. Some notes on the implementation in MiNET.
The CRT implementation in Bouncy Castle normally require you to terminate the encryption session in order to output the finished, encrypted message. However, since bedrock is implemented as a stream-based crypto, this doesn't actually work. So the code for encrypting and decrypting keeps the crypto context live throughout the entire session with the player (client).
IV
The optimal IV for CRT is 12 bytes long. However, the implementation require 16 bytes. Hence an additional 4 bytes, ending with a 0x02, are added to the finished IV.