Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cryptography Question 1

Status
Not open for further replies.

Flameboy822

Technical User
Mar 1, 2004
3
GB
Hi Guys,

I'm trying to find someone who knows how big ciphertext files are in relation to plaintext files, with reagrd to DES with 56bit key length, 3DES 112bit, and AES 128bit.
e.g a 10k file is encrypted with each of the standards and it produces .......a 12k, 15k file? or is it as simple as 10k = 10,000 bytes changing it into bits and multiplying it by the key bit length?

Any ideas on where i could get this information would be much appreciated.

Cheers

Jon
 
For block ciphers, the ciphertext size is based on the number of blocks required to contain the plaintext, occasionally with an additional block for padding.

So, an 8,008 byte file encrypted with 128-bit AES (using ECB) works out to 501 blocks (or 8,016 bytes). With the additional block, the ciphertext is 8,032 bytes.

A good rule of thumb for estimating ciphertext size is to double the block size and add that to the plaintext file. Using this method will sometimes give you an estimate that is few bytes too high, but should never result in an estimate that is smaller than the actual result. So, your 10,000 byte file encrypted with AES-128-ECB will result in a 10,032 encrypted file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top