Implement the solitaire cypher.
Given a starting permutation of numbers [1:N], deck, generate M values for the keystream. The small joker will be value N-1, the big joker will be N.
This is an update of this problem.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers18
Suggested Problems
-
Swap the first and last columns
22947 Solvers
-
4492 Solvers
-
Arrange Vector in descending order
13692 Solvers
-
Create One Large Eye of size N x N Quickly?
96 Solvers
-
Get the length of a given vector
13426 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I'm not sure what algorithm we're supposed to implement here, but it does not appear to be the key generation for Schneier's Solitaire cipher.
For instance, when the initial deck is 1:N for some N > 4, it will be [2:N 1] after the jokers are moved and the two cuts performed, so the first key generated will then always be 4. In the test suite, it's 3.
Also, the last test in the test suite shows that in the algorithm asked for here, the jokers are kept in the keystream, which is not the case in Schneier's original algorithm.
It would be nice if you could update the problem's description with some additional details.