128 bit and 256 bit encryption

In summary: 128 bit encryption is equivalent to 128 different keys. each with a different set of possible values. whereas 256 bit encryption is equivalent to 2256 different keys. which is 2128 times as many. so if you have a 128 bit key and want to encrypt something with a 256 bit key, you'd first have to generate 2128 different keys.
  • #1
bhaazee
80
0
Can anyone please explain me what's 128-bit and 256-bit encryption in layman's word (but bit in detail please). (I am a mechanical Engg. and have least knowledge on security aspects of IT).

Thnx.
 
Computer science news on Phys.org
  • #2
To define 128 or 256-bit encryption, first a "key" is created. In computer cryptography, a key is a long sequence of bits used by encryption / decryption algorithms.

For example, the following represents a hypothetical 40-bit key:
00001010 01101001 10011110 00011100 01010101

A given encryption algorithm takes the original message, and a key, and alters the original message mathematically based on the key's bits to create a new encrypted message. Likewise, a decryption algorithm takes an encrypted message and restores it to its original form using one or more keys.

Using a 40-bit key(the above has 40 0's and 1's) is referred to as 40-bit encryption. 128 and 256-bit keys are keys with 128 and 256 number of 0's and 1's respectively.
 
  • #3
Also, if you look at the key sizes, there are 2128 possible keys for a 128-bit encryption algorithm. For 256-bit keys, this is a keyspace of 2256 = 21282128.

Now, the actual encryption depends on the algorithm. Key sizes of 128 bits/256 bits will be for symmetric ciphers. For SSL, common algorithms are RC4 (a 128-bit stream cipher) and AES-128 and AES-256 in a mode like CFB (cipher feedback). Asymmetric key cryptography (e.g. RSA, DSA, El-Gamal) will typically have key sizes on the order of 2048 bits and up.

Symmetric ciphers are generally either stream ciphers, which produce a long stream of bits that are XORed with the plaintext, or block ciphers, which encrypt the message in blocks of a fixed number of bits. Block ciphers have different modes of operation; the most common include ECB (Electronic code book, in which blocks are encrypted independently--this is a weak mode and should be avoided), CBC (cipher block chaining, where the previous block is XORed with the plaintext of the next block and then encrypted) and CFB (cipher feedback, cipher output is XORed with plain text to get the ciphertext, previous block ciphertext is XORed with cipher output to link blocks).

For symmetric ciphers, both the sender and receiver must have the same key. By contrast, in asymmetric key cryptography, Alice and Bob each have a public and private key. If Alice wants to send a message to Bob, she looks up his private key, encrypts the message with it, signs it with her public key, and sends it to Bob. Bob receives the message and decrypts it with his private key. He can also decrypt the signature using Alice's public key and verify that the message has not been tampered with. Asymmetric key crypto usually involves "one way functions", which are easy to compute but computationally hard to compute the inverse.
 
  • #4
A bit (binary digit) is either a 0 or 1. Since there are only two possible states the total number of combinations of an x bit number is 2x. In terms of encryption, the bits determine how many possible keys there could be. More possible keys means it will take longer for an attacker to try them all (called a brute force attack). It's important to note that a 256 bit key doesn't have twice as many possibilities as an 128 bit one. Each bit doubles the number of possibilities. Meaning that an 129 bit key would have twice the possibilities as an 128. A 256 bit key has 2128 times as many possibilities as an 128 bit one.
2128 = 3x1038
2256 = 1x1077

To use an analogy: a common Master Lock pad lock has 40 digits on its face. This gives 40 * 40 * 40 = 64,000 possible combinations. This is similar to a 16 bit number; 216 = 65,536. So one could say a common pad lock is roughly 16 bit. 16 bit is very low for encryption standards, however it is adequate for physical security because trying a combination will take a few seconds each. Compare this to a computer where one might be able to try anything from thousands to billions of possibilities per second and it becomes clear why the possibilities must be so much larger.

AES is a common modern encryption standard. If you have an interest in encryption this guide might be a good place to learn more. It does a good job of starting quite basic and progressing through four level of more complex and accurate descriptions.
http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html"
 
Last edited by a moderator:
  • #5
Oh! thanks a lot guys for ur patient replies. understood very easily.
 

Related to 128 bit and 256 bit encryption

What is 128 bit encryption?

128 bit encryption is a type of cryptographic algorithm used to secure data and protect it from unauthorized access. It uses a key size of 128 bits, making it difficult to crack and ensuring a high level of security.

What is 256 bit encryption?

256 bit encryption is a type of cryptographic algorithm that provides a higher level of security compared to 128 bit encryption. It uses a longer key size of 256 bits, making it more difficult for hackers to decipher and access sensitive data.

Which is more secure, 128 bit or 256 bit encryption?

256 bit encryption is generally considered to be more secure than 128 bit encryption. This is because it uses a longer key size, making it more difficult for hackers to crack and access sensitive information.

What is the difference between 128 bit and 256 bit encryption?

The main difference between 128 bit and 256 bit encryption is the key size. 256 bit encryption uses a longer key size, making it more secure and difficult to crack compared to 128 bit encryption. This also means that it may take longer to encrypt and decrypt data using 256 bit encryption.

What types of data should be encrypted with 128 bit or 256 bit encryption?

Both 128 bit and 256 bit encryption can be used to secure sensitive data such as financial information, personal information, and confidential documents. However, for highly sensitive information, it is recommended to use 256 bit encryption for an extra layer of security.

Similar threads

  • Computing and Technology
Replies
27
Views
1K
  • Computing and Technology
Replies
17
Views
15K
  • Computing and Technology
2
Replies
52
Views
3K
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Computing and Technology
Replies
4
Views
820
Replies
9
Views
1K
  • Computing and Technology
Replies
1
Views
1K
  • Computing and Technology
Replies
2
Views
1K
  • Computing and Technology
Replies
4
Views
3K
Back
Top