Docsity

Encryption Algorithm, Lecture notes of Computer science

Toggle sidebar
bg1
Name: Rea Jean M. Gornez
BSCpE- 3rd Yr. COE 331
Activity No. 5 Encryption Algorithm
FLAMES ALGORITHM
The FLAMES Algorithm means Forward–Backward Letter Adding Modification using Even–
Odd Shift. It encrypts a message by changing each letter depending on whether its position is odd
or even and on the total number of letters in the word.
Rules
The FLAMES Algorithm encrypts a message by:
1. Counting the total number of letters in the word.
2. Checking whether each letter’s position is odd or even.
3. Shifting the letter based on:
oOdd position: subtract 2, then add the word length
oEven position: add 2, then add the word length
Alphabet wrapping is applied (after Z goes back to A).
Cryptographic Key
Key = number of letters in the word
For Example:
Plain Text: GORNEZ
ENCRYPTION PROCESS
Step 1: Count the letters
The word GORNEZ has 6 letters, so the key is 6.
pf3
pf4

Partial preview of the text

Download Encryption Algorithm and more Lecture notes Computer science in PDF only on Docsity!

Name: Rea Jean M. Gornez BSCpE- 3rd^ Yr. COE 331 Activity No. 5 Encryption Algorithm FLAMES ALGORITHM The FLAMES Algorithm means Forward–Backward Letter Adding Modification using Even– Odd Shift. It encrypts a message by changing each letter depending on whether its position is odd or even and on the total number of letters in the word. Rules The FLAMES Algorithm encrypts a message by:

  1. Counting the total number of letters in the word.
  2. Checking whether each letter’s position is odd or even.
  3. Shifting the letter based on: o Odd position: subtract 2, then add the word length o Even position: add 2, then add the word length Alphabet wrapping is applied (after Z goes back to A). Cryptographic Key  Key = number of letters in the word For Example: Plain Text: GORNEZ ENCRYPTION PROCESS Step 1: Count the letters The word GORNEZ has 6 letters, so the key is 6.

Cryptographic Key: 6 Step 2: Apply FLAMES shifting rules Letter 1: G  Position 1 → Odd  Calculation: −2 + 6 = +  Shift G forward by 4 → K Letter 2: O  Position 2 → Even  Calculation: +2 + 6 = +  Shift O forward by 8 → W Letter 3: R  Position 3 → Odd  Calculation: −2 + 6 = +  Shift R forward by 4 → V Letter 4: N  Position 4 → Even  Calculation: +2 + 6 = +  Shift N forward by 8 → V Letter 5: E  Position 5 → Odd  Calculation: −2 + 6 = +  Shift E forward by 4 → I Letter 6: Z  Position 6 → Even  Calculation: +2 + 6 = +  Z shifted forward by 8 wraps around the alphabet → H

 Shift backward by 8 → Z Decrypted Message: GORNEZ Summary Name: FLAMES Algorithm (Forward–Backward Letter Adding Modification using Even– Odd Shift) Plain text: GORNEZ Cipher text: KWVVIH Cryptographic key: 6 (The key is the total number of letters in the word) Encryption algorithm:

  1. Count the total number of letters in the plain text to get the key.
  2. Identify the position of each letter (odd or even).
  3. If the letter position is odd, subtract 2 then add the key and shift the letter forward.
  4. If the letter position is even, add 2 then add the key and shift the letter forward.
  5. Wrap around the alphabet if the shift goes past Z. Decryption algorithm:
  6. Use the same key (number of letters).
  7. Identify the position of each letter in the cipher text.
  8. If the position is odd, shift the letter backward by (−2 + key).
  9. If the position is even, shift the letter backward by (+2 + key).
  10. Continue until the original message is recovered.