244 points · by sabas_ge · 6y ago · 76 comments
Two things to look forward:
1. Usage of open source FPGA synthesis and implementation tools
2. Usage of open source FPGA chips :)
I've already seen some traction happening for open source FPGA tools, but open source FPGA chips are only in my head (as far as I know).I'm a chip designer myself, and for years I have been thinking on kickstarting something to pay for a tapeout of an open source FPGA. If anyone is interested let me know, I live in Ontario/Canada.
I think that the idea behind all of this is sound but that at some point we will have to accept that there always will be some remnant of insecurity unless you are willing to create your own fab or build your CPU up out of discrete transistors which can be (1) exhaustively tested and (2) are too simple to contain anything nefarious given that there is no way to know where in a circuit that transistor will end up.
1. FPGAs are easier to verify cause they are regular structures.
2. How do you insert a backdoor in an FPGA at the supply chain if you don't know what is the exact logic that is going to be uploaded?Popularity of certain open core designs might be one way to gain advance knowledge of how an FPGA might be used.
That suggests an interesting option: to scramble the input to an FPGA in such a way that the device will still work but that it is even more unpredictable how its internal connections will be used (otherwise you could take a number of open core designs and arrange for your attack to work with those configurations, which might be detectable in hardware or in the toolchain).
Better yet, scramble the bitstream on every boot (but what would do the scrambling?).
The article is long so it is normal that many people did not read it to the end, which is a shame because I think the conclusion is really important:
"I personally regard Betrusted as more of an evolution toward — rather than an end to — the quest for verifiable, trustworthy hardware. I’ve struggled for years to distill the reasons why openness is insufficient to solve trust problems in hardware into a succinct set of principles. I’m also sure these principles will continue to evolve as we develop a better and more sophisticated understanding of the use cases, their threat models, and the tools available to address them."
It is a quest. It will be made of a lot of partial solutions. FPGA are just easier to inspect and their functions harder to backdoor if you don't know what they will run. Harder but by no means impossible. But at this stage if we can make things 50% harder in 50% of the cases, that's progress.
So for the FPGA you could load it with a risc-v arch and then run that arch through some performance load. If the energy usage has changed a lot it may well be doing something nefarious. Bonus points if you can have a (set of) reference fpga's in the cloud you can compare arbitrary work loads on so that it is harder to predict and be stealthy about nefarious activities.
Use side-channel sources of information, where possible, to drive down the scale of changes possible.
Any one of those can be turned against you.
https://spectrum.ieee.org/nanoclast/semiconductors/design/xr...
This actually sounds reasonable with an open source model. Masks are open, so a third party could xray chips coming out of various fabs. Since that's a nondestructive process, identical chips could be tested by multiple parties, and the community can compare notes.
It’ll happen someday. I think there are enough hobbyists interested in home manufacturing (of all sorts of kinds) that we’ll eventually have low barrier to entry home semiconductor fabs. They’ll probably sacrifice performance for simplicity — I can’t imagine a home fab ever being cutting-edge — but for most applications that’s fine.
This solves both the #1 hard tools problem and the easier #2 problem of $25k-$100K mask cost.
I contacted you on Linkedin to see if we can work together on releasing this.
I think the sentence should be rewritten as "closed hardware is precisely untrustworthy as open hardware", meaning that open reveals limits and assumptions while close is pretending there are none and everything is secure, while it's precisely not.
The trust imo is not in the product, is in the company or team building the product.
> I’m a strong proponent of open hardware, because sharing knowledge is sharing power.
This is what, I think, makes a company or team more trustworthy. Not just making a product (even if it's really great and has the ambition to protect millions) but also sharing knowledge with the ambition that more can learn.
If we have the design, could we generate instruction sequences (or, in general, input sequences) and deterministically predict the time required and power consumed to execute those instruction sequences? Then we could fuzz the chip with a bunch of generated code and measure that the consumed time and power matches what we expect. Any backdoor would throw off the measurements.
Can anyone who knows hardware better comment on whether there are other kinds of attacks that this wouldn't cover?
This idea is inspired by a paper I read once which used a somewhat similar approach for verifying that a hardware system hadn't been infected by persistent firmware malware. The authors had the system compute a function which had a known memory-optimal implementation which required the use of all the persistent memory available in the system (including firmware, etc.). Unfortunately I can't find the paper now.
Unfortunately transistor performance can vary quite widely for a single design; recall that a single CPU mask design is often sold in several speed grades. These aren't different designs, they are all the exact same design but then tested to pass at a given frequency and power profile.
My intuition is that a simple implant would probably escape power characterization, and larger implants can be left off until a trigger condition is met. That condition could be made so that fuzzing is highly unlikely to hit it, e.g. a particular 64-bit number pattern has to appear in a given register to power on the implant.
The technique may be suitable to detect gross anomalous execution in a single well-characterized chip but I feel any robust criteria against false positives would also leave a sufficiently large margin for small implants to slip through undetected.
It's interesting - there is a loose analogy to reproducible builds chasing down and squashing every source of nondeterminacy in software builds. I'm guessing that's not possible to do that for chip fabs for deep physics reasons + reasons of efficiency, but maybe some other trick (recording the "random seed"?) could be used... And the thought that verified chips require a verified chip fab process is appealing! But I know nothing about chip fabrication processes, so I'll leave it at that.
There also the problem of margin of error. Could an attack hide in the allowed tolerances of error. Also if the tolerance is too small a lot genuine/unaltered devices may trigger false positives.
As I read this article I thought about this as well. Every chip is tested as part of the manufacturing process, but as Bunnie points out, to be really secure you can't just trust the manufacturer when they say the tests all passed.
If there were some way to run all the tests on the finished silicon product myself, would I trust it? It's very hard (expensive, time consuming) to test everything in a modern chip, however, it would certainly make it harder for a malicious mask change to go unnoticed.
(announced towards the 2nd half of the post)
If only because the ones seem to be driven by altruistic motives and the alternatives have already been shown many times to be willing to sell their - and your - soul to the devil for a price.
Open source hardware would need a verification and inspection method that reliably determines whether or not the manufacturer delivered what they said they would if you want that level of trust. And even then those tools could be compromised and so on.
To put it simpler: between say Intel or AMD and 'Bunnie's chip factory' I know which one I would trust more because with Intel and AMD I know for sure that there will be a bunch of misery included and with Bunnie I would at least know that he didn't include it himself and would do his best to avoid others doing it. Trust, eventually, is always going to be in people.
I'd love to see his 'non destructive method for the verification of chips' become a reality. It would be at least an interesting exercise to compare that what we have with what we should have.
And if funding is an issue, this is exactly the sort of thing where I would be very happy to throw money at a kickstarter.
Funny thing about trust; you can trust your enemies to behave poorly too. Trust seems to be about predictability first and foremost, and great mathematical work is being done to factor humans out of it. Autonomous vehicles are subject to a formalized version of trust already and engineers are working to get dependent type theory to do verification for them.
Overall I really enjoyed using them especially the digital picture frame, but as long as they are spying devices to show you creepy ads (created by Google and Amazon) then Im not interested. I wish Apple would offer comparably tech at a normal price point. If not Apple another company whose is all about privacy and the device only connects to the Internet to download and store daily weather and traffic info. It would be a home network only device that listens when you summon it and it would alert you (via email or text) that a hacker is trying to hack it if it's Internet channel for downloading info is compromised.
I suppose, lacking the kind of efforts that Bunnie is making, the best you can do is start with relatively simple mass produced hardware, purchase it in a way that it can't be tampered with specifically for you, install an open-source OS which doesn't communicate with 3rd parties, check the software checksums.
Some applications, like vote counters, may not even need an Internet connection. Creating a secure system to count votes isn't something I'd like to be asked to do.
It might be you shouldn't even trust the physical environment, even power supply can be used to do evil things. Or radiation, even ambient temperature.
Don't forget code itself can affect the environment in unobvious fashion.
EDIT: My point is that we need to be aware security will never be a solved problem. We can't also consider security as a software-only issue, but have to have a holistic viewpoint considering the whole system.
There's of course the point where risk mitigation is not worth the cost. That's another matter.
For a lot of people, we're well below the level of security where hardware security is relevant. The average person is still willing to run software that downloads/installs/runs malware on their machine (browsers with Javascript enabled). So in that sense, we've got a lot of work to do to get developers and consumers to practice better security at the software level before the hardware level is even a significant concern.
However, I do hope for a future where software security is both a fairly solved problem and the norm, and if that time comes, I want to be ready for the inevitable arms race when hackers move to hardware vulnerabilities.
Recognize that yes, there are always more layers, but each layer of vulnerability has decreased capabilities. It's a lot easier to read someone's hard drive using an installed app with full filesystem permissions than it is to read the same hard drive using their power supply.
Also recognize that these layers require more capability from your attacker. A Russian hacker can write an app that reads people's hard drives from anywhere in the world. The power grid simply lacks the networking infrastructure for long-distance remote access in many cases, requiring more physical locality.
I'm not saying this is pointless at all! Just that so far there seems to always be another layer that can be used to circumvent the protections.
I guess I'm more like saying we should not ever take security for granted. Instead, we should look at the whole system and try to find the easiest attack vectors. Which might not be purely software issues anymore.
For example, at some point we might need to consider the physical effects of the code being executed or how the physical environment can affect it.
When the software is sufficiently strong, the attacks will be directly or indirectly against the hardware.
Perhaps by something as simple as by a clever pattern of temp sensor reads causing your code to think temperature is in safe range for your application?
Or causing your code to execute extra multiplies to generate heat to hide a momentary temperature drop.
My point is even if you could 100% trust your supply chain and 100% validate your silicon matches your design, there are still residual issues.
For example, power supply glitch attacks [0] are nowadays well known, including techniques to make them sufficiently reliable.
While the industry is still innovating, such an ideal world may not arise, but when things settle down and just about anyone can make a competitive version of any type of chip, it could, but only if we demand open hardware now to allow that competition to start forming.
Nice work but the conclusion is absolutely unwarranted:
Security is all about mitigating risk. With closed hardware, as much as software, it becomes much easier to implement backdoors but also hide who did it and when.
Unsurprising, a lot of closed source comes with spyware functions - look at the phone "app market".
By all means an FPGA is better than trusting a SoC, but this does not mean that all hardware is the same.
Management Engine is a good counterexample.
I commend him for continuing in this quest for trustable hardware. I more or less gave it up. I fear it wont be really possible until the tech has moved so far that we can produce silicon and PCB at home on open hardware machines...
I'm an "Apocalyptic": I literally believe that these are the "End Times" and that our global civilization is about to tank (in ~10-50 years.) So I'm not so much worried about spooks in my chips as I am about being able to compute effectively at all, at all.
In that context, I think pretty seriously about what computer hardware will be available in a post-apocalyptic scenario. In that case chips will likely be worthless due to unavailability of datasheets.
The things that will work are sliderules and nomographs[0], henges and other geophysical "calendars", clockwork, fluidics, and relays. You might be able to make discreet transistors.
See the Clock of the Long Now mechanism: https://en.wikipedia.org/wiki/Clock_of_the_Long_Now#Design (Although a large pitch-drop[1] "water" clock[2] would be more reliable and much simpler.)
- - - -
Note that, if civilization doesn't collapse, the Trust Problem will become much worse as IoT advances, and, in the limit, nanotech... and you can't trust anything. Within the limits of physics, reality will become permeated with "ghosts", we will haunt the world with our own daemons. The Daemon-Haunted World. ("'The Demon-Haunted World: Science as a Candle in the Dark' is a 1995 book by astrophysicist Carl Sagan, in which the author aims to explain the scientific method to laypeople, and to encourage people to learn critical and skeptical thinking." https://en.wikipedia.org/wiki/The_Demon-Haunted_World )
- - - -
Maybe we will develop massive interlocking computer networks that respect (your idea of) your human rights, but that's certainly not a solid projection from current trends, eh?
[0] Image search for nomograph: https://duckduckgo.com/?q=nomograph&t=ffcm&atb=v60-1&iax=ima...
Why do you think that?
Despite the pessimism in the US and some other parts of the developed world, global civilisation has never been healthier.
It's true that nuclear war is a possible civilisation destroying event (as it has been for ~70 years) but beyond that there are no threats that haven't been there for millennia (eg, large asteroid strikes).
Things like global warming will cause huge destruction in some parts of the world, disrupt and perhaps kill millions of people (eg, Bangladesh isn't in a great way), and probably lead to wars that kill many more.
But even this is far from a global civilisation killer.
You can see how it would happen with e.g. insects dying off: https://news.ycombinator.com/item?id=18541536
Followed by birds that eat insects dying off: https://news.ycombinator.com/item?id=21018916
Followed by the death of everything that depends on birds and insects, which is probably a large percentage of the remaining wildlife. Similar extinction scenarios are plausible with ocean life.
I guarantee that this would result in the collapse of civilization if it were to occur.
This is one reason it's absolutely vital to halt greenhouse gas emissions. Loss of habitat and pesticides are also huge problems for insects and other wildlife, so dealing with global heating is necessary but perhaps not sufficient to save them, but we have a clear deadline for when we must reach carbon neutrality, so that seems like the top priority.
(I'd also note that both of these things seem to be caused primarily by pesticide usage and other agricultural practices, not climate change)
Next, let me qualify "global civilization is about to tank..." by adding "...unless we have some sort of Spiritual transformation of some kind." I hope that will happen, but this isn't the forum to get into what are essentially religious beliefs, eh?
Further, I believe that we actually have all the technology we need to enact a wonderful quasi-utopia. I'm a Bucky Fuller fanboy, and he basically laid out the math (he was an engineer) to show that, if we applied our technology efficiently to our problems, we could create a kind of secular utopia "without disadvantaging anyone". That's even before you get into things like applied ecology ("Permaculture" et. al.), or fusion power, etc. We even have the psychological science now to reprogram our minds. If we chose "be better people" as a goal there is no time in history more amenable.
Now then, to answer your question,
> Why do you think that?
The simple answer is that I read some books about ecology as a child and realized that our civilization is predicated on the destruction of life. We literally destroy living things, everywhere, all the time.
(As an aside, I've never understood how people compartmentalize the world as "the environment" and folks who care about other [non-human] lives as "environmentalists", as if the environment is some object or fetish. Every breath is a bond.)
The only reason we haven't tanked already is due to the truly massive inertia and resilience of the living world. We are strip-mining the oceans of biomass and returning plastic. Our agriculture "mines" the soil and causes erosion.[0] Together with our meat animals we outweigh all other terrestrial animals by an order of magnitude.[1] I could go on, at great length.
Since my childhood, I've seen that the ecological destruction has only gotten worse. And, while some people have started to change their attitudes towards Nature, the bulk of humanity seems to be just as self-centered and destructive as ever. And now they are distracted by their phones.
Also, we are absurdly not-quite-smart. E.g. refrigerators that open like cabinets instead of drawers. Every time you open a fridge, the cold air spills out and is replaced by some warm air, and the fridge then has to cool that air off when you close the door. I can't begin to imagine the energy we could conserve just by changing that one stupid detail.
Everything is like that. I could go on, at great length.
You mention nukes...
> The most recent officially announced setting— 2 minutes to midnight —was made in January 2018, which was left unchanged in 2019 due to the twin threats of nuclear weapons and climate change, and the problem of those threats being "exacerbated this past year by the increased use of information warfare to undermine democracy around the world, amplifying risk from these and other threats and putting the future of civilization in extraordinary danger.”
https://en.wikipedia.org/wiki/Doomsday_Clock
So, um, yeah...
We have massive, serious problems and I don't see enough people and nations making the comprehensive changes that would be necessary to avert them.
[0] "Soil and Civilization" https://archive.org/details/SoilCivilization/page/n3 https://www.goodreads.com/book/show/14060428-soil-and-civili...
> Earth's LAND MAMMALS By Weight [[A graph in which one square equals 1,000,000 tons. Dark grey squares represent humans, light gray represent our pets and livestock, and green squares represent wild animals. The squares are arranged in a roughly round shape, with clusters for each type of animal. Animals represented: Humans, cattle, pigs, goats (39 squares), sheep, horses (29 squares), elephants (1 square). There are other small, unlabeled clusters also. It is clear that humans and our pets & livestock outweigh wild animals by at least a factor of 10. ]] {{Title text: Bacteria still outweigh us thousands to one--and that's not even counting the several pounds of them in your body.}}
I am reminded of the Quen Ho "localizers" from "A Deepness in the Sky"[1]. They're nanotech devices that provide useful sensor functionality, but they also have hidden features known only to a "programmer archaeologist" who exploits them to advance his plans.
But really the only thing it buys you is some speed over just pen and paper. (At least assuming you have trig, log, and probably some other tables from a standard math handbook. Which could presumably be derived in a manner I don't recall off the top of my head but likely very painfully.)