Questions tagged [compression]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
42 views

hash compression rates

Given a truly random hash function and a text file with hashed text, how much compression rate can we expect from a compression algorithm? How can we calculate it theoretically? I was thinking that ...
5
votes
3answers
3k views

Why is the output of a True Random Number Generator (TRNG) insecure after it has been compressed?

I came across the following statement regarding true random number generators (TRNG): A “P1 medium” [AIS31] true random number generator (TRNG) may not be directly used due to cryptographic reasons. ...
1
vote
1answer
43 views

Can I compress $192$ byte key into $16$ or $32$ bytes which can be later used in KDF to recover full key

I have a key $k$ which is $192$ bytes long. Is there a secure way to first compress this key into $16$ or $32$ bytes, but in such a way that later given those $16$ ($32$) bytes I can use a key ...
0
votes
0answers
28 views

Why image size is decreasing after steganography although no compression is used?

I'm working on image steganography with LSB technique, mainly text-into-image steganography. My sample images are in bmp format, and surprisingly all bmp images of the same pixel dimensions have the ...
2
votes
1answer
667 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, ...
2
votes
1answer
126 views

Can we calculate the “previous hash value” in the SHA256 compression function with a known message block and final hash?

Suppose we have a $512$-bit (or $512\times n$ bit) message that we'd like to hash using SHA-256. I've looked at the implementation, and from what I understand, after padding, there will be a total of $...
0
votes
1answer
75 views

Reducing a 64 digit integer to 10 digit

Situation:- I am using Python. I am using RSA and I am using two 64 bit keys. I am not an cryptographer . I can provide you the RSA code if needed but i am not posting it as it doesn't have to do ...
16
votes
2answers
3k views

How much can we compress RSA public keys?

I am wondering to what degree we can 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 ...
5
votes
2answers
724 views

What is the difference between data compression and compression in cryptographic algorithms?

What is the differences between data compression as used in e.g. the ZIP protocol and compression as performed in cryptographic hashes? Are there common properties as well, apart from creating a ...
8
votes
6answers
4k 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 ...
4
votes
4answers
6k 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 ...
1
vote
2answers
501 views

Using RSA encryption to encrypt large files

The following post discusses the use of RSA for file encryption: https://medium.com/@ismailakkila/black-hat-python-encrypt-and-decrypt-with-rsa-cryptography-bd6df84d65bc The file encrypted is a JPEG ...
1
vote
1answer
131 views

Entropy Preserving Functions

Let F be a deterministic compression function that takes fixed length 128 bit inputs and outputs 8 bits. Each input to the function has 128 bits of entropy, does that mean that the output byte has 128 ...
3
votes
4answers
316 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
63 views

Checksum for bailing early on first corrupt byte in stream?

Suppose you want to transmit bytes of a file from computer a to b, but you want to bail early if any of the bytes are wrong. It’s easy to prescribe a hash/checksum implementation for the entire file. ...
0
votes
1answer
71 views

How reassuring is CRC-then-XTS as authenticated encryption?

It is known that the "xz" compression format embeds a checksum in the compressed file to verify integrity during decompression or standalone testing. The algorithm of the checksum can be one of: CRC32,...
16
votes
6answers
4k views

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 ...
9
votes
1answer
11k 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+ ...
4
votes
2answers
495 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. ...
0
votes
1answer
570 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 ...
-2
votes
1answer
108 views

If an algorithm can not produce a true random stream, then an algorithm can not alter its entropy [closed]

Can a transform lower the Kolmogorov entropy of a true random stream and then restore that stream with out loss. If not true then this means a transform can not raise or lower the entropy.
23
votes
3answers
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 ...
4
votes
4answers
8k 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 ...
62
votes
2answers
126k 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 ...
5
votes
2answers
355 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 ...
2
votes
1answer
236 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 ...
7
votes
5answers
19k 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?
2
votes
2answers
223 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 ...
1
vote
1answer
728 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 ...
1
vote
0answers
53 views

Is it necessary to transmit two or three points of an elliptic curve?

Are there cryptographic protocols, where a party should transmit by communication channel simultaneously two or three $\mathbb{F}_q$-points of an elliptic curve over a finite field $\mathbb{F}_q$? ...
7
votes
6answers
12k 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 ...
4
votes
2answers
640 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, $...
4
votes
2answers
436 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 ...
2
votes
1answer
94 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
118 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 ...
2
votes
1answer
73 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
80 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
515 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
319 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 ...
4
votes
2answers
298 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 ...
-1
votes
1answer
179 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
776 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 ...
2
votes
0answers
125 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
76 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
52 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
260 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
175 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
115 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
1answer
459 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 ...
12
votes
1answer
11k views

Encoding vs. Compression vs. Encryption

In what ways does encryption differ from proprietary/secret compression schemes and codecs?