Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Count numbers:
- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
- Replace every 0 by A, every 1 by B, etc (monoalphabetic substitution):
- In Javascript we can write it by this as:
- str.replace(/\d/g, x => "ABCDEFGHIJK"[x])
- So we say the code for this alphabet is:
- "ABCDEFGHIJK"
- In this the symbol at position 0 is what replaces a 0, i.e. 0 -> A, and so on.
- So if we translate the top counting using "ABCDEFGHIJK" we get:
- A B C D E F G H I J BA BB BC BD BE BF BG BH BI BJ CA CB CC CD
- We can sill see that we are counting because B follows A, C follows B, etc. But we
- can only detect it because we know the order of the alphabet.
- We could use a different alphabet: "6534290871". Then we get:
- 6 5 3 4 2 9 0 8 7 1 56 55 53 54 52 59 50 58 57 51 36 35 33 34
- We know we are still counting, because we translated the counted sequence in a way
- that can be reversed. But we cannot see that it is counting anymore. We can see it
- by translating it back. But to do this we need to know the alphabet.
- Is there a clever way to determine the alphabet by just looking at a counted sequence?
- How does this influence the security of an encryption, if we know enough counted cipher datagrams?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement