by mjb · 1w ago · 0 comments
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.
Any formal specification that doesn't include the invariant about a nonce not being reused isn't worth anything at all.
So yes, incompetent people can design insecure specs that fail to state even the most basic security properties we know of.
WPA2 wasn't designed by a single individual. It was designed by a committee of people including respected cryptographers and information security folks. They missed the fact that nonces could be re-used in the design, and they trusted the formal specifications that lacked a check on nonce re-use. It happens. Unfortunately, formal specifications tend to trap folks into a sense of complacency. Soundness is a hard problem, and if it's not solved, folks will make bad assumptions. "But, it's been formally verified..."
Could LLMs accelerate tactics and Curry-Howard level hole filling of specifications? Absolutely. But, they aren't likely to do much better than humans at building sound specifications. This is a difficult problem, for experienced humans with a narrow specialization in formal methods.
The common countermeasure to omissions and mistakes is a social measure: we bring talented people together to work as a team.
Even doing so, failures happen. Wise people know the value of testing.
In my own practical experience this is now what software development is about. If you can specify what you want, AI can implement it. But specifying it is actually very time consuming and hard.
I think everyone who has used LLMs for coding will have run into this at some point, so it's not very convincing that LLMs are good at this sort of thing.
We have the case of the paper version of OpenAI's Navier-Stokes work turning out to be describing something slightly different from the Lean formalization, as a more public example.