Questions tagged [compression]

Compression is the reduction in size of data without losing information.

Compression is the reduction in size of data in order to save space. In the cryptographic field, it is not uncommon to compress big data files before encrypting them. Among the reasons for compression is the reason that a smaller filesize simply compresses faster, taking less time and using less resources.

98 questions
82
votes
3 answers

What is safer: ZipCrypto or AES-256?

Like in title: which one of these encryption methods (ZipCrypto, AES-256) is more secure and why? I am asking about it because I'd like to know which should be preferred when compressing files with Zip.
alex
  • 931
  • 1
  • 9
  • 12
24
votes
3 answers

Selective format-compliant JPEG encryption?

I am working towards building a format-compliant encryption system for pictures. The aim of it is to be able to obscure specific areas of a picture (i.e. faces, car license numbers...) while keeping the rest unaltered. The aim would be, for…
20
votes
4 answers

Is compressing data prior to encryption necessary to reduce plaintext redundancy?

As explained in William Stallings' Book, in PGP encryption is done after compression, since it reduces redundancy. I couldn't relate encryption strength with redundancy. Could anyone explain more on that?
user5507
  • 1,933
  • 5
  • 21
  • 29
16
votes
6 answers

Is the decompression of compressed and encrypted data without decryption also theoretically impossible?

We have two communication points in an information system, call them A(lice) and B(ackup). B has to store encrypted data received from A. The storage of B is encrypted, but not compressed1. B should have no option to decrypt the data of A2. However,…
peterh
  • 390
  • 5
  • 18
16
votes
5 answers

Is it better to encrypt before compression or vice versa?

Is it better to encrypt a plain text file before compression, or vice versa?
fola
  • 161
  • 1
  • 1
  • 5
16
votes
2 answers

How much can we compress RSA public keys?

To what degree can we define an RSA variant, with a security argument that it is as safe as regular RSA with a given modulus size $m$ (e.g. $m=2048$), in which the public key has a compact representation of $k\ll m$ bits? We can fix the public…
fgrieu
  • 149,326
  • 13
  • 324
  • 622
14
votes
3 answers

Why is ciphertext from low entropy plaintext not compressible?

This comes following a discussion with a colleague. My plaintext file plain consists of a about 100,000 lines of "all work and no play...". It's size is: 2.2 MB. Compressed it is: 5.4kB I encrypt the original: openssl aes-128-cbc -in plain -out…
Bill
  • 293
  • 2
  • 5
12
votes
1 answer

Encoding vs. Compression vs. Encryption

In what ways does encryption differ from proprietary/secret compression schemes and codecs?
10
votes
6 answers

Crypto-Compression Algorithms?

I was wondering, whether there exist such algorithms/enciphering procedures which both compress and encrypt the input data. That means, for starters, the output will be both smaller in size and difficult to decrypt...and if the compression algo is…
pratchit
  • 129
  • 1
  • 3
9
votes
3 answers

Can one use a reversible hash algorithm as a compression function?

As we know any input to SHA-256 will be returned as 64 hex length output. Is it possible to create a hash that can do the same thing as SHA-256 but can be reversed, so if we have the output of 64 length of hex number, we can reverse it and get…
9
votes
2 answers

Is it ever safe to use encryption with compression?

In the wake of compression-based side-channel attacks like CRIME and BREACH, are there any safe ways to combine compression and encryption? The JWE Specification was finalised almost 2 years after BREACH, but still includes DEFLATE compression as an…
Neil Madden
  • 557
  • 3
  • 13
9
votes
2 answers

Breaking ZIP 2.0 encryption without password

I have an old sourcecode backup from my DOS days stored in a ZIP 2.0 encrypted archive, but I lost the password. The password was written on a paper slip, but I remember that it consisted of 30+ completely random alphanumeric characters with some…
9
votes
2 answers

How does compression before encryption leak info about the input?

Apparently current best practices recommend that you do not compress before you encrypt. For example in this blog entry (*): http://sockpuppet.org/blog/2013/07/22/applied-practical-cryptography/ It is written: Developers shouldn’t compress…
Cedric Martin
  • 455
  • 4
  • 11
8
votes
6 answers

Can a large file be hashed down to 32 bytes, and then reconstructed from the hash?

We can hash a file or data using multihash or SHA-256, but can we retrieve the original data or file from the hash? Are there any methods to retrieve the original file or data from a hash of it without using IPFS? Or is there any encryption method…
Anu Davis
  • 368
  • 1
  • 2
  • 10
8
votes
1 answer

How can ECDSA signatures be shortened (to be used as a product key)?

So I made my own serial key generation software, using ECDSA, for use in my own applications and it works great so far! To keep the serial key short enough I use a 128 bit EC curve. My final signature (which I use as the product key) ends up…
Johan O
  • 261
  • 2
  • 6
1
2 3 4 5 6 7