diff options
Diffstat (limited to 'reveal.js/cryptographic_primitives.html')
| -rw-r--r-- | reveal.js/cryptographic_primitives.html | 494 |
1 files changed, 494 insertions, 0 deletions
diff --git a/reveal.js/cryptographic_primitives.html b/reveal.js/cryptographic_primitives.html new file mode 100644 index 0000000..4b2e6fc --- /dev/null +++ b/reveal.js/cryptographic_primitives.html | |||
| @@ -0,0 +1,494 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8" /> | ||
| 5 | <title>Introduction to cryptographic primitives</title> | ||
| 6 | <meta name="author" content="Simeon Simeonov"/> | ||
| 7 | <meta name="mobile-web-app-capable" content="yes"/> | ||
| 8 | <meta name="mobile-web-app-status-bar-style" content="black-translucent"/> | ||
| 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
| 10 | |||
| 11 | <link rel="stylesheet" href="dist/reset.css"/> | ||
| 12 | <link rel="stylesheet" href="dist/reveal.css"/> | ||
| 13 | |||
| 14 | <!-- <link rel="stylesheet" href="dist/theme/black.css" id="theme"/> --> | ||
| 15 | <link rel="stylesheet" href="dist/theme/statnett.css" id="theme"/> | ||
| 16 | |||
| 17 | <!-- Theme used for syntax highlighting of code --> | ||
| 18 | <link rel="stylesheet" href="plugin/highlight/monokai.css" id="highlight-theme"/> | ||
| 19 | <!-- <link rel="stylesheet" href="plugin/highlight/zenburn.css" id="highlight-theme"/> --> | ||
| 20 | </head> | ||
| 21 | |||
| 22 | <body> | ||
| 23 | <div class="reveal"> | ||
| 24 | <!-- Any section element inside of this container is displayed as a slide --> | ||
| 25 | <div class="slides"> | ||
| 26 | |||
| 27 | <section> | ||
| 28 | <h2>Introduction to cryptographic primitives</h2> | ||
| 29 | </br> | ||
| 30 | <p><small>Simeon Simeonov - TDE</small></p> | ||
| 31 | </section> | ||
| 32 | |||
| 33 | |||
| 34 | <section> | ||
| 35 | <h2>What are cryptographic primitives?</h2> | ||
| 36 | </br> | ||
| 37 | <p>Cryptographic primitives are the most basic building blocks in cryptographic systems and protocols.</p> | ||
| 38 | <p>Creating cryptographic routines is very hard, and testing them to be reliable takes a long time, it is essentially never sensible (nor secure) to design a new cryptographic primitive to suit the needs of a new cryptographic system.</p> | ||
| 39 | <p>Since algorithms in this field are not only required to be designed well but also need to be tested well by the cryptologist community, even if a cryptographic routine looks good from a design point of view it might still contain errors. Successfully withstanding such scrutiny gives some confidence (in fact, so far, the only confidence) that the algorithm is indeed secure enough to use. Security proofs for cryptographic primitives are generally not available.</p> | ||
| 40 | <p>When choosing primitive for a cryptographic system, one should always consider if the primitive:</p> | ||
| 41 | <ul> | ||
| 42 | <li>is open and can be studied by the community</li> | ||
| 43 | <li>is patented</li> | ||
| 44 | </ul> | ||
| 45 | </section> | ||
| 46 | |||
| 47 | |||
| 48 | <section> | ||
| 49 | <h2>Agenda</h2> | ||
| 50 | </br> | ||
| 51 | <section id="fragments"> | ||
| 52 | <ul> | ||
| 53 | <span class="fragment"><li>cryptographic hash functions</li></span> | ||
| 54 | <span class="fragment"><li>cryptographically secure random generators (the very basics)</li></span> | ||
| 55 | <span class="fragment"><li>symmetric ciphers</li></span> | ||
| 56 | <span class="fragment"><li>public-key cryptography / asymmetric cryptography</li></span> | ||
| 57 | </ul> | ||
| 58 | </section> | ||
| 59 | </section> | ||
| 60 | |||
| 61 | |||
| 62 | <section> | ||
| 63 | <h2>Cryptographic hash functions</h2> | ||
| 64 | <p>A hash function is any function that can be used to map data of arbitrary size to fixed-size values (or a set of fixed-size values)</p> | ||
| 65 | <p>Cryptographic hash functions or cryptographically secure hash functions are hash functions with special properties (making them desirable for cryptographic systems)</p> | ||
| 66 | <p>(Over)simplified list of desired properties:</p> | ||
| 67 | <ul> | ||
| 68 | <li>the probability of a particular output result (hash value) <em>n</em> for a random input string ("message") is 2^(-n) (as for any good hash), so the hash value can be used as a representative of the message</li> | ||
| 69 | <li>given a hash value <em>h</em>, it should be difficult to find any message <em>m</em> such that <em>h = hash(m)</em> ("reversing the function")</li> | ||
| 70 | <li>given an input <em>m1</em>, it should be difficult to find a different input <em>m2</em> such that <em>hash(m1) = hash(m2)</em> (weak collision resistance)</li> | ||
| 71 | <li>it should be difficult to find two different messages <em>m1</em> and <em>m2</em> such that <em>hash(m1) = hash(m2)</em>. Such a pair is called a cryptographic hash collision (strong collision resistance)</li> | ||
| 72 | <li>if an input is changed slightly (for example, flipping a single bit), the output changes significantly (avalanche effect) - a property also desired in ciphers</li> | ||
| 73 | <li>being fast is always a nice bonus :)</li> | ||
| 74 | </ul> | ||
| 75 | </section> | ||
| 76 | |||
| 77 | |||
| 78 | <section> | ||
| 79 | <h2>MD5</h2> | ||
| 80 | <table> | ||
| 81 | <tbody> | ||
| 82 | <tr> | ||
| 83 | <td>Designers</td> | ||
| 84 | <td>Ronald Rivest</td> | ||
| 85 | </tr> | ||
| 86 | <tr> | ||
| 87 | <td>Published</td> | ||
| 88 | <td>1992</td> | ||
| 89 | </tr> | ||
| 90 | <tr> | ||
| 91 | <td>Digest size</td> | ||
| 92 | <td>128 bits (16 bytes)</td> | ||
| 93 | </tr> | ||
| 94 | <tr> | ||
| 95 | <td>Block size</td> | ||
| 96 | <td>512 bits</td> | ||
| 97 | </tr> | ||
| 98 | <tr> | ||
| 99 | <td>Broken?</td> | ||
| 100 | <td>Yes (broken collision resistance in 2^18 time)</td> | ||
| 101 | </tr> | ||
| 102 | </tbody> | ||
| 103 | </table> | ||
| 104 | <p>Still in use in lagacy applications and in applications where collision resistance is not needed</p> | ||
| 105 | </section> | ||
| 106 | |||
| 107 | |||
| 108 | <section> | ||
| 109 | <h2>SHA-1 (Secure Hash Algorithm 1)</h2> | ||
| 110 | <table> | ||
| 111 | <tbody> | ||
| 112 | <tr> | ||
| 113 | <td>Designers</td> | ||
| 114 | <td>NSA</td> | ||
| 115 | </tr> | ||
| 116 | <tr> | ||
| 117 | <td>Published</td> | ||
| 118 | <td>1995</td> | ||
| 119 | </tr> | ||
| 120 | <tr> | ||
| 121 | <td>Digest size</td> | ||
| 122 | <td>160 bits (20 bytes)</td> | ||
| 123 | </tr> | ||
| 124 | <tr> | ||
| 125 | <td>Block size</td> | ||
| 126 | <td>512 bits</td> | ||
| 127 | </tr> | ||
| 128 | <tr> | ||
| 129 | <td>Broken?</td> | ||
| 130 | <td>Yes</td> | ||
| 131 | </tr> | ||
| 132 | </tbody> | ||
| 133 | </table> | ||
| 134 | <p>Still in use. Revision control systems such as <em>Git</em>, <em>Mercurial</em>, and <em>Monotone</em> use <em>SHA-1</em>, not for security, but to identify revisions and to ensure that the data has not changed due to accidental corruption.</p> | ||
| 135 | </section> | ||
| 136 | |||
| 137 | |||
| 138 | <section> | ||
| 139 | <h2>SHA-2</h2> | ||
| 140 | <table> | ||
| 141 | <tbody> | ||
| 142 | <tr> | ||
| 143 | <td>Designers</td> | ||
| 144 | <td>NSA</td> | ||
| 145 | </tr> | ||
| 146 | <tr> | ||
| 147 | <td>Published</td> | ||
| 148 | <td>2001</td> | ||
| 149 | </tr> | ||
| 150 | <tr> | ||
| 151 | <td>Digest sizes</td> | ||
| 152 | <td>224, 256, 384 or 512 bits</td> | ||
| 153 | </tr> | ||
| 154 | <tr> | ||
| 155 | <td>Block sizes</td> | ||
| 156 | <td>256 bits (SHA-224 and SHA-256) or 512 bits</td> | ||
| 157 | </tr> | ||
| 158 | <tr> | ||
| 159 | <td>Broken?</td> | ||
| 160 | <td>No</td> | ||
| 161 | </tr> | ||
| 162 | </tbody> | ||
| 163 | </table> | ||
| 164 | </section> | ||
| 165 | |||
| 166 | |||
| 167 | <section> | ||
| 168 | <h2>SHA-3</h2> | ||
| 169 | <table> | ||
| 170 | <tbody> | ||
| 171 | <tr> | ||
| 172 | <td>Designers</td> | ||
| 173 | <td>Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles van Assche</td> | ||
| 174 | </tr> | ||
| 175 | <tr> | ||
| 176 | <td>Published</td> | ||
| 177 | <td>2016</td> | ||
| 178 | </tr> | ||
| 179 | <tr> | ||
| 180 | <td>Digest size</td> | ||
| 181 | <td>arbitrary</td> | ||
| 182 | </tr> | ||
| 183 | <tr> | ||
| 184 | <td>Block size</td> | ||
| 185 | <td>variable</td> | ||
| 186 | </tr> | ||
| 187 | <tr> | ||
| 188 | <td>Broken?</td> | ||
| 189 | <td>No</td> | ||
| 190 | </tr> | ||
| 191 | </tbody> | ||
| 192 | </table> | ||
| 193 | <p>Based on Keccak - winner of the NIST hash function competition after some controversial adjustments. Very fast and flexible.</p> | ||
| 194 | </section> | ||
| 195 | |||
| 196 | |||
| 197 | <section> | ||
| 198 | <h2>BLAKE2</h2> | ||
| 199 | <table> | ||
| 200 | <tbody> | ||
| 201 | <tr> | ||
| 202 | <td>Designers</td> | ||
| 203 | <td>Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn and Christian Winnerlein</td> | ||
| 204 | </tr> | ||
| 205 | <tr> | ||
| 206 | <td>Published</td> | ||
| 207 | <td>2008 (BLAKE)</td> | ||
| 208 | </tr> | ||
| 209 | <tr> | ||
| 210 | <td>Digest size</td> | ||
| 211 | <td>up to 64 bytes (BLAKE2b), up to 32 bytes (BLAKE2s)</td> | ||
| 212 | </tr> | ||
| 213 | <tr> | ||
| 214 | <td>Block size</td> | ||
| 215 | <td>variable (stream)</td> | ||
| 216 | </tr> | ||
| 217 | <tr> | ||
| 218 | <td>Broken?</td> | ||
| 219 | <td>No</td> | ||
| 220 | </tr> | ||
| 221 | </tbody> | ||
| 222 | </table> | ||
| 223 | <p>BLAKE2 is based on Daniel J. Bernstein's ChaCha stream cipher and is extremely fast. BLAKE2b and BLAKE2s are specified in RFC 7693.</p> | ||
| 224 | </section> | ||
| 225 | |||
| 226 | |||
| 227 | <section> | ||
| 228 | <h2>Application of cryptographic hash functions</h2> | ||
| 229 | <p>Cryptographic hash functions are used for many different things in cryptographic systems and protocols. Few examples:</p> | ||
| 230 | <ul> | ||
| 231 | <li>can be used directly (f.i. sha256sum - part of GNU coreutils)</li> | ||
| 232 | <li>message authentication code (MAC)</li> | ||
| 233 | <li>password hashing / key derivation</li> | ||
| 234 | <li>proof of work</li> | ||
| 235 | </ul> | ||
| 236 | </section> | ||
| 237 | |||
| 238 | |||
| 239 | <section> | ||
| 240 | <h2>HMAC</h2> | ||
| 241 | <p>HMAC (hash-based message authentication code) is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key. It may be used to simultaneously verify both the data integrity and authenticity of a message. An HMAC is a type of keyed hash function that can also be used in a key derivation scheme or a key stretching scheme.</p> | ||
| 242 | <p>HMAC can provide authentication using a shared secret instead of using digital signatures with asymmetric cryptography. It trades off the need for a complex public key infrastructure by delegating the key exchange to the communicating parties, who are responsible for establishing and using a trusted channel to agree on the key prior to communication.</p> | ||
| 243 | <img src="images/cryptographic_primitives/hmac.svg"></img> | ||
| 244 | <p><em>XOR</em> (eXclusive OR) - is a logical operator</p> | ||
| 245 | <p>With two inputs, XOR is true if and only if the inputs differ (one is true, one is false)</p> | ||
| 246 | </section> | ||
| 247 | |||
| 248 | |||
| 249 | <section> | ||
| 250 | <h2>PBKDF2</h2> | ||
| 251 | <p>PBKDF2 (Password-Based Key Derivation Function 2) is a key derivation function with a sliding computational cost, used to reduce vulnerability to brute-force attacks.</p> | ||
| 252 | <p>PBKDF2 applies a pseudorandom function, such as <em>HMAC</em>, to the input password or passphrase along with a <em>salt</em> value and repeats the process many times to produce a derived key, which can then be used as a cryptographic key in subsequent operations. The added computational work makes password cracking much more difficult, and is known as <em>key stretching</em>.</p> | ||
| 253 | <h4>Demo</h4> | ||
| 254 | </section> | ||
| 255 | |||
| 256 | |||
| 257 | <section> | ||
| 258 | <h2>Proof of work</h2> | ||
| 259 | <h4>Demo</h4> | ||
| 260 | </section> | ||
| 261 | |||
| 262 | |||
| 263 | <section> | ||
| 264 | <h3>Cryptographically secure random generators</h3> | ||
| 265 | <p>Most cryptographic applications require random numbers for: generating keys, initialization vectors, nonces (arbitrary numbers that can be used just once), salts, tokens etc, etc.</p> | ||
| 266 | <p>The "quality" of the randomness required for these applications varies. For example, creating a <em>nonce</em> in some protocols needs only uniqueness. On the other hand, the generation of a master key requires a higher quality, such as more entropy.</p> | ||
| 267 | <p>Entropy is obtained from a high-quality source, generally the operating system's randomness API.</p> | ||
| 268 | <p>In practical situations, numbers are needed with more randomness than the available entropy can provide. Also, the processes to extract randomness from a running system are slow in actual practice. In such instances, a cryptographically secure pseudorandom number generator (CSPRNG) can sometimes be used. A CSPRNG can "stretch" the available entropy over more bits.</p> | ||
| 269 | </section> | ||
| 270 | |||
| 271 | |||
| 272 | <section> | ||
| 273 | <h3>Cryptographically secure random generators (cont...)</h3> | ||
| 274 | <p>CSPRNG must</p> | ||
| 275 | <ul> | ||
| 276 | <li>pass statistical randomness tests - f.i. given the first k bits of a random sequence, there is no polynomial-time algorithm that can predict the (k+1)th bit with probability of success non-negligibly better than 50%</li> | ||
| 277 | <li>be attack resistant - f.i. in the event that part or all of its state has been revealed it should be impossible to reconstruct the stream of random numbers prior to the revelation</li> | ||
| 278 | </ul> | ||
| 279 | <p>"Practical" CSPRNG schemes not only include an CSPRNG algorithm, but also a way to initialize ("seed") it while keeping the seed secret.</p> | ||
| 280 | </section> | ||
| 281 | |||
| 282 | |||
| 283 | <section> | ||
| 284 | <h3>Symmetric-key algorithms / symmetric ciphers</h3> | ||
| 285 | <p>Symmetric ciphers use the same cryptographic keys for both the encryption of <em>plaintext</em> and the decryption of <em>ciphertext</em>.</p> | ||
| 286 | <p>“Anyone, from the most clueless amateur to the best cryptographer, can create an algorithm that he himself can’t break. It’s not even hard. What is hard is creating an algorithm that no one else can break, even after years of analysis. And the only way to prove that is to subject the algorithm to years of analysis by the best cryptographers around.” - Bruce Schneier</p> | ||
| 287 | <p>A "perfect" cipher - the one-time pad has been known since 1882, but is not practically applicable in modern systems:</p> | ||
| 288 | <ul> | ||
| 289 | <li>generate random stream (pad) with length = len(plaintext)</li> | ||
| 290 | <li>ciphertext = plaintext XOR pad</li> | ||
| 291 | </ul> | ||
| 292 | |||
| 293 | <p>There two types of modern ciphers:</p> | ||
| 294 | <ul> | ||
| 295 | <li>block ciphers - operate on fixed-length groups of bits, called blocks (padding may be used to the remaining bits)</li> | ||
| 296 | <li>stream ciphers - plaintext digits are combined (XORed) with a pseudorandom cipher digit stream (keystream).</li> | ||
| 297 | </ul> | ||
| 298 | </section> | ||
| 299 | |||
| 300 | |||
| 301 | <section> | ||
| 302 | <h2>DES (Data Encryption Standard)</h2> | ||
| 303 | <table> | ||
| 304 | <tbody> | ||
| 305 | <tr> | ||
| 306 | <td>Designer</td> | ||
| 307 | <td>IBM</td> | ||
| 308 | </tr> | ||
| 309 | <tr> | ||
| 310 | <td>Published</td> | ||
| 311 | <td>1975</td> | ||
| 312 | </tr> | ||
| 313 | <tr> | ||
| 314 | <td>Key size</td> | ||
| 315 | <td>56 bits</td> | ||
| 316 | </tr> | ||
| 317 | <tr> | ||
| 318 | <td>Block size</td> | ||
| 319 | <td>64 bits</td> | ||
| 320 | </tr> | ||
| 321 | </tbody> | ||
| 322 | </table> | ||
| 323 | <p>Not used anymore. 3DES was published in 1981 (with keysize of 112 bits or 168 bits).</p> | ||
| 324 | </section> | ||
| 325 | |||
| 326 | |||
| 327 | <section> | ||
| 328 | <h2>Blowfish</h2> | ||
| 329 | <table> | ||
| 330 | <tbody> | ||
| 331 | <tr> | ||
| 332 | <td>Designer</td> | ||
| 333 | <td>Bruce Schneier</td> | ||
| 334 | </tr> | ||
| 335 | <tr> | ||
| 336 | <td>Published</td> | ||
| 337 | <td>1993</td> | ||
| 338 | </tr> | ||
| 339 | <tr> | ||
| 340 | <td>Key size</td> | ||
| 341 | <td>32-448 bits</td> | ||
| 342 | </tr> | ||
| 343 | <tr> | ||
| 344 | <td>Block size</td> | ||
| 345 | <td>64 bits</td> | ||
| 346 | </tr> | ||
| 347 | </tbody> | ||
| 348 | </table> | ||
| 349 | <p>Schneier has stated that "Blowfish is unpatented, and will remain so in all countries. The algorithm is hereby placed in the public domain, and can be freely used by anyone.". Still in use in legacy applications and notably in the <em>bcrypt</em> password hashing function.</p> | ||
| 350 | </section> | ||
| 351 | |||
| 352 | |||
| 353 | <section> | ||
| 354 | <h2>AES (Advanced Encryption Standard - Rijndael)</h2> | ||
| 355 | <table> | ||
| 356 | <tbody> | ||
| 357 | <tr> | ||
| 358 | <td>Designer</td> | ||
| 359 | <td>Joan Daemen, Vincent Rijmen</td> | ||
| 360 | </tr> | ||
| 361 | <tr> | ||
| 362 | <td>Published</td> | ||
| 363 | <td>1998</td> | ||
| 364 | </tr> | ||
| 365 | <tr> | ||
| 366 | <td>Key size</td> | ||
| 367 | <td>128 bits, 192 bits or 256 bits</td> | ||
| 368 | </tr> | ||
| 369 | <tr> | ||
| 370 | <td>Block size</td> | ||
| 371 | <td>128 bits</td> | ||
| 372 | </tr> | ||
| 373 | </tbody> | ||
| 374 | </table> | ||
| 375 | <p>Rijndael was thew winner of the NIST AES selection process. Currently the most widely adopted block cipher (both in hardware and software).</p> | ||
| 376 | </section> | ||
| 377 | |||
| 378 | |||
| 379 | <section> | ||
| 380 | <h3>Mode of operation for block ciphers</h3> | ||
| 381 | <p>A block cipher by itself is only suitable for the secure cryptographic transformation (encryption or decryption) of one fixed-length group of bits called a block. A mode of operation describes how to repeatedly apply a cipher's single-block operation to securely transform amounts of data larger than a block.</p> | ||
| 382 | <img src="images/cryptographic_primitives/modes_of_operation.png" style="width: 30vw;"></img> | ||
| 383 | </section> | ||
| 384 | |||
| 385 | |||
| 386 | <section> | ||
| 387 | <h3>Galois/counter (GCM)</h3> | ||
| 388 | <p>The GCM algorithm provides both data authenticity (integrity) and confidentiality and belongs to the class of authenticated encryption with associated data (AEAD) methods. This means that as input it takes a key <em>K</em>, some plaintext <em>P</em>, and some associated data <em>AD</em>; it then encrypts the plaintext using the key to produce ciphertext <em>C</em>, and computes an authentication tag <em>T</em> from the ciphertext and the associated data (which remains unencrypted). A recipient with knowledge of <em>K</em>, upon reception of <em>AD</em>, <em>C</em> and <em>T</em>, can decrypt the ciphertext to recover the plaintext <em>P</em> and can check the tag <em>T</em> to ensure that neither ciphertext nor associated data were tampered with.</p> | ||
| 389 | <img src="images/cryptographic_primitives/GCM.svg" style="width: 12vw;"></img> | ||
| 390 | </section> | ||
| 391 | |||
| 392 | |||
| 393 | <section> | ||
| 394 | <h2>Stream ciphers</h2> | ||
| 395 | <p> Stream ciphers typically execute at a higher speed than block ciphers and have lower hardware complexity. However, stream ciphers can be susceptible to security breaches, for example, when the same starting state (seed) is used twice.</p> | ||
| 396 | <p>Essentially they behave as pseudorandom functions where they key is / is part of the "seed".</p> | ||
| 397 | <br/> | ||
| 398 | <h4>ChaCha</h4> | ||
| 399 | <table> | ||
| 400 | <tbody> | ||
| 401 | <tr> | ||
| 402 | <td>Designer</td> | ||
| 403 | <td>Daniel J. Bernstein (djb)</td> | ||
| 404 | </tr> | ||
| 405 | <tr> | ||
| 406 | <td>Published</td> | ||
| 407 | <td>2008</td> | ||
| 408 | </tr> | ||
| 409 | <tr> | ||
| 410 | <td>Key size</td> | ||
| 411 | <td>128 bits or 256 bits</td> | ||
| 412 | </tr> | ||
| 413 | </tbody> | ||
| 414 | </table> | ||
| 415 | <br/> | ||
| 416 | <h5>ChaCha20-Poly1305</h5> | ||
| 417 | <p><em>ChaCha20-Poly1305</em> is an <em>AEAD</em> algorithm, that combines the <em>ChaCha20</em> stream cipher with the <em>Poly1305</em> message authentication code. It has fast software performance, and without hardware acceleration, is usually faster than <em>AES-GCM</em>.</p> | ||
| 418 | </section> | ||
| 419 | |||
| 420 | |||
| 421 | <section> | ||
| 422 | <h3>Public-key cryptography / asymmetric cryptography</h3> | ||
| 423 | <p>Asymmetric cryptography makes use pairs of related keys. Each key pair consists of a <em>public key</em> and a corresponding <em>private key</em>. Key pairs are generated with cryptographic algorithms based on mathematical problems termed <em>one-way functions</em>. Security of public-key cryptography depends on keeping the private key secret, while the public key can be openly distributed without compromising security.</p> | ||
| 424 | <p>Usually we use public key cryptography for:</p> | ||
| 425 | <ul> | ||
| 426 | <li>public key encryption - a message is encrypted with the intended recipient's public key. For properly chosen and used algorithms, messages cannot in practice be decrypted by anyone who does not possess the matching private key, who is thus presumed to be the owner of that key and so the person associated with the public key. This can be used to ensure confidentiality of a message.</li> | ||
| 427 | <li>digital signatures - a message is signed with the sender's private key and can be verified by anyone who has access to the sender's public key. This verification proves that the sender had access to the private key, and therefore is very likely to be the person associated with the public key. It also proves that the signature was prepared for that exact message, since a signature that passes verification with the public key on one message will not pass verification with the public key on other messages.</li> | ||
| 428 | </ul> | ||
| 429 | </section> | ||
| 430 | |||
| 431 | |||
| 432 | <section> | ||
| 433 | <h3>RSA</h3> | ||
| 434 | <table> | ||
| 435 | <tbody> | ||
| 436 | <tr> | ||
| 437 | <td>Designers</td> | ||
| 438 | <td>Ron Rivest, Adi Shamir and Leonard Adleman</td> | ||
| 439 | </tr> | ||
| 440 | <tr> | ||
| 441 | <td>Published</td> | ||
| 442 | <td>1977, patented until 2000 :(</td> | ||
| 443 | </tr> | ||
| 444 | </tbody> | ||
| 445 | </table> | ||
| 446 | <br/> | ||
| 447 | <h4>Using RSA</h4> | ||
| 448 | <p>The security of RSA relies on the practical difficulty of factoring the product of two large prime numbers, the "factoring problem". Still the most widely used public key system. A key size of 2048 or 4096 bits should be used. A very good CSPRNG is needed.</p> | ||
| 449 | <p>In modern cryptographic systems and protocols (like TLS >= 1.2) RSA is only used for verifying that the client is initiating session with the "right" server. Encryption / decryption is performed using common negotiated key and symmetric ciphers.</p> | ||
| 450 | <p><em>Forward secrecy</em> is a desired feature of specific key-agreement protocols that gives assurances that session keys will not be compromised even if long-term secrets used in the session key exchange are compromised, limiting damage. For HTTPS, the long-term secret is typically the private key of the server.</p> | ||
| 451 | </section> | ||
| 452 | |||
| 453 | |||
| 454 | <section> | ||
| 455 | <h2>Post-quantum cryptography</h2> | ||
| 456 | <p>Post-quantum cryptography (PQC), sometimes referred to as quantum-proof, quantum-safe, or quantum-resistant, is the development of cryptographic algorithms (usually public-key algorithms) that are thought to be secure against a cryptanalytic attack by a quantum computer. Most widely-used public-key algorithms rely on the difficulty of one of three mathematical problems: the integer factorization problem, the discrete logarithm problem or the elliptic-curve discrete logarithm problem. All of these problems could be easily solved on a sufficiently powerful quantum computer running Shor's algorithm or even faster and less demanding (in terms of the number of qubits required) alternatives.</p> | ||
| 457 | </section> | ||
| 458 | |||
| 459 | |||
| 460 | <section> | ||
| 461 | <h1>Q & A</h1> | ||
| 462 | </section> | ||
| 463 | |||
| 464 | |||
| 465 | </div> | ||
| 466 | </div> | ||
| 467 | |||
| 468 | <script src="dist/reveal.js"></script> | ||
| 469 | <script src="dist/plugin/zoom.js"></script> | ||
| 470 | <script src="dist/plugin/notes.js"></script> | ||
| 471 | <script src="dist/plugin/search.js"></script> | ||
| 472 | <script src="dist/plugin/markdown.js"></script> | ||
| 473 | <script src="dist/plugin/highlight.js"></script> | ||
| 474 | <script> | ||
| 475 | // Also available as an ES module, see: https://revealjs.com/initialization/ | ||
| 476 | // import Reveal from 'reveal.js'; | ||
| 477 | // import RevealZoom from 'reveal.js/plugin/zoom'; | ||
| 478 | // import RevealNotes from 'reveal.js/plugin/notes'; | ||
| 479 | // import RevealSearch from 'reveal.js/plugin/search'; | ||
| 480 | // import RevealMarkdown from 'reveal.js/plugin/markdown'; | ||
| 481 | // import RevealHighlight from 'reveal.js/plugin/highlight'; | ||
| 482 | |||
| 483 | Reveal.initialize({ | ||
| 484 | controls: true, | ||
| 485 | progress: true, | ||
| 486 | center: true, | ||
| 487 | hash: true, | ||
| 488 | |||
| 489 | // Learn about plugins: https://revealjs.com/plugins/ | ||
| 490 | plugins: [RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight], | ||
| 491 | }); | ||
| 492 | </script> | ||
| 493 | </body> | ||
| 494 | </html> | ||
