You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
substitute the fourth letter of the alphabet, namely D, for A
Every letter is shifted forward by 4. But the image shows D going to A, which is a negative 4 shift. ???
Step 2:
Given the key "ddddddddddddddddd", encoding our string "iamapandabear" would return the obscured "ldpdsdqgdehdu"
There is no explanation given, but apparently, the logic is "for each corresponding character in the key, calculate its shift with respect to a, and apply the same shift to the letter". This is not obvious, at all, and shouldn't be omitted.
To make matters more confusing, the example is totally contradictory to what is shown in the Wikipedia link at the bottom of the page. Quoting:
the keyword zebras gives us the following alphabets:
So, each letter in plain is directly mapped to the corresponding letter in the key, no shifting involved. If the key is shorter than the string, the unused letters from the alphabet are used to make the lengths equal.
In the exercise, what do we do when the key length is not equal to the string? If it's smaller, how do we fill the gaps? What if it's larger (why would it be larger if there are 26 letters?)
Step 3:
Let's make your substitution cipher a little more fault tolerant by providing a source of randomness
What does this mean? How do we provide a "source of randomness"? if we are talking about a salt, how should that be applied?
Students should be given the information needed to solve a problem, unambiguously.
The text was updated successfully, but these errors were encountered:
There are quite a few things that are vague.
Step 1:
Every letter is shifted forward by 4. But the image shows
D
going toA
, which is a negative 4 shift. ???Step 2:
There is no explanation given, but apparently, the logic is "for each corresponding character in the key, calculate its shift with respect to
a
, and apply the same shift to the letter". This is not obvious, at all, and shouldn't be omitted.To make matters more confusing, the example is totally contradictory to what is shown in the Wikipedia link at the bottom of the page. Quoting:
So, each letter in plain is directly mapped to the corresponding letter in the key, no shifting involved. If the key is shorter than the string, the unused letters from the alphabet are used to make the lengths equal.
In the exercise, what do we do when the key length is not equal to the string? If it's smaller, how do we fill the gaps? What if it's larger (why would it be larger if there are 26 letters?)
Step 3:
What does this mean? How do we provide a "source of randomness"? if we are talking about a salt, how should that be applied?
Students should be given the information needed to solve a problem, unambiguously.
The text was updated successfully, but these errors were encountered: