The Cryptex is a small cylinder shaped container which is used to transport messages or small objects in a secure manner. It can very in size but on average it is about the size of a soda can.
It originally solves the problem of securely delivering messages without the need of encryption. But you can also use it to securely transport keys and other small items as well. It can also be used for secure storage.
The container is made of indestructible materials and its locking mechanism is similar to that of a bike lock. It has numbered or lettered dials along its length which can be rotated like rings around the container. There are usually five of them but there can be more or less.
To open the cryptex you must input the correct combination into the dials by lining them up with markings on it. Then you pull open one end of it which holds the inner container and access its contents. If you want to be really mean, you can have it contain another smaller cryptex inside of it. But this only works with two.
It can also contain a self-destruction measure either mechanical or magical which will destroy the contents should one attempt to tamper with or force it open.
It is often transported in a small box of its own for aesthetic reasons, to hide it from casual view, or more commonly, to display the name and address of the sender and recipient.
Here is how it works:
In both examples we will assume it uses a standard five letter combination.
Alice and Bob have a problem to solve. They need to be able to send messages to each other and keep their courier Eve from reading them. So Alice comes up with the idea to use a cryptex.
Alice and Bob first agree upon a secret shared combination. Let's say AFDGX. The cryptex is then set to this combination.
Bob wants to send Alice a message so he gets the cryptex and takes it home.
Bob writes his message and then inputs the combination AFDGX to open the cryptex. He then locks his message inside, scrambles the dials, and gives it to the nosy courier Eve to deliver to Alice.
Now if Eve wanted to read the message this time, she would have to figure out the to open the cryptex to do so. This requires knowing the correct combination. Each dial has 26 letters on it. Sure she could try every possible combination until she finds the correct one and it opens. But how long would that take? Too long.
So she delivers the cryptex to Alice and gets paid for the job.
Alice opens the cryptex with the same combination AFDGX and takes Bob's message out to read.
To open a secure vault, a special key with a unique pattern in it is required to open it. This key is next to impossible to duplicate even by a master locksmith. The vault door is also impossible to lockpick.
To protect this key from theft, the owner Bob, decides to lock it inside a cryptex using a combination known only to him and two others. This combination is LYKZX.
Now a rouge breaks into the place and searches for the key to the vault. It is nowhere to be found on anyone. Later he stumbles upon the cryptex and examines it. Shaking is reveals that there is something inside it. The rouge realizes that this might be what the key is hidden in.
Now he can try every possible combination until the correct one is revealed and it opens. But again, each dial has 26 letters. So this would take days or even weeks to do so. He could simply take it with him and try to open it on his own time but then Bob or someone else would surely know it is missing. It is not possible to force it open either.
Without that combination he is not getting his hands on the key.