Alice

Parameters known by Alice:

Generates the key \( k \).

Encrypts the message \( m \):

Step y/x

Enter a message (a sentence containing only whitespace and the letters A–Z) that Alice wants to send encrypted to Bob:

Press Enter to generate the parameters. Use the Left and Right arrow keys to navigate between steps.

Alice generates a completely random key \( k \) that is the same length as the message \( m \).

She then sends the key \( k \) to Bob through a secure channel.

Before Alice can encrypt the message \( m \), she needs to determine the index of each letter in the message \( m \) within the English alphabet, with the letter \( a \) starting at index \( 0 \).

Alice then uses the key \( k \) to encrypt the message \( m \).

Before Bob can decrypt the ciphertext \( c \), he needs to determine the index of each letter in the ciphertext \( c \) within the English alphabet, with the letter \( a \) starting at index \( 0 \).

Decryption is almost identical to encryption: instead of adding the two numbers, we subtract them.

Bob

Parameters known by Bob:

Receives the key \( k \).

Receives the ciphertext \( c \).

Decrypts the ciphertext \( c \):