Looks like no one added any tags here yet for you.
Vigenere Cipher Hand Encrpt
Choose a Keyword: Repeat the keyword until it matches the length of the plaintext.
Convert Letters to Numbers: Assign a number to each letter (A=0, B=1, ..., Z=25).
Shift Letters: For each letter in the plaintext, shift it by the number corresponding to the keyword letter.
Convert Numbers Back to Letters: Convert the resulting numbers back to letters.
Vigenere Cipher Hand Decrypt
Repeat the Keyword: As in encryption, match the length of the ciphertext with the repeated keyword.
Convert Letters to Numbers: Assign numbers to both the ciphertext and the keyword.
Reverse the Shift: Subtract the keyword number from the ciphertext number for each letter.
Convert Numbers Back to Letters: Convert the resulting numbers back to letters.
Substitution
Definition: A cryptographic technique where elements of the plaintext are systematically replaced with other symbols
Transposition
Definition: A cryptographic technique where the positions of elements in the plaintext are shifted according to a regular system.
Modular Arithmetic
Modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" after they reach a certain value, known as the modulus.
a modâân means the remainder when a is divided by n.
Addition: (a+b) mod n = [(a mod n)+(b mod n)] mod n
Subtraction: (a-b) mod n = [(a mod n)-(b mod n)] mod n
Multiplication: (axb) mod n = [(a mod n)x(b mod n)] mod n
Modular Arithmetic Addition Examples
7+5mod10
7+5=12
12 mod 10=2
Modular Arithmetic Subtraction Examples
7-5 mod 10
7-5=2
2 mod 10=2
Modular Arithmetic Multiplication Examples
7Ă5 mod 0
7Ă5=35
35 mod 10=5
Euclidâs Algorithm
Euclid's algorithm is a method for finding the greatest common divisor (GCD) of two integers. The GCD of two numbers is the largest number that divides both of them without leaving a remainder. This algorithm is fundamental in number theory and is widely used in cryptography, particularly in public-key algorithms like RSA.
Given two numbers a and b (where a>b), divide a by b and find the remainder r.
Replace a with b and b with r
Repeat the process until r becomes 0. The non-zero remainder at this point is the GCD of a and b.
Euclidâs Algorithm Examples
a=252, b=105
252á105=2 remainder 42
So, a=105 and b=42
a=105, b=42
105á42=2 remainder 21
So, a=42 and b=21
a=42, b=21
42á21 remainder 0
So, a=21 and b=0
Euclidâs Algorithm Formula
Additive Inverse
A number that, when added to a, yields zero. In the context of modular arithmetic, the additive inverse of a modulo n is a number b such that a+bâĄ0 mod n, or bâĄâa mod n
For a=3 in modulo 7 arithmetic: bâĄâ3 modââ7 bâĄ4 mod 7 So, the additive inverse of 3 modulo 7 is 4.
Multiplicative Inverse
To find the multiplicative inverse of a modulo n, a and n must be coprime (i.e., GCD(a,n)=1. You can find the multiplicative inverse using the Extended Euclidean Algorithm.
Totient Function
Find the prime factors of number, for 21 they would be 7 and 3.
List the numbers each of the prime factors goes into leading up to number. 7 would be 7 and 14, and 3 would be 3, 6, 9, 12, 15, and 18.
List all the numbers from 1 to the number, and cross out the numbers that were listed under the prime factors factors.
Count the remaining numbers and that is the totient factor.
Feistel Cipher
Feistel ciphers are symmetric encryption schemes used in block ciphers. They divide the block into two halves and perform multiple rounds of encryption and decryption using a key-derived function. The structure of a Feistel cipher allows for efficient decryption using the same algorithm as encryption but with the subkeys used in reverse order.
How to Encrypt Feistel Cipher
Divide plaintext into two halves, L0 and R0, and determine the number of rounds
For each round run the R0 through the function and xor with the left side to make R1, R0 goes to the left and becomes L1
After all the rounds are done swap the left and right halves.