Stack Exchange Network

Stack Exchange network consists of 175 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 [known-plaintext-attack]

The attacker knows at least one sample of both the plain text and the cipher text.

0
votes
1answer
35 views

how to compute IV with AES CTR if key, plaintext and ciphertext are known?

Given $E_k$, which a block-cipher using the (known) key $k$, and a plaintext-ciphertext pair $(p,c)$ where $c$ is the encryption of $p$ using CTR mode, can the initialization vector be recovered using ...
0
votes
0answers
13 views

Is it necessary to study the KPA security for asymmetric encryption algorithms in addition to CPA security? [duplicate]

In a KPA attack model, an adversary $\mathcal{A}$ has access to pairs of messages $(m_i,c_i)$ which are encrypted using some asymmetric algorithm. However, assuming either El-Gamal or RSA algorithms, ...
1
vote
0answers
88 views

show that G' is not a secure PRG even if G is

Hello I'm trying to show that the function G'(s) = G(s) || G(G(s)) is not a secure PRG even if G is. My first question is that in this case, how do I know what G ...
2
votes
1answer
75 views

AES-CBC ciphertext manipulation with known IV and plaintext! [duplicate]

I'm currently practicing on a purposely flawed login page, where I have to change the value of a cookie to enter. The cookie is an encrypted and encoded form of a simple JSON string with fields "admin"...
2
votes
0answers
73 views

Is my deniable encryption scheme reasonable?

I was experimenting with RubberhoseFS, but since it is very hard to compile on anything modern, I decided to implement my own version, stripped of many unnecessary features. Namely, my implementation ...
7
votes
3answers
2k views

Is it possible to find the key for AES ECB if I have a list of plaintext and corresponding ciphertext?

Assume I have a list of plaintext text and its corresponding ciphertext which was created using a specific key with AES in ECB mode. Can I recover that key? If, how big does the list of plaintext ...
1
vote
1answer
169 views

Known Plaintext Attack for Modified OFB Mode of Operation

Question: Assume a variant of the OFB mode by which we only feedback the 8 most significant bits of the cipher output. We use AES and fill the remaining 120 input bits to the cipher with 0's: Why is ...
4
votes
1answer
224 views

Known Plaintext Attack on Block Cipher in ECB and CBC Modes of Operations

These 2 similar questions are from Paar's Understanding Cryptography. I could not see the answer so if someone can help I will appreciate: Question1: We consider known plaintext attacks on block ...
0
votes
1answer
66 views

Ethereum RLPx protocol for inter-node communication - flaws in the encryption

Ethereum uses RLPx/devp2p for inter-node communication. The protocol is encrypted using Elliptic Curve Integrated Encryption Scheme (see ref) Under Known-Issues I found this paragraph: The RLPx ...
1
vote
1answer
96 views

It's safe to store a known value (for checking) next to the actually encrypted values

The high level details of the encryption I'm using is: AndroidKeyStore create/store RSA key AES key is created and wrapped with RSA/ECB/PKCS1Padding Encrypted AES is saved to disk. Data is encrypted ...
2
votes
3answers
228 views

Known-plaintext attack on 1-round Feistel networks

Consider a simple, 1-round Feistel network. Because the ciphertext is essentially $(L_1,R_1)$, if one knows the plaintext $(L_0,R_0)$, the only unknown left is $K$. However round functions in ...
2
votes
1answer
58 views

Is Paillier secure from known plaintext attack for single character message?

Assuming I have three messages m1,m2,m3 where m1=m2=m3=1 and I compute c1,c2 and c3. Does that mean that c1=c2=c3 in cipher-text from ? If not, how many times can I encrypt a message m=1 and still ...
1
vote
0answers
26 views

Would it possible to decode an intelligible but alien message? [duplicate]

I've been reading some sci-fi and there is a frequent mention of decoding alien signals. From what i read historically in ww2 for decoding enemy message the allies would transmit fake information ...
0
votes
1answer
255 views

Clarification on Hill Cipher crib dragging technique

--- this has been edited as I realised the question was silly. replaced with helpful information --- I want to confirm the following: Given ciphertext "AGHTDIX... [cont.]" (C) and crib (a word ...
4
votes
1answer
164 views

Cracking truncated DES

Let's say we have a scheme in which 40 bits M are padded with 24 zeroes, encrypted using a secret DES key K, and the result truncated to the first 24 bits, C. If I wanted to determine a key that ...
3
votes
1answer
466 views

What's the difference between a known-plaintext attack and a ciphertext-only attack in terms of performance?

I know that in the KPA the attacker has access to both the plaintext and the ciphertext, but in the end it all comes down to performing an exhaustive key search. I'm not sure if having the ...
0
votes
1answer
300 views

8th SharifCTF — What is the advisable way to recover the key of single round DES here?

I am participating in the 8th SharifCTF competition and have a related question: I have 1000 plaintext and its ciphertext, which has been encrypted with DES algorithm (only 1 round). Now, how can ...
2
votes
2answers
92 views

If an attacker has a chosen-plaintext and encrypted data, can they determine the encryption type?

This question differs from How to determine what type of encoding/encryption has been used?, which asked about a ciphertext-only attack. This question is asking about a chosen-plaintext attack. Let's ...
0
votes
2answers
103 views

Reversability of Xor'd Values In Hash?

This may be a dumb question so please forgive me if so, but is a hash function considered one-way even if you have half of an xor'd value? For example say I have the values R and C, both are randomly ...
1
vote
0answers
62 views

Question on recovering a key in the algorithm

Let $E$ be a block cipher that has block size and key size both equal to 64 bits. Let $E'$ be a block cipher that has 64-bit block size and is defined as follows: For a 128 bits key $K \mathbin\Vert ...
1
vote
2answers
113 views

Multiple XML files and known-plaintext attack

I have created an app which collects data in sets which may contain up to 20000 XML files of an average size of about 5 KB, and all with the same header and XML structure, so that only the data they ...
1
vote
0answers
76 views

Known Plaintext Attack A5/2

I am trying to understand the non-optimized known plaintext attack on A5/2 from Barkan, Bikan and Keller. I don't understand the construction of the equation system: $$S_{R4_1} * S_1 = k$$ Where $S$ ...
2
votes
2answers
1k views

Known plaintext attack without knowing the location of the plaintext

I'm trying to understand known plaintext attacks and since I best learn by doing I broke out Python and did the following: I have a plaintext string s and a key <...
4
votes
2answers
383 views

Why does DESX break if one removed post whitening?

DESX uses whitening to strengthen against brute force attacks. What is an attack one could use to recover DESX's pre-whitening key with only two known ciphertext/plaintext pairs, given that the ...
1
vote
0answers
394 views

Known plaintext attack against Feistel ciphers

Assuming we have a Feistel cipher, with let's say 2 rounds i.e: Plaintext $P=(L_{0},R_{0})$ $L_{1}=R_{0}$ $R_{1}=L_{0}\oplus f_{{K}_{1}}(R_{0})$ $L_{2}=R_{1}$ $R_{2}=L_{1}\oplus f_{{K}_{2}}(R_{1})...
1
vote
1answer
56 views

While encrypting what can happen between words

From some time I am working with "pen and paper" encrypted text. Keys are not known, algorithm is not known. I managed to find simple algorithm and key that seems to be nearly perfect. Nearly perfect ...
0
votes
1answer
116 views

Whats the most secure way to encrypt a string without the use of a computer? [duplicate]

I want to decrease attack surface by preventing the plaintext string or encryption key from ever being typed or otherwise entered into a computer. Ideally the decryption key would be something that ...
2
votes
1answer
3k views

AES-ECB known ciphertext/plaintext attack

i'm new to crypto and am working on a little exercise to understand the weakness of ECB mode encryption. Here is the scenario. I have the plain text ...
1
vote
0answers
71 views

Decrypting AES with known properties of plaintext

Austria passed a law recently which requires all invoices for cash-transactions to carry a QR-Code, that is signed by a government-registered certificate-authority. Each code contains public ...
1
vote
1answer
288 views

Is my XTEA encryption key safe if I publish my firmware both as plain text and encrypted?

I'm using this bootloader that implements XTEA encryption for uploading an encrypted firmware to small MCU: https://github.com/nyholku/diolan-plus2 the actual XTEA code is here: https://github.com/...
1
vote
2answers
2k views

Brute force, get AES keys by multiple plain-texts with their cipher-texts

I know that the encryption is AES, and I have multiple plain-texts with their cipher-texts, I don't know the encryption mode (ECB, CFB, etc ...) actually, but I know that the keys and the IV Key (if ...
-1
votes
1answer
86 views

Preventing predictable modifications to AES encrypted data

I'm fairly new to cryptography and am trying to find out best practice for this situation. Let's say I have some code which is going to be used to pass around an encrypted e-mail address. I encrypt it ...
0
votes
2answers
575 views

Recover key given partial key, IV and cipher text using CBC mode

Given a known IV and a small part of the key (not enough to use brute force) is there are any way to break CBC encryption with only one cipher text?
3
votes
2answers
1k views

AES-CBC-128 Known plain, IV, Cipher attack

Let's say we have a single char 'A' and we encrypted it as much times as we want with a fixed Key and a random IV So now we have list of the IVs used, the result ciphers and ofc the known text "A" ...
0
votes
1answer
6k views

RC4, finding key if we know plain text and ciphertext [duplicate]

Having plain text A , and cipher text B. Can we somehow retrieve key , when we want to decrypt text C which was also crypted with the same key?
4
votes
1answer
297 views

Security of a cryptosystem where the encryption is swapped with decryption

For any given one-key cipher $(M,C,K,E_k,D_k)$, we may modify it into $(M,C,K,D_k,E_k)$. In other words, we swap the encryption function with the decryption in the modified cipher. Are the two ...
1
vote
0answers
410 views

Encryption with both plaintext and ciphertext public

Does there exist a system wherein the encryption key/algorithm can be made indecipherable despite making arbitrarily many plaintext and ciphertext pairs available to the cracker? (Does this qualify as ...
15
votes
1answer
3k views

What do the signature security abbreviations like EUF-CMA mean?

From time to time, one stumbles across formal security definitions. This includes security definitions for signature schemes. The most common ones are the *UF-* ...
4
votes
2answers
412 views

Affine plaintext attack with GCD != 1

I'm trying to crack an affine cipher, but when cracking I cannot find the inverse of a number because the GCD is not 1. This is my plaintext and this is my ciphertext: ...
1
vote
0answers
209 views

Affine cipher finding the decryption map

Given two letters of the plaintext 'ZP' corresponding to the ciphertext 'AE' respectively, I have found the key to be (a,b)=(10,10) (modulo 26). Therefore the decryption map $D(x)=a^{-1}(x-a)\bmod26$ ...
3
votes
1answer
513 views

Encrypting decimal values with AES

I have a column in a database table called "Amount" that will store decimal values encrypted with AES. It's highly likely that the same amount will exist in multiple rows in the table and be encrypted ...
3
votes
1answer
3k views

Hill's Cipher - Known Plaintext Attack

I know this question has already been asked few times but I'm struggling a bit on a problem. I have a plaintext FRIDAY and its ciphertext PQCFKU, using $M = 2$, with corresponding integers $x = fr ...
2
votes
0answers
137 views

AES-128: How to find cipherkey comparing wrong and right ciphertexts?

I have a .mat file which contains 10 plaintexts and 10 ciphertexts which are correctly encrypted with AES-128 algorithm. It also contains 10 more ciphertexts which are wrongly encrypted. The fault is ...
4
votes
2answers
904 views

How to defend AES against chosen-plaintext attack?

I have a server which encrypts files with the same AES key. Users can upload a file and download its encrypted version. A user can upload as many files as he wants. Users can decrypt the documents via ...
-1
votes
2answers
1k views

What's wrong with RSA and OpenSSL?

We all know that signing a document is to encrypt its hash using signer's private key. https://commons.wikimedia.org/wiki/File:Digital_Signature_diagram.svg I've been searching the web for days, ...
1
vote
1answer
777 views

Counter Mode Known plain text attacks

Counter mode uses a counter that is incremented for each block. Doesnt predictability of this counter expose the scheme to attack? I mean if you are incrementing some nonce, then I have a good chance ...
2
votes
1answer
179 views

Can encrypting well known files hurt the security of the key?

I wanted to know if mass encrypting files (both well known and not so well known) on my external HDD would somehow hurt the security of my private key. As for the details: I am using GPG with a key ...
1
vote
2answers
397 views

Does having a bunch of plaintext/ciphertext pairs help you break a ciphertext with unknown plaintext?

Let say we have $N$ ciphertexts and each of them looks like this: ...
13
votes
4answers
5k views

Why is a known-plaintext attack considered a complete break?

I read somewhere that if a cipher has a known-plaintext attack, then it is considered completely broken. Say there is a cipher that someone uses where the algorithm is understood and a known-...
4
votes
1answer
492 views

Do all ciphers have equivalent decryption keys?

Do all ciphers suffer from the problem of multiple equivalent decryption keys? Is the existence of equivalent keys an essential property for the security of a cipher? If you could prove that a cipher ...