Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Cipher problem description is unclear #2049

Open
asarkar opened this issue Jun 6, 2022 · 1 comment
Open

Simple Cipher problem description is unclear #2049

asarkar opened this issue Jun 6, 2022 · 1 comment

Comments

@asarkar
Copy link

asarkar commented Jun 6, 2022

There are quite a few things that are vague.

Step 1:

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:

Plaintext alphabet    | ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ciphertext alphabet   | ZEBRASCDFGHIJKLMNOPQTUVWXY

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.

@coriolinus
Copy link
Member

As this description derives directly from that in the problem specifications, I'm transferring the issue there.

@coriolinus coriolinus transferred this issue from exercism/rust Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants