Stream cipher from hash functions: possible
For any cryptographically strong pseudo-random function (PRF) the CTR mode of encryption can be defined. You can build such a PRF from a hash function.
One can achive to produce a key stream by :
$$H(k,0) || H(k,1) || ... || H(k,m)$$ where the $k$ is your symmetic key. Salsa20 and ChaCha20 are examples.
Public key from hash functions: your method? No
- A 48 byte string is generated randomly. This is the private key.
- That 48 byte string produces another piece of data through SHA384: the public key.
- The keys can be shared secretly by exchanging keys (example: Alice tells Bob her private key and it is encrypted with her public key.)
What do we do after this? Do you remember that we need a system to encrypt the data with the public key and decrypt with the private key like RSA.
I want to know if this is possible because RSA is currently secure but can be broken by quantum computers in the future. Quantum computers can factor large primes but they can't break hash functions. Also, I picked SHA384 because it can't be broken with a quantum computer.
What about quantum-resistant public-key cryptography
- NTRU (lattice-based cryptography)
- McEliece (code-based cryptography)
- Ring Learning with Errors (R-LWE) (lattice-based cryptography)
- Multivarite Cryptography
- Isogeny-based cryptography such as SIKE conjectured to be infeasible even Shor is ever implemented.
and AES256 which has $2^{128}$ bit security against Grover's algorithm if ever built and run efficiently for the queries.
Now you can use these to achieve Hybrid Cryptosystem.
Also note that to have a resistance for hash functions against the quantum attacks, you need to consider the Brassard et al. method on hash functions. That has $\mathcal{O}(\sqrt[3]{n})$ attack time for n-bit hash function. whereas the Grover's method has $\mathcal{O}(\sqrt{n})$-time.
This cost calculation of the quantum attacks hides some metrics like Brassard, the attack requires a huge Quantum circuit. Grover for AES-128, not clear how one will run the $2^{64}$ evluations.