CRYPTOGRAPHIC ALGORITHM

In this blog we will talk about Algorithm types and Algorithm modes 


 Lets get Started..

• Cryptographic algorithm has two main components: 

1. Algorithm Types: It specifies the size of the plain text that will be encrypted with each algorithm iteration Calculation 

2.Algorithm Modes: which is what defines a cryptographic algorithm 

Algorithms can be divided into two categories

 1.Stream Cipher

 2. Cipher Block

Algorithm Types

1.STREAM CIPHER

•Stream Cipher Keys and algorithm are applied to each binary digit in a data stream one bit at a time, rather than encryption block of data
• Stream cipher operates plaintext accepting only one bit at a time
• OTP is the Best Example of Stream Cipher
• OTP: each bit of plaintext message XOR with each bit of key to obtain cipher text message


2.BLOCK CIPHER

•The block cipher divides plain text into predetermined blocks and encrypts each block with a predetermined key size.
• Divide each plaintext in to block of 64, 128, 256 bit and apply common key
size 40, 56, 64, 80, 128, 168, 192 and 256 bit which generate the cipher text
message as per size of plaintext
• Block cipher is main method of encrypting text in which keys and algorithm are applied to block of data rather that individual bit like stream cipher

Algorithm Modes

An algorithm mode is a combination of the fundamental block cipher algorithm steps and some feedback from the previous step.

1. Electronic Code Book (ECB)
2. Cipher Block Chaining(CBC)
3. Cipher Feedback(CFB)
4. Output Feedback(OFB)

1.Electronic Code Book (ECB) 

Electronic code book is the least demanding block cipher method of working. Each block of input plaintext is directly encrypted, making it simpler, and output is in the form of encrypted ciphertext blocks. Typically, if a message is larger than b bits, it can be divided into numerous blocks and processed again.

2.Cipher Block Chaining

Cipher block chaining, also known as CBC, is an improvement on ECB because ECB fails to meet certain security requirements. After XOR with the original plaintext block, the previous cipher block is used as input in CBC, the next encryption algorithm. Simply put, a cipher block is created by encrypting the XOR output of the current plaintext block and the previous cipher block.

3.Cipher Feedback Mode (CFB)

In this mode, the cipher is used as feedback for the next encryption block and has the following new specifications: First, output bits are divided into a set of s and b-s bits using an initial vector IV for encryption. An XOR operation is applied to the plaintext bits and the s bits on the left side. The output is passed to a shift register with bits b-s to lhs and s to rhs as input, and the process continues. 

4.Output Feedback Mode(OFB)

The output feedback mode behaves similarly to the cipher feedback mode, but instead of sending the actual cipher, which is the XOR output, it sends the encrypted output as feedback. In this result criticism mode, all pieces of the block are sent as opposed to sending chosen s bits. Block ciphers' Output Feedback mode is extremely resistant to bit transmission errors. Additionally, it reduces the cipher's dependence on the plaintext.

Comments

Post a Comment

Popular posts from this blog

How Does Multi-Factor Authentication (MFA) Work?

Top 4 Software Testing Cybersecurity Mistakes to Avoid

Threat, Vulnerability and Risk: How are They Different?