Line 11: | Line 11: | ||
== Part C.3 == | == Part C.3 == | ||
+ | |||
+ | <pre> | ||
+ | %{ | ||
+ | Jeremiah Wise | ||
+ | Homework #3 Part C.3 | ||
+ | %} | ||
+ | |||
+ | message = [1 0 4; 0 1 0; 1 0 1]; | ||
+ | |||
+ | encryptedVector = [2 0 0; 0 1 0; 0 0 3]; | ||
+ | |||
+ | secretMatrix = ((inv(message)) * encryptedVector).' | ||
+ | </pre> |
Revision as of 13:31, 19 September 2008
Application of Linearity
Part C.1
If Bob knows the secret matrix used to encrypt the message, He can simply take the inverse of that matrix and multiply the encrypted vector by the inverted matrix.
Part C.2
Yes she can just solve the system of equations represented by the matrix, but in general it is easier to just use matrices to solve such equations.
Part C.3
%{ Jeremiah Wise Homework #3 Part C.3 %} message = [1 0 4; 0 1 0; 1 0 1]; encryptedVector = [2 0 0; 0 1 0; 0 0 3]; secretMatrix = ((inv(message)) * encryptedVector).'