The Morality of Quantum Computing
&gt; <i>But in any case, there’s already a push to switch to new cryptographic codes that already exist and that we think are quantum-resistant.  An actual scalable QC on the horizon would of course massively accelerate that push. </i><p>Wikipedia has a good review on major subdivisions of Post-Quantum Cryptography.<p>* <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Post-quantum_cryptography" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Post-quantum_cryptography</a><p>In short, in additional to integer factorization and (elliptic) discrete logarithm, there are a lot of others hard problems that can be used to construct public key encryption algorithms.<p>* Lattice-based cryptography<p>A &quot;lattice&quot; is a mathematical structure in abstract algebra. The study of it originally came from the theoretical analysis in solid-state physics on the structure of crystals, and can be understood as a matrix of evenly spaced &quot;dots&quot; in space. Formally, it&#x27;s a discrete subgroup of an addictive group in an n-dimensional space.<p><pre><code>        *   *   *   *
       *   *   *   *
      *   *   *   *
     *   *   *   *

    (This is a lattice)
</code></pre>
There exists several problems about them that are believed to be extremely difficult, called Lattice Problems. One well-known example is the Shortest Vector Problem: given a lattice <i>L</i> in vector space <i>V</i> and a norm <i>N</i>, find the shortest non-zero vector in <i>V</i>, measured by <i>N</i>, in <i>L</i>.<p>There are fast approximate solutions, but under certain circumstances, this is an NP-hard problem, so we assume that we can construct a system, that is difficult to solve, although it&#x27;s not HP-hard.<p>NTRU is an algorithm that utilized a similar problem about lattice, proposed in 1997, no fundamental problems have been found in the original algorithm, so even after 20 years, it remains unbroken today.<p>OpenSSH contains an implementation that you can use now today.<p>But it requires LARGE (many KiB) public key - there&#x27;s a large system of polynomials. Also, parameter selection is a question.<p>* Learning With Errors (LWE)<p>In theoretical machine learning, there&#x27;s a problem called &quot;Learning with Errors&quot;. I don&#x27;t understand this problem well, but basically, we have a system of linear polynomial equations, but with random &quot;noise&quot;. Solving this system of equations is believed to be extremely difficult.<p>And interestingly, Oded Regev proved this problem is as difficult as some of the worst Lattice Problems. So LWE is considered a branch of Lattice-based Cryptography. There is also a variant of this problem, called Ring-RWE, which is more efficient for cryptography.<p>Example includes Google&#x27;s NewHope ciphersuits.<p>Again, LARGE pubkey.<p>* Multivariate cryptography<p>Solving a system of polynomial equations with many variables in a finite field F,<p><pre><code>    y1 = G1(x1, x2, x3)
    y2 = G2(x1, x2, x3)
    y3 = G3(x1, x2, x3)
    ...
    (G is a polynomial equation)
</code></pre>
is believed to be a difficult problem, and is NP-hard and NP-complete for a random system. And it has been proved that the case of solving a system of 2rd-order polynomial equations (quadratic equations) is already difficult enough, and this question is called the Multivariate Quadratic Problem.<p>This fact can be used to construct public-key cryptography. However, because the system cannot be random, it&#x27;s not NP-hard or NP-complete (there is no system that is NP-hard in the entire study of cryptography, otherwise, how do you decrypt it...), but we believe that we can construct a system that is difficult to solve practically.<p>Unfortunately, attempts on creating public-key encryption algorithms is largely unsuccessful, but there are successful digital signature schemes, such as <i>Oil and Vinegar</i>.<p>Again, LARGE pubkey.<p>* Hash-based Cryptography<p>This scheme is proposed by Ralph Merkle in the late 70s, and remains unbroken today.<p>First, generate 2^n pairs of random public and private keys (X, Y), and hash all private keys, let&#x27;s say we have 4 keypairs. Placing these hash values Y0, Y1, Y2, Y3 at the bottom of a binary tree as leaves.<p>We connect and hash the two surrounding values to obtain the next layer (think blockchains), so hash (Y0 + Y1), hash (Y2 + Y3), and built the tree recursively until we reach the root.<p><pre><code>      H(H(H(Y0) + H(Y1)) + H(H(H(Y2) + H(Y3))) ... 1 node
               ^           ^
     H(H(Y0)  +  H(Y1))  H(H(Y2)  +  H(Y3))    ... 2 nodes
      ^         ^         ^         ^
     H(Y0)     H(Y1)     H(Y2)     H(Y3)       ... 4 nodes
</code></pre>
To sign a message, simply select an unused keypair (X, Y) to create the signature. The signature also contains additional information to show that the (X, Y) can be traced to the root of the Merkle Tree (think Bitcoin Wallet?).<p>It has been proved that the its security can be reduced to the security of the underlying hash function.<p>XMSS is such a system, and there is already an RFC standard for it. OpenSSH contains an implementation that you can use now today. The problem is its large keysize and limited number of signatures, and more importantly, it&#x27;s stateful. Key reuse is FATAL.<p>DJB has an attempt to make a stateless version, called SPHINCS.<p>* Code-Based Cryptography<p>This approach uses the difficulties on decoding error-correction code. Decode a general linear code is NP-hard. First, select a system of code that is easy to decode for us, as the private key, and transform it to a obscured form, as the public key.<p>A classic algorithm is McEliece, it&#x27;s known since the late 70s, as old as the original Diffie-Hellman, and still remains unbroken today, but it uses binary Goppa codes which requires LARGE keys.<p>* Supersingular Elliptic Curve Isogeny cryptography<p>The math is even beyond description to a layman like me. Basically, &quot;isogeny&quot; is a mathematical structure in abstract algebra, and we can find a bunch of supersingular elliptic curve in the same isogeny, and use the property of this isogeny to encrypt data. Just like the ordinary elliptic curve cryptography, which we use a bunch of points on the same curve and use the property of this group to encrypt data.<p>An example of such algorithm is SIDH, and it&#x27;s a new candidate for post-quantum Diffie-Hellman exchange, but requires a lot more CPU time.