|
|
|
|
|
by mjb
12 days ago
|
|
In my experience, LLMs are surprisingly good at it. Especially transforming user-visible promises (like "all transactions are replicated to three nodes before being acknowledged") into high-quality specifications. I'm not entirely clear on what it means, specifically, for this transformation to be sound or unsound. What definition do you have in mind? What have you tried that isn't working? Completeness is harder, for sure. Maybe not tractable, especially in context of the whole universe (which is a point OP makes). Applicability is pretty easy - it's a NLU problem, and we're pretty good at those so far. |
|
The Needham-Schroeder Public-Key Protocol failed to include the responder's identity in the protocol, which led to a man-in-the middle attack found via model checking. This is despite numerous proofs -- some even machine-checked -- of implementations against specification.
When cryptocurrencies had their formal methods moment a few years ago, there were numerous vulnerabilities and attacks found in cryptocurrency protocols despite claims of being formally verified, and despite much of this verification being published in Rocq, Lean, etc. If the specifications are unsound or flawed, then the implementations will also be. While in these cases, it's quite clear that the folks performing the formal methods work were likely inexperienced, I don't see how an LLM will create anything more sound.
Remember that an LLM is trained on publicly available information. It's not going to make a leap above and beyond what has been published openly, and much of what has been published with respect to security is related to student projects (e.g. "Let's build a formally verified AES implementation") or one-off applications, some of which, like WPA2 KRACK, have incomplete specifications.
This is a difficult problem that experienced proof engineers get wrong, after performing rounds of threat modeling and review.