# Using SHA384 as an asymmetric cipher?

SHA384 is a hash function that can be (and is) used to verify data by checking it. Can it also be used as the background for a public-key crypto system? Here is what I mean:

1. A 48-byte string is generated randomly. This is the private key.
2. That 48-byte string produces another piece of data through SHA384: the public key.
3. The keys can be shared secretly by exchanging keys (example: Alice tells Bob her private key and it is encrypted with her public key.)

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.

• I am confused by this description. It seems that it requires transport of a secret to the sender for them to encrypt data for you. But that's just symmetric encryption, so where does it become public-key? – SEJPM Feb 23 at 19:04
• > The keys can be shared secretly by exchanging keys (example: Alice tells Bob her private key and it is encrypted with her public key.) -> wouldn't that imply everyone can decrypt her private key during transit, as her public key (which is being used symmetrically) is public info? – Woodstock Feb 23 at 20:42
• Look for "lamport signatures" understand the basic concepts of hash-based signatures. – shumy Feb 24 at 9:58

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

1. A 48 byte string is generated randomly. This is the private key.
2. That 48 byte string produces another piece of data through SHA384: the public key.
3. 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.

• 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.