Creating an Encrypted Portable Container for ZeroNet

submited by
Style Pass
2024-04-17 13:30:06

I have two Linux machines that I constantly switch between, and I had a problem syncing my ZeroNet1 data between my machines. Additionally, I didn’t want to share my data with a third-party server. So, I decided to make a portable USB stick for my ZeroNet that could not only be used with my devices but also with any other device running Linux. This approach also solved another problem I had with ZeroNet, which was its lack of encryption. Now, I could encrypt my USB stick and my ZeroNet data inside it without any complications.

And I thought that sharing the process of doing so would save a lot of time for someone experiencing the same problem. So here’s how I set up my portable container:

Always before encrypting any devices, you should securely wipe the device so that the previous data on it becomes unrecoverable in case you lose the device or it gets stolen. To wipe this USB stick, all I did was fill it with zeros until there was no space left on it:

I recommend reading from /dev/urandom as most modern Flash Memory devices use compression features, which can compress a pattern of zeros and prevent the device from getting fully and securely wiped. However, with /dev/urandom, you’ll get fairly fast-generated pseudo-random data that cannot be compressed, making it the safer approach.

Leave a Comment