Seguridad Informática I - Cifrado de Hill
Introduction to the Hill Cipher
Overview of the Hill Cipher
- The Hill cipher is a cryptographic algorithm introduced in 1929 by mathematician Lester Hill, marking it as the first practical polygraphic cipher that operates on multiple symbols simultaneously.
- It functions as a block cipher, with its size denoted by the capital letter N, requiring basic knowledge of matrix operations for encryption and decryption.
Encryption Process
- The mathematical expression for the Hill encryption involves defining a block size (n), where plaintext symbols are processed in groups of n by n using an n*n key matrix.
- After multiplying the plaintext matrix by the key matrix, applying modulo operation yields n encrypted characters from one operation.
Example of Hill Encryption
Setting Up the Alphabet and Key
- The example uses the Spanish alphabet including "ñ", assigning numbers from 0 (A) to 26 (Z).
- Given plaintext M = B, E, E, R and key K = E, A, D, B will be used for encryption.
Matrix Formation and Multiplication
- Plaintext M is divided into blocks; here n = 2 leads to two parts. Key K forms a square matrix with elements corresponding to their numerical values: E(4), A(0), D(3), B(1).
- For processing BE (numerically 1 and 4), multiplication with key K results in two encrypted characters through matrix operations.
Calculating Encrypted Characters
First Two Encrypted Elements
- The first character is calculated as (41 + 04 mod 27), resulting in symbol E.
- The second character comes from (31 + 14 mod 27), yielding symbol H. Thus far, encrypted characters are E and H.
Continuing with Remaining Characters
- Next symbols ER (numerically represented as 4 and 18): third character calculation gives P via (44 + 018 mod 27).
- Last character D results from calculations involving both remaining plaintext symbols leading to final ciphertext C = EHPD.
Decryption Process Overview
Conceptual Framework for Decryption
- Decryption mirrors encryption but requires finding the inverse of key K before proceeding with similar multiplication processes.
Example Setup for Decryption
- Using ciphertext EPD and same alphabet setup as before; initial step involves calculating inverse of key K = EAD(B).
Finding Inverse Key Matrix
Steps to Calculate Inverse Matrix
- Begin with numerical representation of original matrix K; calculate adjugate which leads to transpose operations.
Determinant Calculation
- Determinant found through standard formula yields value necessary for further calculations related to finding inverse representation.
Completing Inverse Calculation
Finalizing Inverse Representation
- Multiply determinant's reciprocal by transpose adjugate results in final inverse matrix representation used during decryption process.
Executing Decryption Operations
Processing Encrypted Symbols Back to Plaintext
- Start decrypting first two characters EH using inverse matrix leading back to original plaintext symbols B and E through modular arithmetic.
Completing Full Decryption Cycle
- [Final steps involve decrypting last two characters P and D resulting in complete recovery of original message BER.]
Turn any video into a summary like this
YouTube links, meetings, lectures. With transcripts, search, and chat.