Tree Substitution Cipher
Generation Algorithm:
- Generate random tree. Tree nodes contain ID, Neighbours and Data (an integer)
- Key is root's ID
To encrypt:
- Write data in nodes in BFS order with sorting by IDs
- Encrypted is dict where key is ID and value is Node's data
To decrypt:
- Write data in nodes by ids
- Read in BFS order with sorting by IDs