Skip to main content

Questions tagged [compression]

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

Filter by
Sorted by
Tagged with
5 votes
2 answers
1k views

Will compression help defeat single letter frequency attack against a mono alphabetic substitution cipher?

Alice has a long message to send. She is using mono alphabetic substitution cipher. She thinks that if she compresses the message it may protect the text from single letter frequency attack by Eve. ...
JavaiMaster's user avatar
2 votes
1 answer
864 views

Building blocks of SHA-1 and SHA-2

I ask myself some questions about the compression function of SHA-2 (and SHA-1) hash function. Are these compression functions based on a block cipher? I've not found this information on Wiki... So, I ...
Spock54's user avatar
  • 31
12 votes
1 answer
15k views

Encoding vs. Compression vs. Encryption

In what ways does encryption differ from proprietary/secret compression schemes and codecs?
ProductionValues's user avatar
3 votes
2 answers
407 views

Can you compress an elliptic curve private key in half?

According to this, an $n$-bit key offers about $n/2$ bits of security. That got me wondering, can you compress the key in half? At first blush, no, because the key is essentially a random number, and ...
Christopher King's user avatar
3 votes
1 answer
1k views

Compression-Ratio Side Channel

I'm working through the matasano crypto challenges, and I'm onto set 7, where they describe an attack on encryption/compression oracles. I am having trouble understanding the attacks, more so the ...
Austin Wile's user avatar
9 votes
2 answers
2k views

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 ...
Neil Madden's user avatar
1 vote
1 answer
610 views

Can a compressed checksum be considered unique

I'm kind of guessing that the answer may be no. Since the compression is trying to reduce the output size using various optimization methods, this may cancel the properties of a hash algorithm. But ...
Spack's user avatar
  • 113
2 votes
0 answers
137 views

Is it possible to enumerate the possible RSA keys? [duplicate]

As far as I understand ECDSA keys are smaller than RSA because all of the value of the ECDSA (up to a high number) are valid private keys. Is there any method of compressing RSA keys, based on some ...
fadedbee's user avatar
  • 968
16 votes
5 answers
31k views

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's user avatar
  • 161
0 votes
2 answers
427 views

Would a non-deterministic (read: randomized) compression algorithm be crypto-safe?

Would a compression algorithm that randomly shifts stuff around every iteration be TLS/crypto-safe? This randomization would prevent the same byte sequence from appearing twice in a row, thus making ...
SoniEx2's user avatar
  • 123
3 votes
1 answer
4k views

Compression in key generation of DES algorithm

Does anyone have a pseudo-code or an algorithm or even a diagram of the compression (pc2) of the DES algorithm? I can't find a relation between the bits that are dropped, even when I do it manually ...
Balkis's user avatar
  • 55
5 votes
2 answers
663 views

Performing simple arithmetic operations on compressed, and both compressed and encrypted data

We all know it is possible to perform addition and multiplication operations on encrypted data by means of homomorphic encryption methods. My questions are: Is there any cryptosystem that is able to ...
Samet Tonyalı's user avatar
1 vote
0 answers
579 views

Compressing AES [duplicate]

I have this program which encrypts multiple files using AES then compress it using LZO into one single file. The problem is that the final file is almost equal in size than all the files which means ...
Shockwave's user avatar
0 votes
1 answer
111 views

How to compare two CSPRNGs? [duplicate]

Let's say I am given to CSPRNGs: RNG1 and RNG2. I want to select the best one of the two for cryptography. How should I do it? Any of the two RNGs can be initialized with a secret key during tests and ...
daruma's user avatar
  • 385
0 votes
0 answers
199 views

Symmetric encryption with compression for MySQL DB data

I would like to compress data before encrypting and storing it in a MySQL DB to reduce especially bandwith requirements (compression reduces bandwith by 70-80%). At present, all is handled by a server-...
azren's user avatar
  • 751
5 votes
4 answers
8k views

Is there an existing cryptography algorithm / method that both encrypts AND compresses text?

So I'm trying to find a method of encryption that not only obfuscates text, but also compresses the result. For example, if I encrypted ninechars, the ideal result ...
Grant Miller's user avatar
6 votes
6 answers
13k views

Why can't we use a hash with no collision to compress data reliably?

According to Wikipedia, a hash maps digital data of arbitrary size to digital data of fixed size. For all practical measures, a hash is a unique signature of a big chunk of data. But there is such a ...
cregox's user avatar
  • 176
1 vote
1 answer
2k views

Extracting a WinRAR password?

If I have an original file and a WinRAR password protected .rar file containing that file, can I extract the password?
ASD's user avatar
  • 19
2 votes
1 answer
346 views

Compression in Symmetric Encryption?

When using symmetric encryption is it important to compress the data first? I think that compression will make data look "more random" and therefore be more difficult to crack, but I am not sure if ...
Brennan.Tobias's user avatar
0 votes
1 answer
771 views

Huffman encoding of hashes

I have a huge list of MD5 hashes, which takes up quite some space. I wonder whether I would achieve (some) compression by encoding the characters (which are A-F 0-9), with Huffman coding. I made a ...
user3231622's user avatar
3 votes
1 answer
735 views

Decryption of Huffman code

I know that Huffman is not a encryption method, but I have a bit-stream that I know it's Huffman coded. However, the tree/table that maps the codes to real characters is not available. Surprisingly, ...
Mahdi Dolati's user avatar
1 vote
1 answer
1k views

SHACAL-2 vs. AES as underlying block cipher for Secure Hash (aka SHA-256)

The hashing scheme SHA-256 (for instance) is based on Merkle-Damgård construction with the underlying compression function based on the block cipher SHACAL-2 configured in Davies Meyer mode. SHACAL-2 ...
Evgeni Vaknin's user avatar
4 votes
2 answers
785 views

Is it ever unsafe to compress an EC point?

I am working with a library that outputs EC points in uncompressed form. To save space, I'm considering modifying said library to use compressed EC points. Assuming that I keep track of the sign bit ...
makerofthings7's user avatar
8 votes
1 answer
1k views

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 ...
Johan O's user avatar
  • 261
1 vote
1 answer
703 views

why do files downloaded with http and https have the same size?

while working with Encryption mostly cipher text is always larger the plain text, why isn't that the case when downloading a file using https ? even that compression isn't much used anymore because if ...
XEL's user avatar
  • 13
5 votes
5 answers
509 views

If classical ciphers are used with compressed plaintext, how much does it make frequency analysis attack harder?

Classical ciphers, such as the Vigenère cipher, are weak and no longer used. They can be broken by using frequency analysis, which is a well-known fact. However, frequency analysis often depends on ...
比尔盖子's user avatar
4 votes
1 answer
119 views

How does the attacker include input before compression and encryption in CRIME?

I have read this article about the CRIME attack against TLS and SPDY. The article says that: What is not yet clear is how the attacker is including their input in the source material before it gets ...
MinecraftShamrock's user avatar
3 votes
3 answers
4k views

Point decompression on an elliptic curve

I'm programming an elliptic curve cryptosystem and I'm having difficulty with decompressing points. The following information is from my project specification as to my understanding: Given a point $x$...
josh's user avatar
  • 31
9 votes
2 answers
25k views

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+ ...
James Horst's user avatar
1 vote
1 answer
297 views

Keccak and compression functions

Keccak follows a sponge construction. Can we say that Keccak employs a compression function? Generally speaking, for sponge constructions, can we say that there is an underlying compression function?
Dingo13's user avatar
  • 2,897
4 votes
1 answer
484 views

Repeatable crypto

Is there a safe way to do crypto that will always produce the same result for a given input? My use case is transferring deltas of huge files, to a backup server. The backup server has no knowledge ...
Ruben Vermeersch's user avatar
4 votes
1 answer
166 views

OTT service using FPE

Would it be possible to create an Over-The-Top communication utility that will encrypt voice using format preserving encryption (voice clear-text to audio encrypted stream) and send that over an ...
user1028028's user avatar
4 votes
1 answer
247 views

Compression function to guarantee randomness of one time pads?

First of all, I would like to note that I am not building my own crypto. I am simply curious and would like to learn. What I am wondering is this: if we are worried about randomness of something ...
Bobby Newmark's user avatar
6 votes
2 answers
325 views

Is there a way to compress multiple signatures of the same data?

So, I'm working with a system that allows individual users to each have their own private-public key pair. I would like to allow multiple users to use their private key to sign the same piece of ...
mczarnek's user avatar
  • 203
9 votes
2 answers
3k views

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 ...
Cedric Martin's user avatar
2 votes
1 answer
1k views

Is it safe to use GZIP to avoid padding related attacks

I am designing a library that supports encrypting some in-memory data using AES in CBC mode. Now I need a padding but it seemed to me that Apple's CommonCrypto library and OpenSSL have different ...
Maxthon Chan's user avatar
2 votes
2 answers
2k views

Does it make sense to have a compression function that uses 64-bit of the message to create an output of 64-bit?

I have a very simple compression function, which looks like this in C++: ...
z7ea8gozm5's user avatar
4 votes
1 answer
322 views

How secure is this use of Ziv-Lempel encoding?

I'm reading patent application US 20120278897 A1 — “System and method of sort-order preserving tokenization”. Near the bottom they describe their token generation algorithm, which basically involves ...
pg1989's user avatar
  • 4,716
24 votes
3 answers
2k views

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 ...
DashDotDashDot's user avatar
2 votes
2 answers
4k views

Attack XOR encryption of binary data compressed by zlib with known key length (very short key)

I am trying to break a packet format. The packet format simply packs several files into one big file. The file contents are plain. But the index data which contain offsets, file sizes and filenames ...
Dr. Alpha's user avatar
  • 121
79 votes
2 answers
187k views

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 ...
alex's user avatar
  • 901
-1 votes
1 answer
363 views

data structure of random / compressed data

can anybody explain to me what data structure results after data is compressed? I just try to find out the difference between random data and compressed data, the entropy of both is very high while ...
tom's user avatar
  • 397
14 votes
3 answers
8k views

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. ...
Bill's user avatar
  • 293
4 votes
1 answer
684 views

Using compression to test encryption

Is the uncompressibility of encrypted data a necessary property for a good cryptographic algorithm? To make a crude experiment, I encrypted an 8K file with all 'A' and then compressed both the ...
Remo.D's user avatar
  • 245
10 votes
6 answers
6k views

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 ...
pratchit's user avatar
  • 129
20 votes
4 answers
5k views

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 ...
user5507's user avatar
  • 1,923
2 votes
2 answers
356 views

Seeking special-use fingerprinting/hashing algorithm

For a project I wonder if there exists some kind of fixed-size checksumming/fingerprinting function in which based on this fingerprint given data block 1, it is easy to generate more data blocks that ...
Marcos's user avatar
  • 153
16 votes
2 answers
4k views

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 ...
fgrieu's user avatar
  • 145k

1
2