عمر اشرف المتولي علي البدراوي

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

.

1Difference between Block Cipher and Stream Cipher


Block Cipher Stream Cipher
Block Cipher Converts the plain text into cipher Stream Cipher Converts the plain text into
text by taking plain text’s block at a time. cipher text by taking 1 bit plain text at a time.
Block cipher uses either 64 bits or more than 64
While stream cipher uses 8 bits.
bits.
The complexity of block cipher is simple. While stream cipher is more complex.
Block cipher Uses confusion as well as diffusion. While stream cipher uses only confusion.
While in-stream cipher, reverse encrypted text
In block cipher, reverse encrypted text is hard.
is easy.
The algorithm modes which are used in block The algorithm modes which are used in stream
cipher are ECB (Electronic Code Book) and CBC cipher are CFB (Cipher Feedback) and OFB
(Cipher Block Chaining). (Output Feedback).
Block cipher works on transposition techniques While stream cipher works on substitution
like rail-fence technique, columnar transposition techniques like Caesar cipher, polygram
technique, etc. substitution cipher, etc.
Block cipher is slow as compared to a stream While stream cipher is fast in comparison to
cipher. block cipher.
Suitable for applications that require strong Suitable for applications that require strong
encryption, such as file storage and internet encryption, such as file storage and internet
communications. communications.
More secure than stream ciphers when the same Less secure than block ciphers when the same
key is used multiple times. key is used multiple times.
key length is typically 128 or 256 bits. key length is typically 128 or 256 bits.
Operates on fixed-length blocks of data. Encrypts data one bit at a time.
.2ADVANTAGES AND DISADVANTAGES OF SYMMETRIC CRYPTOSYSTEMS
ADVANTAGES

• A symmetric cryptosystem is faster.

• In Symmetric Cryptosystems, encrypted data can be transferred on the link

even if there is a possibility that the data will be intercepted. Since there is no

key transmiited with the data, the chances of data being decrypted are null.

• A symmetric cryptosystem uses password authentication to prove the

receiver’s identity.

• A system only which possesses the secret key can decrypt a message.

DISADVANTAGES

• Symmetric cryptosystems have a problem of key transportation. The secret

key is to be transmitted to the receiving system before the actual message is to

be transmitted. Every means of electronic communication is insecure as it is

impossible to guarantee that no one will be able to tap communication

channels. So the only secure way of exchanging keys would be exchanging

them personally.

• Cannot provide digital signatures that cannot be repudiated

ADVANTAGES AND DISADVANTAGES OF ASYMMETRIC

CRYPTOSYSTEM

ADVANTAGES

• In asymmetric or public key, cryptography there is no need for exchanging

keys, thus eliminating the key distribution problem.

• The primary advantage of public-key cryptography is increased security: the

private keys do not ever need to be transmitted or revealed to anyone.

• Can provide digital signatures that can be repudiated

DISADVANTAGES

• A disadvantage of using public-key cryptography for encryption is speed:

there are popular secret-key encryption methods which are significantly faster
.3than any currently available public-key encryption method
Advanced Encryption Standard (AES) is a specification for the
encryption of electronic data established by the U.S National Institute of
Standards and Technology (NIST) in 2001. AES is widely used today as
it is a much stronger than DES and triple DES despite being harder to
implement.
Points to remember
 AES is a block cipher.
 The key size can be 128/192/256 bits.
 Encrypts data in blocks of 128 bits each.

That means it takes 128 bits as input and outputs 128 bits of encrypted
cipher text as output. AES relies on substitution-permutation network
principle which means it is performed using a series of linked operations
which involves replacing and shuffling of the input data.
Working of the cipher :
AES performs operations on bytes of data rather than in bits. Since the
block size is 128 bits, the cipher processes 128 bits (or 16 bytes) of the
input data at a time.
The number of rounds depends on the key length as follows :
 128 bit key – 10 rounds
 192 bit key – 12 rounds
 256 bit key – 14 rounds

Creation of Round keys :


A Key Schedule algorithm is used to calculate all the round keys from
the key. So the initial key is used to create many different round keys
which will be used in the corresponding round of the encryption.

. 4
AES DES
DES stands for Data Encryption
1. AES stands for Advanced Encryption Standard
Standard
2. The date of creation is 2001. The date of creation is 1977.
3. Byte-Oriented. Bit-Oriented.
4. Key length can be 128-bits, 192-bits, and 256-bits. The key length is 56 bits in DES.
Number of rounds depends on key length: 10(128- DES involves 16 rounds of identical
5.
bits), 12(192-bits), or 14(256-bits) operations
The structure is based on a substitution-permutation The structure is based on a Feistel
6.
network. network.
7. The design rationale for AES is open. The design rationale for DES is closed.
The selection process for this is secret but accepted
8. The selection process for this is secret.
for open public comment.
DES can be broken easily as it has
AES is more secure than the DES cipher and is the known vulnerabilities. 3DES(Triple
9.
de facto world standard. DES) is a variation of DES which is
secure than the usual DES.
The rounds in DES are: Expansion,
The rounds in AES are: Byte Substitution, Shift
10. XOR operation with round key,
Row, Mix Column and Key Addition
Substitution and Permutation
11. AES can encrypt 128 bits of plaintext. DES can encrypt 64 bits of plaintext.
12. It can generate Ciphertext of 128, 192, 256 bits. It generates Ciphertext of 64 bits.
AES cipher is derived from an aside-channel square DES cipher is derived from Lucifer
13.
cipher. cipher.
AES was designed by Vincent Rijmen and Joan
14. DES was designed by IBM.
Daemen.
No known crypt-analytical attacks against AES but
Known attacks against DES include
side channel attacks against AES implementations
15. Brute-force, Linear crypt-analysis, and
possible. Biclique attacks have better complexity
Differential crypt-analysis.
than brute force but still ineffective.
16. It is faster than DES. It is slower than AES.
17. It is flexible. It is not flexible.
18. It is efficient with both hardware and software. It is efficient only with hardware.

.5
function AESencrypt(plaintext, key)
{
blocks :=
divideIntoBlocks(plaintext);
roundKeys = getRoundKeys(key)
for (block in blocks) { //first
round
addRoundKey(roundKeys[0],
block); //intermediate rounds
for (8, 10 or 12 rounds) {
subBytes(block);
shiftRows(block);
mixColumns(block);
addRoundKey(roundKeys[..],
block);
} //last round
subBytes(block);
shiftRows(block);
addRoundKey(roundKeys[numRounds
- 1], block); } ciphertext :=
reassemble(blocks);
return ciphertext;}

You might also like