Question
Square Cipher JAVASCRIPT In cryptography, there is a cipher algorithm known as the two square cipher. However, for this assignment, you should implement a simplified
Square Cipher JAVASCRIPT
In cryptography, there is a cipher algorithm known as the two square cipher. However, for this assignment, you should implement a simplified version of this, just called the square cipher.
The KEY for this cipher is a 5x5 grid of text. Since a 5x5 grid only supports 25 of the 26 letters of the alphabet, we will not include Z. For the purposes of this cipher, a Z in the plaintext translates to the Z in the ciphertext. For all other alphabetical characters, get the position of that character in the regular alphabet, and translate it to the character at the corresponding position in the grid.
For example, say we wanted to use the square cipher to encrypt the plaintext CSC, using the square shown to the right. The letter C is at position three in the alphabet, and should translate to W based on the square. The letter S is at position 19 in the alphabet, and thus should translate to the letter E based on the square. Thus, the ciphertext should be WEW. Please also write a function where the square of letters will get scrambled every time someone clicks an \"update\" button and each letter is still there and none are missing and none are repeated.
As with the Caesar cipher, you can skip whitespace, punctuation, and digits.
Please help asap!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started