ELI5: Explain Like I'm 5

Johnson code

Okay, so you know how sometimes when you have to write a secret message, you can switch the letters around to make it harder for people to read? Like instead of writing "CAT" you might write "TAC"? Well, Johnson Code is kind of like that, but with numbers instead of letters.

Basically, Johnson Code is a way of encrypting or scrambling numbers so that people who aren't supposed to see them can't understand what they mean. The way it works is that you take a set of numbers, like 1, 2, 3, 4, 5, and then you rearrange them in a specific pattern. The pattern is usually a series of steps where you move one or more numbers over by a certain amount.

For example, let's say we start with the numbers 1, 2, 3, 4, 5, and we want to use a Johnson Code pattern that moves each number over by three places. The first step would be to take the last number, 5, and move it to the front of the list. So now our list looks like this: 5, 1, 2, 3, 4. Then we would move each number over by three places, so 5 becomes 2, 1 becomes 4, 2 becomes 5, and so on. Our final list using this pattern would be 2, 4, 5, 1, 3.

So if we wanted to send a secret message using Johnson Code, we could use this pattern to scramble the numbers in our message. Then if anyone intercepted the message, they wouldn't be able to understand it unless they knew the Johnson Code pattern we used to encrypt it.

That's basically what Johnson Code is! It's a way of scrambling numbers to keep them secret.
Related topics others have asked about: