I have the assumption there is no added protection at all.
相关问题
- “Zero out” sensitive String data in Swift
- iOS (objective-c) compression_decode_buffer() retu
- High cost encryption but less cost decryption
- Is there a public implemention of LZSS compression
- C# Rijndael decryption returns extra question mark
相关文章
- decrypt TLS 1.2 AES-GCM packet
- c# saving very large bitmaps as jpegs (or any othe
- Decrypting EnvelopedCms with non-default Algorithm
- C# AES Rijndael - detecting invalid passwords
- Sanity check SSH public key? [closed]
- How to extract zip file using dotnet framework 4.0
- data encryption and key management in c#
- What is an openssl iv, and why do I need a key and
Warning: if an attacker controls part of the plaintext that gets compressed, and can observe the size of the resulting encrypted ciphertext, they may be able to deduce the rest of the plaintext, by adjusting the part that they control until the length of the ciphertext decreases (which implies that there was some repetition between the part of the plaintext they control and the secret part of the plaintext).
See https://en.wikipedia.org/wiki/CRIME for example.
Encryption works better on short messages, with a uniform distribution of symbols. Compression replaces a message with a non-uniform distribution of symbols by another, shorter sequence of symbols that are more uniformly distributed.
Therefore, it's mathemathically safer to compress before encryption. Compression after encryption doesn't affect the encryption, which remains relatively weak due to the non-uniform distribution of plaintext.
Of course, if you use anything like AES256, and the NSA isn't after you, this is all theory.