blowfish source code use in matlab
#1

I want source code of data (not image) encryption and decryption in matlab using blowfish and twofish algorithms.
Reply
#2
Blowfish is a symmetric key block encryption, designed in 1993 by Bruce Schneier and included in a large number of encryption sets and encryption products. Blowfish provides a good encryption rate in the software and to date no effective cryptanalysis has been found. However the Advanced Encryption Standard (AES) now receives more attention.
Schneier designed Blowfish as a general-purpose algorithm, thought of as an alternative to the old and free DES of the problems and constraints associated with other algorithms. At the time that Blowfish was launched, many other designs were proprietary, taxed by patents or trade or government secrets. Schneier has stated that "Blowfish does not have a patent, and will continue to be patent in all countries.The algorithm is placed in the public domain and can be freely used by any person." Notable features of the design include key-dependent S-boxes and a highly complex key schedule.

Blowfish has a block size of 64 bits and a variable key length from 32 bits up to 448 bits. It is a Feistel encryption of 16 rounds and uses large S boxes dependent on the key. In structure, it looks like CAST-128, which uses fixed S boxes. The diagram on the left shows the Blowfish encryption routine. Each line represents 32 bits. There are five matrices of subkeys: a series P of 18 entries (indicated as K in the diagram, to avoid confusion with the simple text) and four S boxes of 256 entries (S0, S1, S2 and S3).

Each round r consists of 4 actions: First, XOR the left half (L) of the data with the input rth P-array, second, uses the XORed data as input for the F function of Blowfish, third, XOR the function F output with the right half ® of the data and, finally, exchange L and R.

The F function divides the 32-bit input into four eight-bit trimesters and uses the quarters as input for the S-boxes. The S-boxes accept 8-bit input and produce 32-bit output. The outputs are added to module 232 and XORed to produce the final 32-bit output (see the image in the upper right corner).

After round 16, undo the last exchange, and XOR L with K18 and R with K17 (exit bleaching). The decryption is exactly the same as the encryption, except that P1, P2, ..., P18 are used in the reverse order. This is not so obvious because xor is commutative and associative. A common misconception is to use the reverse order of encryption as a decryption algorithm (ie, first XORing P17 and P18 to the ciphertext block, and then use the P entries in reverse order).

The Blowfish key programming starts by initializing the matrix P and the boxes S with values derived from the hexadecimal digits of pi, which do not contain any obvious pattern (I do not see anything in the number of my manga). The secret key is, byte by byte, cycling the key if necessary, XORed with all the P entries in order. A block of zero bits of 64 bits is then encrypted with the algorithm as it is. The resulting cipher text replaces P1 and P2. The same ciphertext is encrypted again with the new subkeys, and the new ciphertext replaces P3 and P4. This continues, replacing the entire matrix P and all the S-box entries. In total, the Blowfish encryption algorithm will run 521 times to generate all the subkeys, approximately 4 KB of data is processed.

Because the P array is 576 bits long, and the key bytes are XORIZed through all of these 576 bits during initialization, many implementations support key sizes of up to 576 bits. Although this is certainly possible, the 448 bit limit is here to ensure that each bit of each subkey depends on each bit of the key, since the last four values of the P matrix do not affect every bit of the ciphertext. This point should be taken into account for implementations with a different number of rounds, since although security increases against a comprehensive attack, it weakens the security guaranteed by the algorithm. And given the slow initialization of the encryption with each key change, it is given a natural protection against brute force attacks, which does not really justify the size of the keys of more than 448 bits.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Tagged Pages: matlab code blowfish,
Popular Searches: advantages and disadvantages of blowfish algorithm ppt, sourcecode blowfish j2me, advantages and disadvantages of blowfish algorithm, blowfish algorithm example pdf, blowfish objective c, blowfish algorithm for packet fitering, blowfish source code use in matlab,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  voice vased email system source code 0 3,118 20-04-2021, 07:59 AM
Last Post:
  matlab code 1 3,436 31-01-2019, 02:52 PM
Last Post: [email protected]
  underwater optical communication matlab code 0 3,289 02-11-2018, 07:32 PM
Last Post: Guest
  ns2 source codes free download for hello flood attack 0 2,824 31-10-2018, 02:42 PM
Last Post: Guest
  voice based email for blinds source code 0 704 22-10-2018, 05:12 PM
Last Post: Guest
  source code for blood group detection in matlab 0 6,362 22-10-2018, 10:59 AM
Last Post: Guest
  voice based email for blinds source code 0 691 21-10-2018, 07:58 PM
Last Post: Guest
  voice based email for blinds source code 0 631 21-10-2018, 07:43 PM
Last Post: Guest
  source code for hall ticket generation in php 0 2,023 08-10-2018, 10:00 PM
Last Post: Guest
  voice based email for blinds source code 0 644 28-09-2018, 02:42 PM
Last Post: Guest

Forum Jump: