A Gentle Introduction to Lattice-Based Cryptography [pdf]

(cryptography101.ca)

168 points | by jayhoon 3 days ago

9 comments

  • age123456gpg 12 hours ago
    I've implemented ML-KEM by the spec as an exercise recently (https://github.com/AlexanderYastrebov/mlkem) and here are related links that helped me understand the math:

    * [Enough Polynomials and Linear Algebra to Implement Kyber](https://words.filippo.io/kyber-math/)

    * [Basic Lattice Cryptography. The concepts behind Kyber (ML-KEM) and Dilithium (ML-DSA)](https://eprint.iacr.org/2024/1287.pdf)

    * [A Complete Beginner Guide to the Number Theoretic Transform (NTT)](https://eprint.iacr.org/2024/585.pdf)

    • Retr0id 12 hours ago
      I did the same. Something that helped me get my head around it was realising that NTT is mostly a performance optimization, a bit like montgomery form in RSA. You can conceptually implement ML-KEM without it, it'll just be slower (it also won't be interoperable because the wire format involves the NTT'd form - I think, it's been a while since I looked at it in detail).
  • superjan 18 hours ago
    A nice (short!) video on this topic is this one from Chalk Talk: https://youtu.be/QDdOoYdb748?is=vCFGroHUPwZP7Dqm
  • vmilner 12 hours ago
    It's a superficial point but this relatively newer style (La)TeX layout makes me much more keen to read documents for some reason.
    • SauntSolaire 11 hours ago
      What's with the huge border whitespace?
  • allthetime 11 hours ago
    So let’s say this is wildly over my head… what would be some good places to start reading to gain a minimal foundation to engage with this?
    • ArcHound 10 hours ago
      Simply put, you'll need algebra, linear algebra, number theory. So a lot of math with various degrees of depth.
      • allthetime 7 hours ago
        Do you have any recommendations for effective self-learning paths? I have murky old foundations in all three fields (took first year linear algebra and a variety of logic courses) so am not starting from nothing but the few times I’ve tried to jump back in I always get a bit bogged down and can’t keep with it.
  • ArcHound 20 hours ago
    Oh this brings me back to my uni days. I suppose that since this is the basis of post-quantum crypto it is a good time to learn this.

    Seems to me that these lattices and error-correcting codes are very close to each other, but for some reason they are discussed separately.

    I'd wager that there will be some reductions between those problems - maybe I could dig more around that.

  • tug2024 50 minutes ago
    [dead]
  • sspoisk 7 hours ago
    [flagged]
  • falcons-edge 13 hours ago
    [flagged]
  • cykros 17 hours ago
    Good stuff to know, just in case the life extension tech explodes and we're all alive by the time cryptographically relevant quantum computers actually hit the scene.
    • Retr0id 17 hours ago
      Lattice-based cryptography exists in the present (Both Chrome and Firefox support X25519MLKEM768 hybrid key agreement, by default)
      • GTP 14 hours ago
        Yes, but it exists because it was deemed better to be cautious and implement PQC despite the uncertainty and different points of view around the time scale to have cryptographically relevant quantum computers (or, from a different point of view, precisely due to the uncertainties). Their comment was in the wrong tone, but the doubts are there. BTW, PQC can be interesting to learn regardless of the discussion around quantum computers.
        • Retr0id 14 hours ago
          "will we have a CRQC soon" is the subject of much debate but "will we have a CRQC ever" is pretty uncontroversially a possibility, and so it is worth defending against harvest-now-decrypt-later attacks in the present - which is why X25519MLKEM768 is widely deployed already.
          • GTP 7 hours ago
            However, the time needed to get one plays a crucial role. Governments need to protect some piece of data for a very long time, but common people are generally fine with keeping something secret for their lives' duration. I don't care if someone decrypts my laptop's SSD after I'm dead.
      • Razengan 13 hours ago
    • Jach 9 hours ago
      If quantum computers start breaking crypto within a few years, don't say you weren't sufficiently warned.