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: 
[OAEP](https://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding) - Optimal Asymmetric Encryption Padding may be what you want. 

In RSA public-key encryption system, in order to prevent partial decryption, OAEP padding is used. In essence, it's a Feistel network with randomizing element. 

When used alone, it can ensure no partial information can be derived from any partial information, but when the whole message is available, it's trivial. 

In your case, this is no longer encryption - it's secret sharing. 

[Related link](https://en.wikipedia.org/wiki/All-or-nothing_transform)
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.