Formal methods as a path toward better cybersecurity – Brookings Institution
Five years ago, cybersecurity researchers accomplished a rare feat. A team at the Pentagons far-out research arm, the Defense Advanced Research Projects Agency (DARPA), loaded special software into a helicopters flight control computer. Then they invited expert hackers to break into the software. After repeated attempts, the flight control system stood strong against all attempts to gain unauthorized control.
This outcome was unusual. Experienced hackers who are given direct, privileged access to software almost always find a way in. The reason is simple. Decades after the birth of computer programming, modern software products are riddled with flaws, many of which create security vulnerabilities that attackers can easily exploit to slip through digital defenses. This is why reducing the error rate in software code is essential to turn the tide against relentless computer criminals and foreign adversaries that steal wealth and menace critical infrastructure with relative impunity.
How was DARPAs custom flight control software able to shrug off its assailants? The researchers turned to formal methods, a frequently overlooked group of technologies that programmers can use to create ultra-secure, ultra-reliable software. DARPAs experiment is one of several examples that underscore the potential for formal methods to remake software security. They herald a not-too-distant future when radically safer, more secure software can allow us to embrace other emerging technologies without catastrophic consequences.
Before it is ready for primetime, any piece of software should be able to satisfy at least two criteria:
Because most customers use software as it is intended, software programmers devote most of their attention to satisfying the first criteria: ensuring the software works properly under normal conditions. This is relatively easy to evaluate through user feedback, as customers tend to be vocal when a piece of software obviously misbehaves or omits an advertised feature.
The second dimension is much trickierand the bane of the cybersecurity community. Virtually all software code contains defects that can cause the software to fail in some way. Humans write software, and our species is naturally prone to mistakes. Larger and more complex software applications multiply opportunities for committing and overlooking errors by orders of magnitude. Human minds excel at creating highly capable software (the first criteria), but they are ill-equipped to identify and eliminate software defects.One defect might be harmless, while another might crash the entire program. Others can lead to security failures. These happen when human attackers purposefully exploit defects to cause a specific kind of software failure that achieves their own objectives, such as leaking private data or giving control to them, the attacker.
The software industry has coalesced around two methods for reducing the error rate in software code. The first is simply education and knowledge exchange. Experts collaborate on a global scale to share information about software vulnerabilities and how to fix them. Yet as computing has matured, this body of knowledge has become overwhelming. It is extremely challenging to know when to apply lessons learned and how to verify implementation. Another common method to improve software quality is intensive testing. Yet this can consume massive resources, and most testing only indicates the presence of defectsit cannot prove the absence of them. Given the context of cybersecurity, where attackers actively hunt for any possible flaw that designers overlooked, these two methods have proved insufficient in solving software security.
Formal methods encompass a group of technologies that aim to manage these problems much more effectively by supplementing human resources with computational resources. In the 1970s, when it became clear that computers would become the foundation of military power, the defense community realized it needed greater assurance that its software was of the highest quality and free of security issues. Early programmers knew they could not rely on human judgment alone to ferret out all possible security vulnerabilities. They needed ways to prove that critical pieces of software would not crash by accident or contain unknown security flaws that attackers could exploit. They wanted to maximize confidence that a specific software application would do only what its authorized users intended, and nothing else.
What is the best way to prove an objective truth? Math and logic. The pioneers of formal methods adapted mathematical logic to construct abstract representations of software (I want this program to do X) and then use advanced mathematical theorems to prove that the software code they wrote would only accomplish X.
The term formal methods evolved over time, and today it represents a spectrum of sophistication, from relatively simple instructions for planning a software project to automated programs that function like a super spell-check for code. The method of analysis varies between different formal methods, but it is largely automated and ideally carried out with mathematical precision. Lightweight formal methods are already in widespread use today. Static type theory, for example, has become a standard feature in several programming languages. These methods require no specialized knowledge to use and provide low-cost protection against common software faults.
More sophisticated formal methods can prevent more complex problems. Formal verification is one such example and it enables programmers to prove that their software does not contain certain errors and behaves exactly according to specification. These more advanced methods tend to require specialized knowledge to apply, but with recent advances this bar has been coming down. (For a more detailed description of different types of formal methods, curious readers should read pages 6-9 of this report by the National Institute of Standards and Technology.)
Problems with formal methods and recent innovation
Like the neural networks that revolutionized artificial intelligence, formal methods are a technology undergoing a renaissance after spending decades in the shadows. As software became more complicated, applying the more advanced tools for proving codethe ones that could provide the highest assurance that security vulnerabilities were absentbecame exponentially more difficult. As the National Institute of Standards and Technology explains, formal methods developed a reputation as taking far too long, in machine time, person years and project time, and requiring a PhD in computer science and mathematics to use them. For a long time, formal methods were relegated to mission-critical use cases, such as nuclear weaponry or automotive systems, where designers were willing to devote immense time and resources to creating error free software. But research into formal methods continued, led by a dedicated corps of experts in academia, federal research institutions, and a handful of specialized companies.
More recent developments, including DARPAs helicopter project, suggest formal methods are poised to remake how we design software and transform cybersecurity. In November 2016, the National Institute for Standards and Technology delivered a comprehensive report to the White House recommending alternative ways to achieve a dramatic reduction in software vulnerabilities. Devoting six pages to formal methods, the report noted that formal methods have become mainstream in many behind-the-scenes applications and show significant promise for both building better software and for supporting better testing.
Leading technology companies have quietly rolled out formal methods in their core businesses. Amazon Web Services (AWS), arguably one of the most important infrastructure providers on the planet, has an entire team that uses formal methods to create provable security for its customers. Facebook has shown how formal verification techniques can be integrated into a move fast and break things approach with its INFER system, which continuously verifies the code in every update for its mobile applications. Microsoft has also stood up its own dedicated team on formal verification. As one team member explained last year, Proving theorems about programs has been a dream of computer science for the last 60 years or more, and were finally able to do this at the scale required for an important, widely deployed security-critical piece of software. And it is not just Big Tech. Specialty companies like Galois, Synopsys, and MathWorks are creating a more competitive market for sophisticated formal methods solutions that companies of various sizes can put to work.
Looking forward, the National Science Foundations ongoing DeepSpec Expedition in Computing has demonstrated the applicability of these methods to increasingly complex engineering tasks, including the development of entire operating systems (which tend to be much larger than single applications), database engines, memory managers, and other essential computing and software components. These successes represent a significant step forward for the field, which has long sought to find reliable, low-cost/low-time methods for engineering such components.
These clear signs of progress notwithstanding, the most sophisticated types of formal methodssuch as full-blown formal verificationare still a long way from becoming a go-to tool for the average software developer. The organizations listed above are not representative, of course, and challenges still remain to bring formal methods to the rest of the software industry. We need an ecosystem of tools, more training for working engineers, and more consensus on when to deploy which methods. We also need to begin changing the way software standards committees publish their work; instead of prose, they should begin publishing formal models that allow the application of formal methods. Lastly, we need to begin educating technology decisionmakers about these capabilities and their ramifications.
There are at least two reasons why industry and government should seize on ongoing innovations in the field and accelerate adoption.
First, unlike many cybersecurity measures, proper application of formal methods does not only drive costs up. Since formal methods reduce overall defect count in software, systems built with formal methods can require less maintenance and thus be cheaper to operate than todays ad-hoc alternatives. Additionally, further improvements in automation are expected to provide these benefits without adding significant cost to the initial engineering efforts. Whereas as most security measures drive costs and hurt profit margins, proper use of formal methods can help defeat attackers while improving the bottom line. Even where software is too complicated to use formal verificationthe most robust weapon in the formal methods arsenalmuch more basic formal methods can still lower software lifecycle costs simply by enforcing more rigorous development practices that some software developers know, but dont use.
Second, the steady drumbeat for software liability may soon change the cost calculus for software developers who have traditionally not born all the costs of unreliable, flawed software. The final report issued by Congress Cyberspace Solarium Commission recommended that Congress should pass a law establishing liability for final goods assemblers of software that contains known and unpatched vulnerabilities. Some types of formal methods offer clear opportunities to establish more objective standards of care for determining such liability.
Just one bug in one line of code
Today, we have a global software industry that frequently creates software in an ad-hoc manner, churning out products without truly knowing what is in them, how they might fail, and what will happen if they do. The situation was tolerable when software did not run the world but computing now either controls or informs nearly every aspect of the economy, politics, and social life. And because the individual components that make up a larger software program are interdependent, even a single error in any phase of the manual development processdesign, implementation, testing, evaluation, operation, maintenancecan be catastrophic. One bug in one line of code can create a security vulnerability that spans millions of computer systems, enabling data theft and digital disruption on a massive scale.
Formal methods are not the ultimate answer to cybersecurity. Even their most sophisticated manifestation, formal verification, cannot guarantee perfect security. Neither can the worlds best engineers guarantee that a skyscraper will not collapse. But through rigorous standards, objective testing, and the scientific method, they have achieved an outstanding record. By injecting similar rigor into the software industry, formal methods can, at the very least, give us much higher assurance that digital technology will behave.
Tim Carstens is an adviser at the Cyber Independent Testing Lab.David Forscey is the managing director of the Aspen Cybersecurity Group. He previously worked in the Center for Best Practices at the National Governors Association and Third Way.
Read more here:
Formal methods as a path toward better cybersecurity - Brookings Institution
- Why open source isnt free (and never was) - How-To Geek - November 18th, 2025 [November 18th, 2025]
- Affinity by Canva review: free is the magic number - Creative Bloq - November 18th, 2025 [November 18th, 2025]
- Trump administration ended free tax filing program. Heres where Oregonians can go instead - Oregon Capital Chronicle - November 18th, 2025 [November 18th, 2025]
- A lot of free PC software is risky. Use these alternatives instead - PCWorld - November 5th, 2025 [November 5th, 2025]
- Mega recall in the U.S. is official. - Toyota confirms free ECU software update for cameras not displaying image when reverse gear is engaged - Unin... - November 5th, 2025 [November 5th, 2025]
- Is Affinity's free Photoshop rival too good to be true? - Creative Bloq - November 3rd, 2025 [November 3rd, 2025]
- New features are coming to Pikmin 4! - Nintendo - November 3rd, 2025 [November 3rd, 2025]
- Avoid Purging Thousands of Emails With This Gmail Trick to Free Up Space - CNET - November 3rd, 2025 [November 3rd, 2025]
- 3,000+ YouTube videos deliver malware disguised as free software - Kurt the CyberGuy - October 31st, 2025 [October 31st, 2025]
- Affinity, the new version of the creative software, is now free of charge - PrintIndustry.news - October 31st, 2025 [October 31st, 2025]
- Affinity's creative software is free for everyone now - and I think that could be bad news for Adobe - TechRadar - October 31st, 2025 [October 31st, 2025]
- Affinitys new design platform combines everything into one app - The Verge - October 31st, 2025 [October 31st, 2025]
- Coros watches just got a major upgrade for free but I still want them to bring in this killer Garmin feature - Tom's Guide - October 31st, 2025 [October 31st, 2025]
- Still Using Windows 10? These Free Updates Will Help Keep Your PC Secure - CNET - October 28th, 2025 [October 28th, 2025]
- Whats Really Hiding Behind That Free Tutorial? Unlocking YouTube Ghost Network - The420.in - October 26th, 2025 [October 26th, 2025]
- Article | At least 25 states plan to cut off food aid benefits in November - POLITICO Pro - October 26th, 2025 [October 26th, 2025]
- Benghazi hosts intelligence chiefs and an interesting guest from South Africa - The Africa Report.com - October 26th, 2025 [October 26th, 2025]
- Hundreds of Syrians line up in Tripoli for free repatriation flights to Syria - The Arab Weekly - October 26th, 2025 [October 26th, 2025]
- Gulf of Sirte International Airport Reopens: A New Era for Libyan Tourism - Travel And Tour World - October 26th, 2025 [October 26th, 2025]
- The Attorney General Is A Defendant In A Torture Claim From A Libyan Military Commander That He Drafted - Politics Home - October 26th, 2025 [October 26th, 2025]
- Agreement signed to hold the First Libyan Conference for Laboratories and Radiology - libyaupdate.com - October 26th, 2025 [October 26th, 2025]
- EU reaffirms support for Libyan people in pursuit of peace, national unity - APAnews - Agence de Presse Africaine - October 26th, 2025 [October 26th, 2025]
- Commander-in-Chief Receives Elders and Notables from the Central Region, Affirms: "The Armed Forces Will Guarantee Any Agreement That Unites... - October 26th, 2025 [October 26th, 2025]
- Elforjani: Sirte is a symbol of liberation from terrorism and the General Command's support enhances the path of development - libyaupdate.com - October 26th, 2025 [October 26th, 2025]
- Voices from the sea, part three: how do exiled people experience their moment of rescue? - The Conversation - October 26th, 2025 [October 26th, 2025]
- Free access to Laba7 Shock Dyno Software announced - Automotive Powertrain Technology International - October 24th, 2025 [October 24th, 2025]
- Unleash Your Voice: The Best Free Text-To-Audio Software For 2025 - Harlem World Magazine - October 24th, 2025 [October 24th, 2025]
- How to Scan, Edit and Sign PDF Files on Your Phone or Tablet - The New York Times - October 23rd, 2025 [October 23rd, 2025]
- Unintended Acceleration Is The Last Thing A Supercharged Ford Mustang Needs - Yahoo! Autos - October 21st, 2025 [October 21st, 2025]
- Top Password Recovery Software for 2025: All the Best Services Picked by the Experts - TechRadar - October 19th, 2025 [October 19th, 2025]
- Windows 10 PC can't be upgraded? You have 5 options - and must act now - ZDNET - October 19th, 2025 [October 19th, 2025]
- Free Software Foundation Is Serious About The Librephone Project [To Bring Mobile Freedom To The Masses] - It's FOSS News - October 17th, 2025 [October 17th, 2025]
- FSF Librephone battles the proprietary binary blob - theregister.com - October 17th, 2025 [October 17th, 2025]
- World's first truly free software phone? That's the FSF's new 'long game' - ZDNET - October 17th, 2025 [October 17th, 2025]
- Belarusian authorities bought trace-free tracking software, an investigation finds - - October 17th, 2025 [October 17th, 2025]
- First convictions linked to Post Office Capture software referred for appeal - Free Press Series - October 17th, 2025 [October 17th, 2025]
- 10 open-source Windows apps I can't live without - and they're all free - ZDNET - October 15th, 2025 [October 15th, 2025]
- Borderlands 4: Gearbox Software Reveals Upcoming Content for the Game Including a DLC, a Free Event and More - IGN India - October 15th, 2025 [October 15th, 2025]
- Triple-zero software 'hanging by a thread' - Kyabram Free Press - October 15th, 2025 [October 15th, 2025]
- Free Up More Google Drive Space at No Cost With These Hacks - CNET - October 13th, 2025 [October 13th, 2025]
- 8 free Linux apps that make tricky tasks surprisingly easy - no command line required - ZDNET - October 13th, 2025 [October 13th, 2025]
- Running Out of Space on Your iPhone? Before You Delete Anything Try This - CNET - October 11th, 2025 [October 11th, 2025]
- 4 free video editors that make me question why I ever paid for Adobe software - XDA - October 9th, 2025 [October 9th, 2025]
- A 2TB PCIe 5.0 SSD for less than $140? This Crucial P510 Prime Big Deals Day discount with free Acronis software is exactly why I'm putting it... - October 9th, 2025 [October 9th, 2025]
- At 40 Years, Free Software Foundation Now Wants to 'Free Your Phone' - It's FOSS News - October 9th, 2025 [October 9th, 2025]
- 8 free Linux apps that are surprisingly useful - no command line required - ZDNET - October 4th, 2025 [October 4th, 2025]
- We Finally Have Free Anti-Robocall Tools That Work - The New York Times - October 4th, 2025 [October 4th, 2025]
- Illinois State Bar Association Offering Free Trust Accounting & Billing Software to All Members With Smokeball Bill - Illinois State Bar... - October 2nd, 2025 [October 2nd, 2025]
- Suffolk tech giant pledges $10m to give charities free software for life - Ipswich.co.uk - October 2nd, 2025 [October 2nd, 2025]
- Eventide Temperance Lite, "the world's first musical reverb plugin": free download for a limited time - synth anatomy - October 2nd, 2025 [October 2nd, 2025]
- Windows 10 extended support is now free, but only in Europe Microsoft capitulates on controversial $30 ESU price tag which remains firmly in place... - September 30th, 2025 [September 30th, 2025]
- You can now install iOS 26 on your iPhone: Everything to know about the free software update - Engadget - September 30th, 2025 [September 30th, 2025]
- Turns out, Microsoft will offer Windows 10 security updates for free until 2026but unfortunately not in the US or the UK - PC Gamer - September 30th, 2025 [September 30th, 2025]
- Free Alternatives to Photoshop and Word: How to Save on Software - 112.ua - September 30th, 2025 [September 30th, 2025]
- Delete those pricey programs with our four tips to help you find the best bargain software solutions - The Sun - September 30th, 2025 [September 30th, 2025]
- BlueCruise is Getting Better for Current Truck Owners - Ford From the Road - September 28th, 2025 [September 28th, 2025]
- Best typing tutor software of 2025 - TechRadar - September 25th, 2025 [September 25th, 2025]
- You can update your iPhone to iOS 26 for free right now - here's which models support it - ZDNET - September 25th, 2025 [September 25th, 2025]
- This is the best photo editing software to use in 2025 - Amateur Photographer - September 25th, 2025 [September 25th, 2025]
- From Abuse to Alignment: Why We Need Sustainable Open Source Infrastructure - Sonatype - September 25th, 2025 [September 25th, 2025]
- Think you've seen the weirdest place to play DOOM? Think again - Creative Bloq - September 23rd, 2025 [September 23rd, 2025]
- OpenSSF to freeloaders: Open source infra isn't free - theregister.com - September 23rd, 2025 [September 23rd, 2025]
- I transformed our LAN gaming setup with a mini PC and free software - XDA - September 21st, 2025 [September 21st, 2025]
- iOS 26 is ready to download: Everything to know about the free iPhone software update - Engadget - September 21st, 2025 [September 21st, 2025]
- Filmmakers - you can now storyboard your next movie totally free with this software - Yahoo! Tech - September 21st, 2025 [September 21st, 2025]
- Oak Creek Police Crime Analyst Wins Top International Award with Innovative Free Software Dashboard - Hoodline - September 21st, 2025 [September 21st, 2025]
- Molecularbytes Atomicreverbfree, a free algorithmic reverb for macOS and Windows - synth anatomy - September 19th, 2025 [September 19th, 2025]
- Meadows Introduces Free Imposition Software for Adobe InDesign - PRWeb - September 19th, 2025 [September 19th, 2025]
- Lucid just gave its EV owners a free dash cam mode and Tesla-style parking monitor all from a software update - TechRadar - September 19th, 2025 [September 19th, 2025]
- My Google Pixel just updated and is better than ever get your free software upgrade now - T3 - September 19th, 2025 [September 19th, 2025]
- NLSIU study hails Keralas KITE as key model for implementing Free and Open Source Software (FOSS) - The Times of India - September 19th, 2025 [September 19th, 2025]
- These are the top free Windows tools that I use on a daily basis to boost my productivity - Tom's Hardware - September 17th, 2025 [September 17th, 2025]
- iOS 26 is finally here: Everything to know about the free iPhone software update - Engadget - September 17th, 2025 [September 17th, 2025]
- When does iOS 26 come out? Date and time you can download the new iPhone operating system around the world - Fast Company - September 17th, 2025 [September 17th, 2025]
- Why Pie Is Becoming the UKs Go-To Free Tax Software in 2025 - The Globe and Mail - September 13th, 2025 [September 13th, 2025]
- iOS 26: What to know about the free iPhone software update ahead of the Apple event today - Engadget - September 11th, 2025 [September 11th, 2025]
- I built a photo editing workflow with nothing but free and open-source tools - xda-developers.com - September 9th, 2025 [September 9th, 2025]
- TapeFi Stop, free vinyl stop simulator plugin for macOS and Windows - synth anatomy - September 9th, 2025 [September 9th, 2025]
- Farming Simulator 25 Releases Third Free Update - Bleeding Cool News - September 6th, 2025 [September 6th, 2025]
- One of the biggest names in video editing is coming to smartphones and it's free. Meet Premiere Pro for mobile - Digital Camera World - September 5th, 2025 [September 5th, 2025]