Three players, Bob, Alice and Ted are seated at a poker-table and are playing a game of Texas Hold’em. Bob is the dealer, and he generates a deck of 52 cards on his machine, only he can view the cards. Using Fisher-Yates /dev/urandom he shuffles the deck of cards, and then encrypts the deck with the same encryption key on each card, making the deck unreadable to anyone but himself. He then passes the now encrypted deck to Alice, who does the same thing: shuffles the deck of cards and then encrypts them. Finally, Alice passes the deck to Ted who goes through the same process. The deck is now in its final ordered state, 1 through 52, and this order does not change throughout the course of the hand. Ted passes the now 3x encrypted deck of cards back to Bob, who takes off his “shuffle lock” and now encrypts each individual card with a different encryption key: B1, B2….B52. He passes the deck to Alice, who does the same thing: removes her “shuffle-key” and encrypts the deck with a unique encryption key A1, A2….A52. Alice then passes the deck back to Ted, who completes this same process.
How is it possible that Bob can remove his encryption key of a string that is completely random for him, because Alice and Ted encrypted it?
Is this a feature of asymetric cryptography? If so a jsfiddle or so mayb be nice :)
I understand that you can encrypt something with a private key and decrypt it with a public key, but is it like that that this also works on strings that somebody else also encrypted (like in the example above)? So can I just simply remove my encryption?