ELI5: Explain Like I'm 5

One way function

A one way function is like a magic box that turns things into something else, but you can't turn the something else back into the original thing.

Let's say you have a box that makes apples into pies. You can put an apple in the box and get a pie, but you can't put a pie in the box and get an apple. The box only goes one way - from apple to pie.

One way functions are like that magic box, but with numbers or letters instead of apples and pies. You can put a number into the function and get a different number out, but you can't take that output number and figure out what the original number was that went into the function.

For example, let's say the one way function is to add 5 to whatever number you put in. If you put in the number 7, the function will give you the output number 12 (7 + 5 = 12). But if someone gives you the output number 12 and you don't know the original number that went into the function, you can't figure out what that original number is.

One way functions are really useful for keeping things secret. For example, if you want to send a secret message to someone, you could use a one way function to scramble the letters in the message, and then the receiver could use the same one way function to unscramble the message and read it. But if anyone intercepts the scrambled message, they can't unscramble it without knowing the original "key" to the one way function.

In summary, a one way function is like a magic box that turns things into something else, but only goes one way and can't be undone. It's useful for keeping secrets and scrambling messages.