Unofficial Hacker News client - receive Push Notifications on replies.

Post-quantum encryption adoption (opens external site)

423 points by mfiguiere 1 day ago | radar.cloudflare.com | 238 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (15)

  1. Of course there is - you’re trading off efficiency, particularly at a very important part of the connection establishment. Hybrid PQC signatures are large and require extra packets to be sent - they don’t fit into the initial packet connection which is an important optimization that was worked on for a very long time (it requires extra round trips which means latency).
    Replies (3)
    1. Most PQ cryptosystems are already famous for having huge key sizes, the overhead of keeping the conventional elliptic curve crypto for key exchange or signature is nothing in comparison. But sometimes, yes, omitting the elliptic curve crypto can save you a packet when the PQC scheme barely fits.
      Replies (3)
      1. I also think the tradeoff is obvious too.

        A slight increase in latency when that’s already fairly irrelevant on the internet (seriously i’m loading a 10mb page to write text already!) vs a risk that you lose crypto if the single alg you used is broken.

        I’m taking the extra latency everytime.

        Replies (1)
        1. What you’re describing if very different than adding latency to the literal connection establishment. The former is solvable through faster internet and goes away as a problem or you can compress or otherwise optimize the size. The latter is a physics light speed problem that’s not solvable other than removing round trips and happens on every connection so you can’t even parallelize your way out of trouble and compression isn’t relevant.

          It’s a take that suggests you don’t understand the shape of the problem and why people are concerned about it and conflating it with other concerns that aren’t as relevant.

      2. You misunderstood my point. It wasn’t that we should keep just PQC but instead drop PQC and keep classical. If the announcement is as expected that PQC is fundamentally flawed, then it adds nothing while having a huge cost.
        Replies (1)
        1. You said "Hybrid PQC signatures are large and require extra packets to be sent", perhaps you should have said "PQC signatures are large and require extra packets to be sent".
          Replies (1)
          1. Sure, but you can also strongman my statement and assume that if I'm making a comment like this, I probably understand which part is contributing to the size.
      3. Huh. I can't verify off-hand what ChatGPT is saying, but ML-KEM-768 public keys are just barely small enough that, presuming the TLS record doesn't already overflow, adding the 32 bytes for the ECDHE key in the hybrid scheme might push the TLS record + TCP header + IPv4 header a few bytes over the 1280 minimum IPv6 MTU, and even more likely if actually using IPv6.

        So I guess it may actually be a thing some people might have to consider to some extent, at least as a curious hypothetical. I started off this reply pushing back against your hedge as I assumed ML-KEX already pushed messages beyond 1500 bytes, but the relevant TLS record framing overhead isn't as large as I thought. If we just settled on ML-KEM-1024 then all would be well again.

    2. I don't understand what you're referring to with your "Of course there is"? I wonder if my previous message came came across as suggesting that there were no downsides...?
      Replies (1)
      1. I thought that was your point. Apologies.
    3. Avoiding extra round trips is easy with a proper transport protocol. For instance, QUIC has no fundamental difficulty handling multi-packet handshakes in a burst (though implementations may leave something to be desired on this front).

      Relying on fitting the entire handshake in a single packet is just indicative of obsolete design.

      Replies (1)
      1. Extra round trips are a physics problem - you can’t fight physics and the speed of light.

        1. The handshake doesn’t fit into a single IP packet always requiring fragmentation (even if you use jumbo frames middleware will fragment it).

        2. Even with rfc6928, the handshake with a multi-cert PQC chain exceeds the initial window and requires an extra full RTT before it completes. The initial congestion window is existed and there’s nothing to do there aside from trying to increase it which is challenging for a lot of reasons. So TCP is negatively impacted by a lot and TCP is generally preferred within the cloud.

        3. HRR which tries to bypass the size instead can fail resulting in an additional RTT (now we’re at 2)

        4. QUIC isn’t immune to this and the size of PQC exceeds the amount of data it can use to establish the connection. Indeed in some ways it can be even more susceptible because now even clienthello doesn’t fit into a single packet meaning there’s a greater opportunity for issuer loss to hit the initial connection attempt.

        So you’re incorrect this doesn’t impact QUIC and your indirect this is a result of an obsolete design - there are very very good reasons to want the initial connection to fit into a single packet. Indeed, even if you just increase the size of that initial window to try to keep everything into 1 RTT you’re now amplifying the memory requirement for a connection attempt by 10x. It’s nothing when you only handle a few connections, but that’s because you’re not considering what happens to a heavily loaded server or a server having to manage a DDOS attack.

        My problem is that PQC is a non trivial negative impact on everyone if QCs aren’t ever going to be able to crack classical keys. Doubly so if PQC algorithms are just straight up weak to classical methods.

        Replies (1)
        1. I should have said antiquated instead of obsolete, but yes those are all just design weaknesses (except for minimum memory requirement per connection attempt).

          1. No need for fragmentation since you can decode multiple packets into a blob, even TCP already handles this.

          2. The very notion of a initial congestion window is a fundamental design weakness.

          What actually matters is the initial receiver window (IRW) and the initial path bandwidth (IPB). The initial receiver window, i.e. how much buffering the receiver leaves aside for a initial connection attempt, should be tuned to be the amount of data it desires before needing a round-trip. This is independent of connection propertys and is trivially tuned on a per-endpoint basis to the desired amount without any impact on the network path.

          The initial path bandwidth is connection-dependent and is the zero-feedback initial transmission rate. Converting from a initial congestion window to initial path bandwidth is just dividing the congestion window by the latency. For a 100 ms latency connection you are getting a initial path bandwidth of ~15 KB/s to ~150 KB/s (for 1 and 10 packets, respectively). For 1 ms latency you are getting ~1.5 MB/s to ~15 MB/s. This helps illustrate why the very notion of a initial congestion window is absurd because it generates bandwidth that can easily fluctuate across multiple orders of magnitude in response to the other critical connection parameter of connection latency.

          Instead, we should be using initial path bandwidth with packet pacing which ensures both uniform bandwidth and buffer utilization, but also ensures a connection-independent fixed time to fill the initial receiver window, M = IRW / IPB. Your default case handshake time then becomes M + 1-RTT, but can be shortened or lengthened if M is larger than 1-RTT and you get feedback causing you to change your transmission rate. Given RFC 6928 and a reasonable assumption as to the average-case latency to a peer we can compute a general recommendation for the IPB which would globally look similar to the current state of affairs using a initial congestion window. I would propose 100 ms as a good assumption and thus 150 KB/s, but that is up for debate. This would ensure a fixed overhead for a PQC certificate handshake at ~10-100 ms plus the required single RTT.

          3. I do not know what you are talking about, so no comment.

          4. QUIC already separates the per-stream window from the congestion control algorithm and thus can be configured in the manner I described above. I believe nobody does it that way in practice because they are wedded to the antiquated ways, but is supports it quite easily. This allows configuring the handshake stream window to be large enough just on the endpoint and thus not exceeding the amount of data you can use to establish the connection. As for IPB handling, the BBR congestion control algorithm is already designed to estimate the network path bandwidth; IPB just becomes the initial value for that parameter.

          You are correct that there is a greater opportunity for loss, but that is fundamental to any scheme that transmits more data. However, the initial handshake is not privileged from a transport perspective under a proper design, so all you are actually saying is that you previously sent M bytes in a connection, but now you send M + N bytes in a connection and that takes more time and incurs more potential for loss which is true, but not special. The relevant analysis for that question is how many bytes are sent over the life of the average connection and how does that compare to the amount of extra bytes needed for a PQC handshake and does that materially impact the amount of total bytes transmitted over the life of that connection.

          5. So yes, this is mostly just due to design weaknesses; there would be no RTT-dependence with a proper design. The actual downsides are that you need more memory for the initial connection attempt and you are sending more bytes. These are reasonable concerns for small connections, but small connections are not responsible for most network traffic or network bottlenecking. There is impact, but with proper transport protocol design the global impact could be made relatively minor.

          Replies (1)
          1. HRR is heloretryrequest - it tries to send a cheap ClientHello that fits in a single packet by either sending classical X25519 (uncommon) or the PQC share without the classical (what browsers do today). In the former, servers that prefer PQC require a new round trip. In the latter endpoints that only support classical require an extra round trip. Since PQC isn't deployed everywhere but the browsers have changed the default, the internet has actually gotten slower across the board.

            I think you're overly optimistic in presuming a client knows the one-way latency to the endpoint or vice-versa. I don't know anyone doing that and whatever value you choose is going to be wrong unless you bring to bear additional side channel information to try to minimize the error rate.

            > so all you are actually saying is that you previously sent M bytes in a connection, but now you send M + N bytes in a connection and that takes more time and incurs more potential for loss which is true, but not special

            Actually, initial connection is more privileged. It reserves resources on the server that are needed to move forward with the connection. QUIC's normal data stream is very resilient to packet loss where unimpacted ordered streams can continue transmission. That isn't true for the connection establishment.

            All your responses also completely disregard the memory impact which is the second half the size of the connection packet is relevant. You don't need any of the complexity you specified. You can just raise the IRW without any of what you just mentioned. The problem is that I can exhaust the RAM of your server with orders of magnitude fewer connections now.

            Replies (1)
            1. The client does not need to know the one-way latency to the endpoint. In antiquated congestion control algorithms, the point of the congestion window is to tune bandwidth usage. The initial congestion window is thus intended to be a safe, initial value of bandwidth usage. However, as I pointed out, the initial congestion window does not actually correspond to a initial bandwidth usage, instead being highly dependent on one-way latency to the endpoint. However, the fact that it is "safe" indicates that the "safe" initial value of bandwidth usage is within that massive range. Choosing a initial packet bandwidth instead of initial congestion window removes the one-way latency dependency of the initial bandwidth usage. However, that means we need to calculate what "safe" initial value to use. As we already established that the initial congestion window is broadly "safe", but the extremes for low latency environments are obviously not "safe", we should choose a modestly conservative value within that range as the initial packet bandwidth for the average case which should result in global network utilization looking nearly identical to how it currently looks. Thus a choice of 100 ms as the "default" latency for a 10-packet window resulting in a 150 KB/s "safe" initial packet bandwidth. Obviously, choice of parameter can be changed, maybe 300 ms or 30 ms could be a more reasonable estimate, but it is unlikely to be too far off from that estimate as a 1 s "default" latency seems much too high for anything within normal.

              The initial connection window should not be any more privileged than any other choice of initial receiver window. In QUIC this is largely true as it is largely managed as just another stream subject to regular congestion control, resends, and reordering.

              Any initial receiver window is a decision as to the amount of memory resources you will accept to handle connection establishment and any initial data pipelined relative to the connection establishment you wish to receive. You should probably tune this to fit your average small-connection use case on your endpoint which would enable you to service a entire request, including handshake, in 1 RTT and allow resource reclamation in 1.5 RTT.

              > The problem is that I can exhaust the RAM of your server with orders of magnitude fewer connections now.

              So? It is not like you need to reserve the entire initial receiver window worth of memory upfront. You can just allocate the amount of resources directly in proportion to the amount of data received. With such a scheme there is no way for them to amplify their memory usage or bandwidth usage. So, a attacker would still need to send the same amount of data in a DDoS with the only advantage being they need fewer connections so I guess you can take someone down with 1/10th the number of IP addresses? Is that the concern?