freenet / freenet-core

Declare your digital independence

Home Page:https://freenet.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use stream compression to save data and pad messages to help censorship resistance

Destroyinator69420 opened this issue · comments

There is an open standard called ZSTD for stream compression. It is a new format inspired by Zlib but is optimized for lowering latency. Although Zlib has long been the standard for web compression, ZSTD is superior in terms of being faster compression while serving data over the internet while maintaining a ratio similar to gzip. (Zlib) https://github.com/facebook/zstd If l9cutus packets/messages are of one standard size, then compressing them with zstd will add a little entropy to the packets according to outside observers. This is because in practical use not all files are compressed with the same ratio as the benchmark.

If censorship resistance is the goal, then it would also make sense to pad the messages/packets after they have been compressed. There should be three settings for how large the padding should be. For small embedded devices the ratio should be no larger than 4%. For smartphones and tablets the padding should be no larger than 8%, and for desktops and laptops the padding no larger than 16%. It would also make sense to subtract 2% from the maximum when the device is running on battery power. In practice the padding will vary wildly within the maximum, but there should be a maximum to make sure that the network is protected from excessive padding and so that devices can run efficiently.

commented

No, compression is a trivial issue, and I am sure libp2p takes care of it.

pad the messages/packets after they have been compressed.

You have no idea how censorship resistance works. And this just sounds off, because you are not supposed to do it at this layer.
You are supposed to do it as some libp2p transport.

Take a look at https://github.com/geph-official/sosistab2 and stop spamming.

I was not aware that sosistab2 already existed.