Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [compression]

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

6
votes
6answers
11k views

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

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 ...
2
votes
2answers
129 views

AES-128 as compression function in Merkle-Damgard construction

Using a compression function $f : A × A → A$. A basic version given by: $W_0 = IV$ $W_1 = f(W_0, m_1)$ $W_2 = f(W_1, m_2)$ ... $W_n = f(W_{n-1}, m_n)$ $W_n$ is the output of the hash function, $...
2
votes
1answer
49 views

Password protection in ARJ: 3 characters of password are retrievable

On this site there is information that one can know first 3 characters (bytes) of the password without brute force. I know that ARJ in older versions has very simple encryption, i.e. XOR with ...
0
votes
1answer
57 views

The collision rate probability decreases when using compression?

Some standard compression procedures, like the IANA's gzip provided by HTTP protocol, will consume CPU-time anyway... So we can reuse compressed file, $Z(x)$, in the checksum procedure. That is, we ...
3
votes
1answer
57 views

Are there any algorithms or alternatives to create short signatures?

I am searching for a algorithm to verify that a short message (size of about 20-30 bytes) was created by a specific device/user. The device/user can be partially offline. Signing the data using rsa ...
0
votes
1answer
53 views

Why can an arbitrary compression function mapping $\{0,1\}^{m+2^m} \rightarrow \{0,1\}^m$ not seriously be considered collision resistant?

I recently got a question that I’ld like to share here, since answers might be useful (or at least interesting) for people diving into Merkle-Damgård hash constructions for the first time. We know ...
1
vote
1answer
223 views

Can compression + encryption sometimes be beneficial?

I hope this question hasn't been asked before: I searched and couldn't directly find it. It is known that in specific applications, compression followed by encryption leaks information of the length ...
3
votes
2answers
264 views

Decrypting two XORed compressed messages?

If through a previous attack, cipher misuse or two time pad etc. I receive $c=m_1 \oplus m_2$. Where $m_1$ and $m_2$ are compressed messages, for instance GZIPped English text documents. Can we ...
-1
votes
1answer
103 views

What are the differences between Encrypt+Compress and Compress+Encrypt a.When and where do we use them, explain it in a scenario

please help me with this What are the differences between Encrypt+Compress and Compress+Encrypt When and where do we use them, explain it in a scenario Thanks & regards Pavan
2
votes
1answer
256 views

Is TLS 1.2 compression methods in client_hello a mandatory field?

As stated int he question, is compression methods list in the client_hello in TLS 1.2 a mandatory field (it is clear that it is mandatory in session_resumption, but not clear to me whether it is ...
3
votes
2answers
245 views

Can compressed data be made to look like random data?

I saw the question "Decryption honeypots" and realized that if the message was compressed before being encrypted, then checking compressibility would not help you identify the decoded message. So if ...
2
votes
0answers
84 views

CRIME - attack TLS compression

In the CRIME attack slides at the Ekoparty presentation (where it was first introduced), I didn't get something. In slides 32-35 ( https://www.ekoparty.org/archive/2012/CRIME_ekoparty2012.pdf ) When ...
-1
votes
1answer
59 views

Integrity of Voice packets/ Audio signal

for encryption data packets, one should use GCM, CCM or EAX mode of operation to have confidentiality and integrity. What to do in case of voice packets? is it enough that audio signal gets compressed ...
1
vote
0answers
43 views

Is it possible to recover password having ZIP/AES file and unpacked file?

Is it possible to recover password having ZIP/AES file and unpacked file? Or unpack other files with the same password?
3
votes
1answer
181 views

How do you represent a compressed point on an elliptical curve over F2m?

I understand for prime curves it is just bytes(0x02 + flag) + bytes(x) where flag is the LSB of y. For the F2m curves I ...
1
vote
1answer
147 views

Ciphertext compression (Ring-LWE encryption and authentication system) after encryption?

Recently I came across an interesting looking cryptography article Ring-LWE Ciphertext Compression and Error Correction: Tools for Lightweight Post-Quantum Cryptography by Markku-Juhani O. Saarinen, ...
1
vote
1answer
72 views

Is using Euler's Totient/phi in Tonelli-Shanks (used to recover EC coordinate) safe?

I'm implementing an algorithm in order to recover the $y$ co-ordinate from $x$ in order to construct a co-ordinate pair that satisfies secp256k1's elliptic curve equation, which is: $y^2 = x^3 + 7 \...
2
votes
0answers
194 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. ...
1
vote
1answer
248 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 ...
8
votes
1answer
5k views

Encoding vs. Compression vs. Encryption

In what ways does encryption differ from proprietary/secret compression schemes and codecs?
1
vote
0answers
132 views

Can you compress an elliptic curve private key in half?

According to this, a $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 ...
2
votes
1answer
399 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 ...
6
votes
2answers
892 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 ...
1
vote
1answer
299 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 ...
2
votes
0answers
81 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 ...
6
votes
5answers
8k 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?
0
votes
2answers
226 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 ...
2
votes
1answer
1k 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 ...
6
votes
1answer
268 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 ...
1
vote
0answers
67 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 ...
0
votes
1answer
53 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 ...
0
votes
0answers
150 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-...
3
votes
4answers
4k 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 ...
2
votes
3answers
5k 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 ...
1
vote
1answer
1k 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?
2
votes
1answer
139 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 this might help the ciphertext be harder to crack but I am ...
0
votes
1answer
371 views

Huffman encoding of hashes

I have a huge list of MD5 hashes, which takes up quite some space. I was wondering if I would acheive (some) compression, by encoding the characters (which are A-F 0-9), with huffman coding. I made a ...
1
vote
1answer
461 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, ...
1
vote
1answer
610 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 ...
4
votes
2answers
259 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 ...
8
votes
1answer
489 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 ...
0
votes
1answer
363 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 ...
2
votes
1answer
202 views

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

Classical ciphers, such as Vigenère cipher, are weak and no longer be used. They can be broken by using frequency analysis, that is a well-known fact. But, the frequency analysis often depends on the ...
2
votes
1answer
67 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 ...
3
votes
3answers
2k 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$...
1
vote
1answer
177 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?
4
votes
1answer
317 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 ...
4
votes
1answer
142 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 ...
4
votes
1answer
214 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 ...
6
votes
2answers
189 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 ...