CRYSTALS-Kyber | Lattice (MLWE) | KEM |
CRYSTALS-Dilithium | Lattice (MLWE) | Signature |
Falcon | Lattice (NSIS) | Signature |
SPHINCS+ | Hash-based | Signature |
Security | Private key | Public key | Signature | Key gen | Sign | Verify |
---|---|---|---|---|---|---|
128-bit (A1) | 16 | 32 | 44.7K | 2us | 490ms | 7.2ms |
128-bit (A2) | 16 | 32 | 49.7K | 2us | 326ms | 8.5ms |
128-bit (B) | 16 | 32 | 90.1K | 2us | 343ms | 16.8ms |
192-bit (A) | 24 | 56 | 101.6K | 2us | 497ms | 47ms |
192-bit (B) | 24 | 56 | 201.6K | 2us | 623ms | 103ms |
256-bit (A) | 32 | 64 | 186.1K | 2us | 1399ms | 149ms |
256-bit (B) | 32 | 64 | 369K | 2us | 1773ms | 330ms |
(How to play rock-paper-scissors over internet)
How Sony PS3 got hacked in 2011: \[ \left\{\begin{aligned} s_1 & =\color{red}k\color{black}-\color{red}x\color{black}e_1 \\ s_2 &= \color{red}k\color{black}-\color{red}x\color{black}e_2 \end{aligned}\right. \]
\[ y=x^3: \boxed{\begin{aligned} x\cdot x & =u \\ u\cdot x & =y \end{aligned}} \]
\[ 0\leq x<8: \boxed{\begin{aligned} 1\cdot(x_0+2x_1+4x_2) & =x \\ x_0\cdot x_0 & =x_0 \\ x_1\cdot x_1 & =x_1 \\ x_2\cdot x_2 & =x_2 \end{aligned}} \]
\(r=\) if \(b\) then \(t\) else \(f\): \[ \boxed{\begin{aligned} (t-f)\cdot b & =r-f \\ b\cdot b & =b \end{aligned}} \]
field mut digest = leaf;
for u32 i in 0..DEPTH {
assert(path[i][indices[i]] == digest);
digest = hash(path[i]);
}
assert(digest == root);
\(\text{\tt foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b}\)
merkleProof :: Int -> Number -> Comp ()
merkleProof depth root = do
leaf <- inputNum
path <- inputs2 depth 2
digest <- foldlM (\digest p -> do
assert (digest `existsIn` p)
hash p)
leaf
path
assert (digest `Eq` root)