# Number of pairs needed to attack Double DES?

I'm having trouble understanding why,in order to do a brute force attack on a double DES (2 keys), one needs to have at least 2 pairs of known plain text?

Same with 3DES (3 keys) one needs to have 3 pairs?

Can anyone help me understand how to figure out the number of pairs needed to do an attack?

• hint: what proportion of keys are expected to match a given plaintext/ciphertext pair, under the assumption that DES is a perfect cipher ? Then, how many keys ar expected to match a plaintext/ciphertext pairs, for a given keyspace? Then, how many keys ar expected to match a certain number of plaintext/ciphertext pairs, for a given keyspace? – fgrieu Nov 17 '16 at 17:21
• en.wikipedia.org/wiki/Meet-in-the-middle_attack – squeamish ossifrage Nov 17 '16 at 21:45
• @fgrieu thank you i actually found a formula that gives the number of need pairs in order to have a unique key that verifies the system. – khaled Nov 18 '16 at 11:02
• @khaled: good; notice that such formula can not give a complete insurance that there does not remain several possible keys; or that the right key won't be the only one remaining even with one less plaintext/ciphertext pair than predicted. – fgrieu Nov 18 '16 at 11:15