0
$\begingroup$

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.

$\endgroup$
3
  • 3
    $\begingroup$ 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? $\endgroup$
    – SEJPM
    Commented Feb 23, 2020 at 19:04
  • $\begingroup$ > 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? $\endgroup$
    – Woodstock
    Commented Feb 23, 2020 at 20:42
  • $\begingroup$ Look for "lamport signatures" understand the basic concepts of hash-based signatures. $\endgroup$
    – shumy
    Commented Feb 24, 2020 at 9:58

1 Answer 1

2
$\begingroup$

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.

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.

$\endgroup$
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.