i know it doesn't have authentication so an attacker could impersonate anyone, but it's just a basic recreation which allows you to understand the functionality. You could - use the K as a XOR key and ...