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: 
Clarification
-------------

> 
> I'm wondering whether there exists an encoding/hashing/encryption scheme whereby the original string can always be derived in its entirety given the entire encoded/hashed/encrypted string, and nothing else (no key/password). But also, no portion of the original string can be derived given any portion of the encoded/hashed/encrypted string.
> 
> 
> 

I am assuming that "no portion of the original string can be derived given any portion of the encoded/hashed/encrypted string" means "no portion of the original string can be derived given anything less than the entire encoded/hashed/encrypted string", otherwise the question would be self-contradictory.

Answer
------

It sounds like you are looking for a permutation. A permutation is an invertible transformation on a fixed-size set of blocks. If your input is larger, the/an [All-Or-Nothing Transform](https://en.wikipedia.org/wiki/All-or-nothing_transform) may be useful. The OAEP mentioned by @DannyNiu is an example of an AONT.

For example, many block ciphers are built by interleaving applications of a permutation with the addition of secret key material. The permutation provides diffusion, which ensures that if you modify any part of the output then attempt to invert it, you end up back at a completely different input. 

If you simply strip the key addition portion from a block cipher, it should also do what you're asking. For example, [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) consists of subBytes, mixColumns, shiftRows, and addRoundKey. If you were to omit the addRoundkey operation, you would be left with a fixed permutation that provides the required avalanche effect and some degree of unpredictability. Another example of a permutation is [keccak-f](https://en.wikipedia.org/wiki/Keccak#The_block_permutation), which does the mixing for the [SHA3 algorithm](http://en.wikipedia.org/wiki/Keccak).

A key-less permutation does not provide encryption
--------------------------------------------------

Note that such a construction with no key is no longer providing *encryption*, as it is not possible to provide confidentiality of the message without some kind of secrecy, which is what the key provides. If anyone who has an input message can compute an output "ciphertext", or anyone who has an output "ciphertext" can invert it to the input message, then clearly confidentiality of the input cannot be achieved.

You tagged this question with "encoding", so perhaps confidentiality is not required in your use case. You would need to establish what you need this construction for and whether or not this is an issue.
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.