Question: I can imagine that finding $p,q,n$ are easy, but my text book also says the $e$ can be found rapidly, so how does modern RSA find this $e$?

![RSA as a Public Key System](https://i.stack.imgur.com/LBR7F.png)

Answer: 
The "key" is secret data that are used in encryption with known "algorithm". Of course you can make keyless algorithm - get permutation, shifting stuff around, bit inversion, whatever. Employ any known strong encryption with built-in values. Mix and match all you want! However, this effectively makes algorithm itself the key. Once someone has access to your encryptor/decryptor and/or any built-in values, they don't need to know any additional data - which is ENTIRE REASON for separate key - and can decrypt whatever they want.

Incidentally that's primary and inevitable point of failure of futile attempts for DRM.
One-time pad it
===============

Given the following conditions...

* [Alice](https://en.wikipedia.org/wiki/Alice_and_Bob) has a plain-text. She wants to encrypt that.
* After encrypting it, Alice obtains several cipher-texts.
* Alice wants to give the cipher-texts to people that are not authorised to read the plain-text. None of them shall be able to decipher the cipher-text on their own.
* If all the people that have the cipher-texts give them back to Alice, Alice must be able to reconstruct the plain-text.

This is easy: **use a [One-time pad](https://en.wikipedia.org/wiki/One-time_pad)**.

1. Alice creates a key (K1) of the same length as the plain-text.
2. Alice XORs the plain-text with the key, she gets C1.
3. Alice gives K1 to Bob and C1 to Carol.

Unless Bob and Carol are in cahoots, neither can reconstruct the message. When both of them give the key and cipher-text back to Alice, Alice only needs to XOR them together to get the plain-text back. 

Expanding
=========

Alice wants better security and involves Dave and Erin. The algorithm becomes: 

1. Alice creates a key (K1) of the same length as the plain-text.
2. Alice XORs the plain-text with K1, she gets C1.
3. Alice gives K1 to Bob.
4. Alice repeats 1, 2 and 3, applies K2 on C1, and gets C2. She gives K2 to Carol.
5. Alice repeats 5, to get K3 and C3. She gives K3 to Dave.
6. Alice gives C3 to Erin.

This can be repeated as many times as Alice likes.

There is some fragility in this as Alice needs to get the key/cipher back from **everyone** before she can get her plain-text back. But this is a problem for another post.