"The " + animal( 1 ) + " wears " + an(color(1)) + " " + clothing(1) person(1) applyVigenere(M,person(1)) 0 25

person(1) wants to encode the following cryptic message:

M

In an effort to increase security, person(1) decides to encrypt it with a Vigenere cipher using his own name as the keyword. What will the secret message look like once it is encrypted?

In an effort to increase security, person(1) decides to encrypt it with a Vigenere cipher using her own name as the keyword. What will the secret message look like once it is encrypted?

You can use the below slider to help you encrypt the message.
Note that in Vigenere ciphers, a{} = 0.
Slide the orange dot to shift the encrypted alphabet.


Original Alphabet
var indent = 1; init({ range: [ [LOWER_BOUND - 0.5, UPPER_BOUND * indent + 0.5], [-1, 1] ], scale: [19, 40] }); style({arrows: ""}); line( [ 0, 0 ], [ UPPER_BOUND * indent, 0 ] ); style({arrows: ""}); line( [ 0, 0 ], [ LOWER_BOUND, 0 ] ); var myLabels = new Array(); style({arrows: ""}); for ( var x = LOWER_BOUND; x <= UPPER_BOUND; x+=1 ) { var markLength; x % 5 === 0 ? markLength = 0.2 : markLength = 0.1 line( [ x * indent, -markLength ], [ x * indent, markLength ] ); label( [ x * indent, 0.53 ], "abcdefghijklmnopqrstuvwxyz"[x], "center", false); myLabels[x] = label( [ x * indent, -0.53 ], "abcdefghijklmnopqrstuvwxyz"[x], "center", false); } addMouseLayer(); graph.movablePoint = addMovablePoint({ constraints: { constrainY: true }, snapX: indent }); graph.movablePoint.onMove = function( x, y ) { for ( var i = 0; i <= UPPER_BOUND; i+=1 ) { myLabels[i].remove(); myLabels[i] = label( [ i , -0.53 ], "abcdefghijklmnopqrstuvwxyz"[(i+x) % 26], "center", false); } return [ min( max( LOWER_BOUND, x ), UPPER_BOUND * indent ), y ]; };
Cipher Alphabet

C

  • C
  • applyVigenere(M, person(1).substring(0,5) )
  • applyVigenere(M, person(1) + person(1))
  • applyVigenere(M,person(2))
  • applyVigenere(M,person(3))

First, we need to convert every letter in the keyword to a number.
Where a{} = 0 and z{} = 25.

For our keyword person(1) the first few letters convert to:
\quad\begin{align} \text{person(1)[0]} &: "abcdefghijklmnopqrstuvwxyz".indexOf(person(1)[0].toLowerCase()) \\ \text{person(1)[1]} &: "abcdefghijklmnopqrstuvwxyz".indexOf(person(1)[1].toLowerCase()) \\ \text{person(1)[2]} &: "abcdefghijklmnopqrstuvwxyz".indexOf(person(1)[2].toLowerCase()) \end{align}

To encrypt our message, shift the first letter in the message to the right by the letter/value of the first letter in our keyword.

In this case, we shift the letter M[0] by the value "abcdefghijklmnopqrstuvwxyz".indexOf(person(1)[0].toLowerCase()) which results in the letter "abcdefghijklmnopqrstuvwxyz"[("abcdefghijklmnopqrstuvwxyz".indexOf(M[0].toLowerCase()) + "abcdefghijklmnopqrstuvwxyz".indexOf(person(1)[0].toLowerCase()) ) % 26].

We do the same with the second letter of the message, and the second letter of the keyword.

Shift the letter M[1] by the value "abcdefghijklmnopqrstuvwxyz".indexOf(person(1)[1].toLowerCase()) which results in the letter "abcdefghijklmnopqrstuvwxyz"[("abcdefghijklmnopqrstuvwxyz".indexOf(M[1].toLowerCase()) + "abcdefghijklmnopqrstuvwxyz".indexOf(person(1)[1].toLowerCase()) ) % 26].

Every time we reach the last letter of the keyword, we can go back to the first letter of the keyword to continue encrypting the rest of the message.

Be sure to ignore spaces in the message.

The encrypted message is “C