1,578 karma · joined Jan 8, 2015 (11y ago) · 375 submissions
comment 1w ago · link · parent
It's not a matter of constructing proofs. This can be done via brute force with appropriately managed search trees. LLMs actually are not much better at this than other ML or search techniques; it's just that in practice, that's not what proof engineers have optimized for.
Building a sound specification, that as erichocean pointed out, would include measures to prevent nonce re-use, is a much more subtle and difficult thing. You can prove that software is correct with respect to a specification, but there is nothing beyond proving internal consistency, to verify that the specification itself is sound, complete, or appropriate. This is an open-ended problem, and one that humans have difficulty with. I don't think that any synthetic intelligence is likely to do better, because it can only do as well as the vetting of information provided to it, and it is very likely that this information will be flawed and incomplete. LLMs try to fill in the blanks with plausible things, based on their training. Even humans make assumptions. These assumptions are sometimes wrong.
Regarding proof automation, this is actually a double-edged sword. I can build systems today that will perform various optimization techniques to try to get further into a proof via tactic search, and will eventually converge on a solution. However, the tactics will be a mess, much like the 1600 pages of tactics in the OpenAI NS proof. A good proof engineer builds specifications and proofs that other humans can read and understand. Even the tactics are organized around what can be explained, so that these can be hand checked. If you're building proofs of software, you want auditors to be able to look at these as well as the specification to see if you are missing something, such as a nonce re-use policy.
comment 1w ago · link · parent
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.
comment 1w ago · link · parent
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.
comment 1w ago · link · parent
Once you have a sound formal specification, building proofs that software follows this specification is actually fairly straightforward. LLMs aren't doing any magic here.
comment 2w ago · link · parent
comment 2w ago · link · parent
Envenomation is not necessarily a death sentence. It comes down to immune system response and dosage.
That being said, even today, people foolish enough in the US to own black mambas or cobras are taking significant risks. If bitten and envenomated, they would likely die before antivenom can be air lifted from whatever rare reserves may exist to their location. If one is going to own such snakes, one should be willing to spend six figures on many doses of one's own antivenom, which is only good for 2-5 years and must be replenished, or, to live near a location where such antivenom is stockpiled and be ready to pay to buy replacement antivenom afterward. The assumption should always be that if one owns a venomous snake, it is a question of when, and not if, one will be bit.
I have had a few tame (non-venomous) reptiles over the years. Very gentle things, but sometimes, they bite. The reasons why are numerous: They get scared. They aren't feeling well. They are trying to communicate something. Regardless, they will bite. Getting bitten by a 7 foot male iguana with beefy jowls is not fun. Thankfully, he just nipped me. I still had to clean out the wound and butterfly it.
comment 2w ago · link · parent
comment 2w ago · link · parent
On their own, no. What contracts provide are annotations for how the programmer expects the code to behave, which can be verified by model checkers or automatic theorem provers. These can already verify memory safety properties; borrow checking only does a subset of what a model checker can do. To scale model checking up so it can work on a large codebase, compositional verification is required. Contracts enable compositional verification, which in turn allows developers to write code safer than what is possible with vanilla Rust or Java.
I do this today with C. The model checked C I write is safer than software written in Rust without a model checker. It is memory safe, and it is verified to work within the specification that I have designed. As far as the specification is correct, it is correct.
We can't rewrite the world in Rust. There are many billions of lines of code in C and C++ that aren't going away. Instead, we need to find ways of making this code safe with as little change to it as possible.
comment 2w ago · link · parent
https://www.bsdcan.org/2026/timetable/timetable-Model-Checki...
That link has the slides and some example code. There's also a live stream on YouTube.
Regarding features I miss from C++, I like the concept of generics. I don't like the implementation in C++. I also find C's _Generic facility to be limited, especially when building containers that perform hygienic type erasure. This feature isn't enough for me to go back to C++ on its own, but it is something I'm exploring in a new language I'm writing.
comment 2w ago · link · parent
Contracts are annotations, much like types are. What makes contracts powerful is the tool that examines this annotation, as is the case with types. A type checker, such as an H-M type checker, can only perform limited checks. It's possible to use a dependent type checker with dependent types, but this is undecidable, and it requires a proof assistant and human guided tactics to resolve. In practice, this is expensive, and when automation such as LLMs are used, one currently gets tactic soup that is difficult to understand, which defeats the purpose.
A model checker, such as CBMC or ESBMC, can work with contracts to verify specification that would be difficult to verify without contracts. Model checkers can already verify memory safety and even the absence of memory leaks across an entire program. However, model checking grows exponentially expensive as we add more code to be verified. Contracts give us the ability to perform compositional verification, which allows us to verify codebases into the millions of lines of code or larger by breaking down this verification into many small model checks, stitching these together with contracts and invariants. Contracts and invariants complement type checking and significantly extend it. It's possible to use contracts and invariants to add these checks to an untyped language or a minimally typed language such as C. If my precondition includes the data invariant, "property_valid_widget(x)", then effectively, this also type checks x. This works even if I've completely erased the type and later recast it.
The "real world" doesn't currently have a solution for reducing general software safety issues -- which goes far beyond memory safety -- other than formal methods. Practical and efficient ways to formally verify software is within our reach, and is already being done with other languages. I do this today with C / CBMC using contracts and invariants. I get memory safety, specification safety, and a guarantee of no memory leaks. This can also be done with C++, Rust, Java, and other languages using similar techniques. While it is true that Rust and Java both have basic memory safety in place, they also both can harbor vulnerabilities that could be resolved with function contracts and model checking.
Contracts are more than useful; they give visibility of developer intent to model checkers and similar tools. This visibility makes software significantly safer than borrow checking or type checking can alone.
comment 2w ago · link · parent
I put together an alternative function contract and invariant mechanism in C using CBMC and custom macros that effectively allows me to perform formal methods in C using compositional verification. The reason why I chose C is because of its relative simplicity and relative ease of building tooling around it. C++ contracts provide some feature parity, and would let me take advantage of some of the features in C++ relative to C.
I hope that the contract proposal is workshopped and simplified so it can be proposed again for a future version. Its current form is unsuitable, but it deserves a second chance with a simpler implementation. Contracts would narrow the safety gap between C++ and languages such as Ada / SPARK.
comment 3w ago · link · parent
The pragmatic argument for hard no-LLM projects: if models are to be useful, they need good input. Hand-written software that has been carefully audited is free from the kinds of feedback errors that will eventually weaken LLM code generation. Otherwise, a bad pattern gets copied. In the next generation, this bad pattern is seen a bit more often as stochastic models converge on it and more open source code adopts it. This is reinforced in the next generation and it becomes a common pattern. Then, in the next generation, this pattern is seen all over. This could be inert "non-coding DNA" like weird naming conventions or pointless comments. Or, it could be bad edge cases that become commonly exploitable.
comment 1mo ago · link · parent
I'd recommend taking a look on forums to see what other folks are running. If it's a modern Lenovo with integrated graphics or an AMD GPU, it will be supported before others. OpenBSD folks tend to use Lenovos. My best recommendation is to pick a laptop that a core maintainer is using, unless you feel comfortable making your own patches. They have AMD GPU support via DRM from Linux. Intel graphics typically works alright.
OpenBSD works well with relatively recent versions of Chromium and Firefox. That being said, they are on a six month release cycle. The Chromium port can fall behind if you stick to -stable or releases. Building Chromium or Firefox from source is... well, I have a 2012 laptop, so that's not something I am going to do. Regardless, you'd need to be pretty comfortable with applying OpenBSD specific patches to one of these browsers, which isn't always obvious, especially since they are moving targets.
If you're used to being on a rolling release Linux, this will be a bit disorienting. But, in my opinion, it's significantly more stable and better thought out.
comment 1mo ago · link · parent
The Lenovo laptop I use as my travel laptop and console display is a 2012. It still runs OpenBSD just fine.
comment 1mo ago · link · parent
That doesn't mean that one shouldn't be allowed to do these things. It means that we should provide appropriate training and, in some jurisdictions, reasonable / non-discriminatory licensing for those who wish to do these things.
When it comes to distillation, the rules are pretty straight-forward:
Keep a log book. Use quality equipment. Measure temperatures. Learn to discard heads and tails. Use appropriate ventilation and fire safety protocols. Purchase qualitative test equipment to verify that the product does not contain harmful contaminants. Licensing is a great way to ensure that people know about these things and follow them. A blanket ban actually makes it more likely that people who violate this ban to distill alcohol will poison themselves or others.
comment 1mo ago · link · parent
I think it's perfectly acceptable if these is a reasonable and non-discriminatory licensing process, like for HAM radio or small game hunting, that covers safety. This doesn't eliminate the possibility of accidents, but it does reduce this possibility.
comment 1mo ago · link · parent
Many microbreweries and small breweries started when home brewers went pro. They had recipes that were popular. They decided to go through the fundraising and investment in order to build appropriate facilities and get licensed.
It's this permission to experiment and play that has inspired many of the popular ales available today.
comment 1mo ago · link · parent
Liquor has become consolidated among a half dozen global conglomerates. Varieties have been streamlined. Folks who are into making historical cocktails tend to hit roadblocks or make modern "almost" substitutions.
I'm in favor of this ban being struck down, even though I can't really take advantage of it. I brewed beer and wine when I was younger, but for health reasons, I can't drink alcohol anymore.
comment 1mo ago · link · parent
If Linux DRM weren't licensed under more permissive terms, OpenBSD simply wouldn't permit its inclusion.
comment 1mo ago · link · parent
Without spoiling the movie, it's possible for people to be multiple things at once. That doesn't excuse what Elizabeth Holmes did or explain what others in her circle may be guilty of. The movie is a wild ride.
comment 1mo ago · link · parent
Why insulin? Why not have the robot deliver premature babies from a regional hospital to a central hospital, on a battery powered NICU that only has 30 minutes of battery power?
The argument is unlikely.
comment 1mo ago · link · parent
Prescription medications are controlled. If this robot is damaged or destroyed, the patient may not get their insulin at all without further authorization from their doctor or their insurance company. Those logistical issues are much thornier than a retired professor blocking a delivery robot.
comment 1mo ago · link · parent
This does make the compiler slightly more annoying to extend, but that makes bootstrapping support for a new system easier. User experience is important.
comment 2mo ago · link · parent
I was just sad to see SF in a bust, because I genuinely enjoyed it in 2011. I can only hope that this slump resolves and that the folks who are down and out on the streets get the help they need.
I actually love SF and would love to visit again.