Jump to content

Encryption Question


Brian Sierakowski
 Share

Recommended Posts

I'm getting confused here, need some help to make sure I have this straight...

When talking about encryption, the block size represents the size of the encrypted data, the "cypher text."

The key size represents the size of the key needed to decrypt the encrypted data.

Is that correct?

For example, you could have 128-bit block size, which could carry any sized message up to 128 bits, with a 256-bit key, which means the key to get at that 128 bits of data is 256 bits long.

Right?

Link to comment
Share on other sites

The block size can be any size depending on the algorithm. The block size does not determine the maximum about of data encryptable by the algorithm. The Key length can be any size but is also algorithm dependant. In a simple xor based encryption algorithm the block size and the key length would likely be the same.

Link to comment
Share on other sites

Yes, basically. Some points I missed:

The input data size will be encrypted producing data rounded up to the nearest block size (usually, if an algorithm doesn't do this it is disclosing the length of the message, possibly). e.g. 64bit block size with 65bits input will results in 128bits of output

Some algorithms don't have a block size, these are stream cyphers. Algorithms with a block size are block cyphers.

Link to comment
Share on other sites

When block ciphers do their stuff, they generally do it to a single block at a time, with no reference to previous or successive blocks, this allows them to decrypt content at any part of the file, which is useful for stuff like full disk encryption. Block size has little effect on the security of an algorithm and as Sparda has mentioned, the biggest effect is that cipher text will have a size which is a multiple of the block size which can hold all the plain text.

Key size generally determines how secure the algorithm is, in very very simple terms. This is because good algorithm design should only have one weakness, which is a Brute Force Attack. The key size determines the number of possible keys and therefor the amount of time to do a BFA.

Obviously there are a number of other factors when you get into it, but thats a good high level overview.

Link to comment
Share on other sites

That's great guys, thanks so much.

Doing the Cryptography section of Sec+ study, and the host has repeatedly pointed out that some of the terms can begin to get confusing. He while he didn't outright define block sizes, he did go over stream cyphers, and I suppose I should have been able to put it together from there.

Thanks again!

-Brian

Link to comment
Share on other sites

Where it really starts to get funky, is when you have AES which is a block cipher, but you can run AES in different modes, one of being a stream. Cryptography is a really interesting subject, but because of the pitfalls in implementing an algorithm even (see entries to the NIST hash competition), design and implementation is best left to the professionals for production environments.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...