Professional Documents
Culture Documents
Encrypts and decrypts a string using the Fibonacci sequence. It is a very simple
program.
Note:
The preprocessing stage converts all of the letters of the string into lowercase and
removes any character that is not a letter, period, or space. That includes numbers and
commas.
Methodology:
The project uses
- encryption/decryption algorithms
- key dependent
(Key is used while encrypting message as well will be use while decrypting)
Advantage:
The advantage of the proposed project is to make information secure by encrypting it on mentioned
criteria. The application is taking file instead of messages so in short it is saving time by encrypting all
strings written on that file. The files is only decrypted if the receiver party know the key and feed that key
in the system.
In addition, as each n also has a unique representation in terms of the Fibonacci numbers, one number
would not have the same coded value as another number. This helps eliminate any confusion in the
decryption process as well, since no two values can correspond to the same 4 plaintext message.
3. The Fibonacci series, up to the length of the password is generated. In our case, the
password length is 3, so the first three Fibonacci terms viz. 1, 1, 2 are generated. Start the
Fibonacci series from 1 instead of 0.
4. Every element in odd position in the cipher text is forwarded by the current Fibonacci term,
i.e. in the first iteration all odd indexed elements would be advanced by 1, in the second
iteration by 1, in the third iteration by 2 and so on. Once 'z' is reached, we wrap around i.e. if
we forward 'z' or 'Z' by 1 the output would be 'a' or 'A'. Similarly, every element in even position
in the cipher text is reversed by the current Fibonacci term, i.e. in the first iteration all even
elements would be reversed by 1, in the next iteration by 1, in the next by 2 and so on. Once 'a'
is reached, wrap around i.e. if we reverse 'a' or 'A' by 1 the output would be 'z' or 'Z'.
5. So, in our case the Encryption iteration for the cipher text 'dcbaxyz' would be,
RSA Encryption
The most common public-key algorithm is the RSA cryptosystem
XOR CIPHER
The XOR encryption algorithm is an example of symmetric encryption where the same
key is used to both encrypt and decrypt a message.
In the code we are using the XOR bitwise operator ( ^) to apply the XOR mask using the
plain text and the key.