Professional Documents
Culture Documents
Appliedlinearpbl
Appliedlinearpbl
Appliedlinearpbl
PROJECT DESCRIPTION
This project will involve creating an encryption algorithm using linear algebra concepts, specifically matrix
multiplication. The encryption process will transform plain text into ciphertext using a key matrix, and the
decryption process will reverse this using an inverse matrix.
Theoretical Foundation
Basics of Cryptography:
It involves converting information from its normal, comprehensible form into an incomprehensible
format and vice-versa.
Linear algebra, especially matrix operations, plays a crucial role in several cryptographic algorithms.
Matrix multiplication and inverse are key operations used in encrypting and decrypting messages.
Algorithm Design
Convert each character of the plaintext into a numerical value (e.g., ASCII values).
Arrange these values into a matrix format suitable for multiplication with the key matrix.
Key Matrix:
Encryption Process:
Decryption Process:
Preparation:
Decide on the size of the key matrix (e.g., 2x2, 3x3, etc.).
Testing:
23 10
( )
21 3
The inverse of the key matrix, crucial for decryption, is calculated as:
−0.0212766 0.07092199
( )
0.14893617 −0.16312057
Note that these are floating-point numbers, which we'll need to handle during decryption.
Next, we'll implement the encryption and decryption functions. These functions will perform the
matrix multiplication for encryption and use the inverse matrix for decryption. We also need to
handle the conversion of the resulting matrices back into text, considering any rounding or
conversion issues due to floating-point operations in the inverse matrix.
Encryption:
The text "hello world" was converted into a numerical matrix and then encrypted using the key matrix. The
encrypted matrix looks like this (note the negative and large values due to matrix multiplication):
Decryption:
The decryption process involved multiplying the encrypted matrix by the inverse of the key matrix and
converting it back to text.
The decrypted text is "hello world", matching the original input (with an additional space due to padding
during the text-to-matrix conversion).
REFERENCES
Trefethen, L. N., & Bau III, D. (n.d.). Numerical Linear Algebra. [Textbook].