6 ms·
Signal: The Pqxdh Key Agreement Protocol
- piuvas 3y agoloving it!!!
- ignoramous 3y agoCloudflare did a (phenomenal) series on pq safe (public key) cryptography; here are some posts: - NIST pq candidates: https://blog.cloudflare.com/towards-post-quantum-cryptography-in-tls/ https://blog.cloudflare.com/towards-post-quantum-cryptograph... - Kyber in TLS: https://blog.cloudflare.com/post-quantum-for-all/ https://blog.cloudflare.com/post-quantum-for-all/ - Other candidates for TLS: https://blog.cloudflare.com/the-tls-post-quantum-experiment/ https://blog.cloudflare.com/the-tls-post-quantum-experiment/ - For cert sigs (as opposed to kex): https://blog.cloudflare.com/sizing-up-post-quantum-signatures/ https://blog.cloudflare.com/sizing-up-post-quantum-signature... If you squint enough, what Signal's doing is similar to Kyber in TLS, which takes us back to KEM (like with RSA-OAEP in TLS v1.2 removed from v1.3) for key exchange (kex) with ECDH, in a pq safe way of course.
- drcongo 3y agoThat's really useful, thanks. I barely understood a word of the OP.
- couchand 3y agoThe link is a specification of the protocol, not a tutorial. It is intended to unambiguously state the operations, and requires significant background knowledge to be able to read correctly.
- ignoramous 3y agoI guess if you're not already familiar with the Signal protocol specs, the current documentation might feel a little incomplete. TLDR is, SS (shared secret) derived rom Kyber is mixed in to make the handshake, which outputs SessionKey (SK), pq safe. Note though, offline authentication (of identities) itself isn't pq safe (the authors plan to address this in the near future, however). // CipherText (CT) and SharedSecret (SS) as outputs from Kyber (CT, SS) = Kyber(PostQuantumOneTimePublicPreKeyBob) // DH1, DH2, DH3, and optionally DH4 are Diffie-Hellman-Merkel outputs SecretKey = HKDF-Signal(DH1 || DH2 || DH3 || *SS*) // or StrongSecretKey = HKDF-Signal(DH1 || DH2 || DH3 || DH4 || *SS*) From Signal's PQ-XDH spec (section 4.11): > Kyber hashes Bob's public (pre)key with Alice's random bits to generate the shared secret, making Bob's key contributory, as it is with a Diffie-Hellman key exchange. This does not reduce the dependence on Alice's entropy source but it does limit Alice's ability to control the post-quantum shared secret (SS). Not all KEMs make Bob's key contributory and this is a property to consider when selecting pqkem. The pqkem (Kyber) happens 2 phases (1a & 1b below): ---------- Alice: xx. recv(publickey) 0a. msg <- prng(256bits) 0b. random1, random2 = sha3-512(msg || sha3-256(publickey)) 1a. ct = encrypt(publickey, msg, random2) 1b. ss = shake256(random1 || sha3-256(ct)) xx. send(ct); store(ss) ---------- Bob: yy. recv(ct) 0a. msg' = decrypt(ct, privatekey) 0b. random1', random2' = sha3-512(msg' || sha3-256(publickey)) 1a. ct' = encrypt(publickey, msg', random2') yy. assert(ct == ct') 1b. ss = shake256(random1' || sha3-256(ct)) yy. store(ss) ---------- Both: zz. sk = ss mixed with X3DH zz. AEAD verify sk ---------- Refs: - Crystal-Kyber: https://pq-crystals.org/kyber/data/kyber-specification-round3-20210804.pdf https://pq-crystals.org/kyber/data/kyber-specification-round... (pg 10 - 11; algorithms 8 & 9) - NIST ML-KEM: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.ipd.pdf https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.ipd.pdf (pg 30 - 32; algorithms 16 & 17)
- niel 3y agoPrevious discussion about the blog post announcement, including speculation about timelines: https://news.ycombinator.com/item?id=37571919 https://news.ycombinator.com/item?id=37571919
- baby 3y agothat's interesting, I'm wondering how it compares with the way I drafted it a while back (https://gist.github.com/mimoo/356fd8c32216307d4f4f8b79659637c0 https://gist.github.com/mimoo/356fd8c32216307d4f4f8b79659637... & https://gist.github.com/mimoo/4e90d030b4e927be29459f0ef92e62f5 https://gist.github.com/mimoo/4e90d030b4e927be29459f0ef92e62...)
- rokob 3y agoMy understanding of all DH based encrypted communication protocols is that they rely on some external authentication mechanism to ensure the public key of your counterparty is actually the right person. Is that correct? In other words, if my friend is on the other side of the world and we can only communicate digitally, I need to bootstrap trust in a public key somehow and that is always outside these protocols. This is specifically called out here in section 4.1 and I'm pretty sure this is just a fundamental reality but I wanted to see if anyone had pointers to either a general proof of this or some kind of alternative.
- maxloh 3y agoMaybe you can just video call him to make sure that the key is correct?
- janekm 3y agoIt seems we'll have convincing AI video impersonation before practical quantum cryptanalysis, unfortunately...
- seanhunter 3y agoThis attack has already happened in the wild apparently. I was speaking with a big company CISO a week ago who has just updated the runbook for their helpdesk to specifically introduce steps to mitigate it. Apparently the state of the hack right now is attackers are only generally able to convincingly fake a short section of video (because they will have limited source material of the person they are spoofing) so will call say a helpdesk on zoom with the faked video playing and say they are experiencing connection issues so are turning the video off. From then onwards they just fake audio which is a lot easier. The workaround/mitigation is for the service desk employee to insist at one or more random points in the call that the video has to go back on in order to do various additional authentication steps with video live. If the attacker has only built a short/shallow fake it will be very difficult for them to pass this.
- deleted 3y ago[deleted]
- RunSet 3y agoStill: • relies on a centralized authentication server • bans third party clients • requires a phone number to create an account despite no longer supporting SMS • marketing "Perfect Forward Secrecy" AKA "Forward Secrecy"[0]. I favor Session Private Messenger[1] because it is decentralized and allows third party clients, but Signal enthusiasts warn me that the Session client may, hypothetically, at some future date, integrate a cryptocurrency, as the Signal client already does[2]. [0] https://en.wikipedia.org/wiki/Forward_secrecy https://en.wikipedia.org/wiki/Forward_secrecy [1] https://getsession.org https://getsession.org [2] https://www.stephendiehl.com/blog/signal.html https://www.stephendiehl.com/blog/signal.html
- tcfhgj 3y ago> • marketing "Perfect Forward Secrecy" AKA "Forward Secrecy"[0]. what do you mean by that?
- bawolff 3y agoIndeed this is a bizarre criticism. Why wouldn't signal market a crypto property that is especially important in the context of a messenger app?
- nullc 3y agoBecause lay users misunderstand "Perfect forward secrecy" as "perfect security". It's actively misleading when included in marketing material targeted at a lay audience. OTOH it's also probably read by most as meaningless hyperbole, so the actual damage from being misleading is probably minimal.
- bawolff 3y agoI also hate the name, but its not like signal was the one who came up with the term. I somewhat think most marketing discussions of cryptography are highly misleading, although i suppose its reasonable to want signal to be better.
- 3y ago
- exfil 3y ago"Don't roll your own crypto..."
- josephg 3y agoThis is coming from Signal, who are more than qualified to do this kind of work. You shouldn't roll your own crypto. But crypto experts can do what they want.
- inp 3y agoYes, and moreover, they just add a shared secret in the computation of the initial root key, it cannot be worse in this case.
- zx8080 3y agoWhat could go wrong
- flangola7 3y agoIs that good or bad?
- 7v3x3n3sem9vv 3y agoit's good. think of it like adding a different kind of lock that requires a different key (method) to open up first. at worst it's no less secure than before. If it works as intended it's a huge disincentive for anyone collecting encrypted data with the hopes that a quantum computer may break encryption the "old" method in the future.
- HumanOstrich 3y agoIf this is always true, then where does crypto come from?
- omginternets 3y agoI believe a stork installs the crypto package for your favorite language.
- popol12 3y agoAnd yet I still can't back up or transfer my message history out of my iPhone/to Android. Priorities.
- sneak 3y agoI don't think this is a very common use case. When I switched to Signal, I stopped preserving my message history. I now have 4 week expirations on all chats by default.
- JoshTriplett 3y ago> I don't think this is a very common use case. It's the use case that prevents me from recommending Signal to anyone I know. Some people may not value that data, and may choose to deliberately throw it away; that's their choice. But it shouldn't get lost because of a lost or broken phone.
- sneak 3y agoYou can restore from Android to Android, and from iOS to iOS. I don't think it's very often that people switch phone platforms, given the enormous switching costs engineered by Apple and Google to avoid competition on merit.
- adastra22 3y agoMessage history isn’t saved in backups. Restoring your phone does not preserve message history.
- sneak 3y agoWe are talking about restoring chat history in-app from one phone to another phone. The Signal app allows you to transfer its state (which you correctly note is not stored in backups) from Signal running on one phone to Signal running on a second phone on the same LAN. The serialization (I guess) is different on iOS and Android so it only works between phones running the same OS. A lost or broken phone does indeed render the chat history toast, however.
- inp 3y agoWhat about this "Concatenating Secrets May Be Dangerous"? https://mailarchive.ietf.org/arch/msg/tls/F4SVeL2xbGPaPB2GW_GkBbD_a5M/ https://mailarchive.ietf.org/arch/msg/tls/F4SVeL2xbGPaPB2GW_...
- bawolff 3y ago> "In short: constructions that concatenate secrets are vulnerable when the underlying hash function is not collision-resistant" That's quite a condition.
- KMag 3y agoIf an attacker can perform discrete logs over EC, and a collision attack is found on SHA-3, then an attacker can encapsulate a malicious secret in Kyber, which when hashed with the 3 ECDH values force the session keys for communications with that attacker to be attacker-chosen values. In the context of Signal, this means that in a case where an attacker would know the session keys anyway (being one of the parties to the handshake), if ECDH and SHA-3 are both broken, then the attacker could force the session keys to values of their choice. Certainly there would be cases where this could be a problem, but in the case of Signal, the most disastrous attack I can think of would be maybe some kind of backward MitM attack where two users think they're both talking with the attacker, but they're actually talking with each other. C.H.A.O.S. gets the NSA and GCHQ on a chat where they both think they're trying to exploit C.H.A.O.S., and then when they accidentally exploit each other and establish a persistent compromise, C.H.A.O.S. goes in through the backdoors that the NSA and GCHQ have set up, quickly before either the NSA or GCHQ realizes they've exploited the wrong target? Maybe an attacker colludes with a third party where they arrange encryption keys ahead of time, and then the third party could more easily eavesdrop on communications between the innocent user and the attacker. However, in that case, why doesn't the attacker just leak the session keys to the third party after the fact rather than agreeing beforehand? I could contrive some situation where you've got malware infiltrated into a very locked-down environment where Signal is the only communications channel back out of the environment, preventing two-way communication with the malware, but I feel we're getting pretty far into contrived situations there. What am I missing? Yes, the proposed key derivation function ads negligible overhead and looks sound. All else being equal, it's strictly better to not allow the attacker to force the session keys to a attacker-determined values if both ECDH and SHA-3 are broken. However, in this context, the risks associated with a larger code change seem to outweigh the risks of an attacker being able to choose session keys, particularly as it seems a security proof of the proposed key derivation function still seems to be a work in progress.
- aftbit 3y agoHas Matrix / Element had anything to say about this yet? How does their security compare? I don't trust Signal organizationally nearly as much now that Moxie has left, but I do trust their software and crypto design quite a bit more than most open alternatives.
- WC3w6pXxgGd 3y ago[dead]
- horseblanket 3y ago[flagged]
- h0p3 3y agoDo you have any other criticisms of the design of Signal?
- horseblanket 3y ago[flagged]
- wkat4242 3y agoI'm not a fan of moxie especially because of his hatred of federation (but luckily the EU is now enforcing this) but I don't think it's fair to say he cashed out. The cryptocoin crap in signal was indeed a misstep but moxie didn't get rich from it. Signal is still paid for by donations and nobody even uses the payment stuff. I'm not using it much because I want something open on both the software and network side, so I'm in favor of matrix all the way. Even if their E2E isn't quite as good yet.
- horseblanket 3y ago[flagged]
- beders 3y agoIf an attacker needs your specific signal messages, they wouldn't bother with trying to break encryption as the messages you type and receive are right there in plain text on your device. (The software that captures your input and the software that writes to your display driver are typically not under your control) As for large scale surveillance: Definitely an improvement that makes it much more expensive for attackers.
- ignoramous 3y ago> If an attacker needs your specific signal messages, they wouldn't bother with trying to break encryption as the messages you type and receive are right there in plain text on your device. Good thing then that the Signal Protocol is repudiable? https://signal.org/docs/specifications/pqxdh/#deniability https://signal.org/docs/specifications/pqxdh/#deniability
- handsclean 3y agoThey definitely can and do scrape Signal logs and use them in court. The protocol doesn’t help them prove the validity of the log, but they don’t need it to: it’s already not plausible to claim that you and your contact falsified your logs, something few people know how to do, in sync, in order to frame yourselves. I think Signal’s approach to deniability is just not making it even more hopeless, while the real protection against future compromise of a currently trusted contact or your own device lies in a different strategy that does work, ephemerality.