Tom's Data Onion is a programming puzzle from Tom Dalling that you can find here:
https://www.tomdalling.com/toms-data-onion/
This project contains a possible solution implemented in Python 3. The puzzle consists of 6 Layers, which have to be decrypted one by one to encounter the encrypted next layer.
Module tomsdataonion.py contains the puzzle solving code. Module tomtelvm.py contains some helper code for a certain layer. For each layer there is a function peelN() to handle that layer and a function callPeel() with the common boilerplate for each layer.
The code is improvable in many aspects and contains nearly no comments yet, because I was to lazy to add them, because I only wanted to solve the puzzle. Feel free to improve it and share the result.
I've solved the puzzle up to the final layer without any obvious error, but the final result seems to be wrong even when I consider what Tom said about the final result.
So, I would like to hear from you if you discover any bugs in the code, particularly if they lead to a more plausible result.
First of all thanks Tom for this nice and challenging puzzle, which made me learn something new.
Thanks to iKieronJ on Reddit for his hint about using Python to solve layer 5.