Question about encrypt.

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Viserion
Posts: 63
Joined: Fri Sep 12, 2014 11:02 pm

Question about encrypt.

Post by Viserion »

Hi. :)

So, I'm learning about encrypt and working in my own encrypt using some lib. But my question is:
- Why manys MMORPG use zlib? In some benchmarks, the performance of zlib is bad compared with anothers libs...

Link: http://catchchallenger.first-world.info ... LZ4_vs_LZO

Thanks,
Cheers!
Aidan729
Posts: 13
Joined: Tue Jun 30, 2015 3:28 am

Re: Question about encrypt.

Post by Aidan729 »

Hey,

I think you are a little confused on what zLib actually is.

zLib is a datta compression library. Not an encryption.

a good example of a well written encryption library would be something more like Salsa20.

https://en.wikipedia.org/wiki/Salsa20

this encryption is specifically used in the later version of the .ff (fast file) asset archive for call of duty (past mw2)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Question about encrypt.

Post by aluigi »

I worked on similar stuff just recently.
lz4_fast is really awesome in terms of speed and with a good compression ratio so it's good for real time data or when uncompressing lot of data like big archives.

lzo is not so good in my opinion, in a "challenge" between lzo1, lzo1x and lzo2a the last one is the best.

If you have to compress a big amount of data with the best compression ratio then lzma and lzma2 are the choice.

Anyway the thread is twice off-topic: wrong section (Code talk was the good one) and encryption and compression mixed.
Viserion
Posts: 63
Joined: Fri Sep 12, 2014 11:02 pm

Re: Question about encrypt.

Post by Viserion »

Sorry about section.

About topic, so, I looking a better speed and memory usage.

No one has any reason for which some companies choose the zlib?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Question about encrypt.

Post by aluigi »

Because zlib has a very flexible API interface and is supported/wrapped on many programming languages.
It allows to keep the dictionary/state for using the compression on multiple blocks of data and do other things.

In the fast compression libraries only lz4 has something similar.

While for the libraries used to compress big amount of data there is lzma that is flexible and portable almost like zlib.