Remember the Spectre and Meltdown security exploits from last year? Intel and AMD really hopes you don’t. Despite what they want you to believe, these speculative execution exploits aren’t going away, at least not with the solutions proposed so far.
Instead of trying to fix each variant that comes along, a permanent fix will require a fundamental change to how CPUs are designed. The proposition? A “secure core” that makes sure your data stays safe from attackers, no matter what bugs they might try to exploit.
It might not be the route these large processor companies want to take, but it might be the only one that actually works.
Starting from the root
When a new generation of processors is launched, the first question on anyone’s lips is, “how fast is it?” More megahertz, more cores, more cache, all to make applications run faster and games perform better. Secondary considerations might be power requirements or heat output, but rarely does anyone ask about security.
The problem with that is that the performance enhancements of the past few years have mostly been driven by speculative prediction, that is CPUs taking a guess at what you’re going to do next and readying everything you might need for it. That’s great for performance, but as Spectre and its variants have shown, it’s terrible for security.
“Speculative execution has been a performance optimizing feature of CPUs for a long time now,” Malwarebytes senior security research, Jean-Philippe Taggart told Digital Trends. He explained how it’s that very feature that makes Intel and others’ CPUs vulnerable to Spectre and similar attacks. “CPU architecture will need a serious rethink, to either retain these performance enhancements, but protect them from attacks such as Spectre, or do away with them entirely,” he said.
“It’s hard in security if you’re always being reactive, having to wait for security vulnerabilities and then fixing them”
One potential solution is to add a new piece of hardware to upcoming generations of CPUs. Instead of handling sensitive tasks (that make such attacks worthwhile) on high horse-power processing cores, what if chip makers combined those cores with an additional core that is specifically designed with such tasks in mind? A security core.
Doing so could make Spectre and its variants a non-issue for new hardware. It wouldn’t matter if the main CPU cores of tomorrow were vulnerable to such attacks, because private or secure information wouldn’t be handled by those cores anymore.
This root of trust concept is more than just a rough outline. In some cases, it’s already a viable product and all major chip companies like Intel or AMD would need to do to take advantage of it, is to adopt it.
“It’s hard in security if you’re always being reactive, having to wait for security vulnerabilities and then fixing them,” Rambus’ senior director of product management, Ben Levine told Digital Trends, when asked about ongoing Spectre variant threats. “That problem of trying to make a complex processor secure is really the hard way. That’s where we came up with the approach of moving security critical functionality to a separate core.”
Although not the first to suggest such an idea, Rambus has refined it. Its CryptoManager Root of Trust is a separate core that would sit on a major CPU die, a little like the big.little concept found in many mobile processors and even Intel’s own new Lakefield design. Where those chips use smaller cores for power savings though, a secure core root of trust would focus on security above all else.
It would combine a processor without the speculation aspects of major CPUs, with accelerators for cryptography, and its own secure memory. It would be a relatively simple design compared to the monstrous general purpose CPUs that run our computers today, but in so doing would be far more secure.
In protecting itself, the secure core could then take on the most sensitive tasks an otherwise general purpose CPU core would typically handle. Securing encryption keys, validating banking transactions, processing login attempts, storing private information in secure memory, or checking boot records haven’t been corrupted during startup.
“… Those operations are relatively slow to do in software, but a security core can have hardware accelerators to do that much faster.”
All of this could help improve the general security of a system that utilized it. Better yet, since it would lack speculative performance enhancements, it would be entirely secure against Spectre-like attacks, invalidating them. Such attacks could still be levied against the main CPU cores, but since they wouldn’t handle any data that would be worth stealing, it wouldn’t matter.
“The idea is not to come up with one CPU that can do everything to be very fast and be very secure, but let’s optimize different cores separately for different objectives,” Levine explained. “Let’s optimize our primary CPU for performance or lower power, whatever is important for that system, and optimize another core for security. We now have these two separately optimized processing domains and do processing in whichever of those is the most appropriate given the characteristic of the calculation and system in mind.”
Such a core would operate a little like the T2 coprocessor chip Apple introduced with its iMac, and later implemented in its 2018
Security, but at what cost?
It’s often said that complexity is the enemy of security. That’s why the secure core design Rambus proposes is relatively simple. It’s not a big, monstrous chip with multiple cores and a high clock speed like typical CPUs found in desktops or laptops.
So, does that mean we’d be sacrificing performance if such a core were to be used alongside a modern chip? Not necessarily.
The important take home from the idea of a secure core, whether it were Rambus’ CryptoManager Root of Trust, or a similar design from another firm, is that it would only perform tasks that were focused on privacy or security. You wouldn’t need it to take over feeding your graphics card during a gaming session, or tweaking images in Photoshop. You might prefer it to handle encrypting your messages over a chat app though. That’s where the specialized hardware could hold some benefits beyond security.
“Things like cryptographic algorithms, encrypting or decrypting from an algorithm like AES, or using a public key algorithm like RSA or elliptic curve, those operations are relatively slow to do in software, but a security core can have hardware accelerators to do that much faster,” Levine said.
“We’re shooting for simplicity and if you keep something simple you keep it small. If it’s small it’s low power.”
That’s something that Arm’s head of IoT security, Rob Coombs very much agrees with.
“Typically root of trusts will build in a crypto accelerator, so that takes a little bit more silicon, but the upside to that is that it’s higher performance for things like crypto functions, so you’re not relying on just the processor to perform regular encrypting of the file,” he said. “The processor can set it up and then the crypto engine can munch through the data and encrypt or decrypt it. You get higher performance.”
Modern processors from the likes of Intel do have crypto-accelerators of their own, so there it may not be the case that the encryption or decryption would be fundamentally faster than a general purpose CPU completing the same task, but it could be comparable.
Although Coombs did highlight in his chat with us that a root of trust core would require a little bit of extra silicon to produce, the cost of doing so on other important factors like the price of manufacturing, the power draw of the chip, or its thermal outputs, would be mostly unaffected.
Rambus’ Ben Levine agreed.
“The security core is just tiny by comparison to everything else,” he said. “There’s really no significant impact on the cost of the chip, power, or thermal requirements. You can do a lot in a pretty small logic area if you design it carefully. We’re shooting for simplicity and if you keep something simple you keep it small. If it’s small it’s low power.”
His only caveat was that in smaller, lower power devices like those used in IoT, Rambus’ secure core would have a greater impact on power and cost. That’s where Arm’s more modular approach could come in.
Big, little, and secure
Arm was an early pioneer of the idea of big.little CPUs, or big cores and little cores in the same processor. Today it’s a common feature in mobile devices from Qualcomm and Apple too. It sees larger CPU cores used for heavy lifting as and when required, while smaller cores handle the more common tasks so as to save on power. Arm’s approach builds on that idea to build root of trust into main chips, as well as much smaller microcontrollers for use in a wider array of devices.
“We’ve defined something called a PSA (platform security architecture) root of trust with some essential security functions built in like cryptography, secure boot, secure storage; Every IOT device will need these,” Coobs explained to Digital Trends.
Of all the major chip makers, Arm was arguably the least affected by Spectre and Meltdown. Where Intel was vulnerable to the broadest swathe of potential attacks and AMD had to release a number of microcode and software tweaks, Arm was able to shore up its already robust defenses before speculative execution bugs were revealed.
Now Arm is focusing its efforts on securing the internet of things. Coombs believes that a secure core, root of trust is one of the best ways to do that and he wants to see every IoT device implement such a system. To help achieve it, Arm offers open source software, developmental guidance, and hardware solutions for the security problems faced by today’s IoT developers.
.. A lot of the use of the security core will be done at the OS and system level and not at the application level
“We’ve created an open source and reference implementation and now with PSA certified we’ve created a multi-level security scheme [where] people can choose the security robustness they need,” Coombs said. “Different systems need different amounts of security. We want to make that fit for the IoT space.”
Applying these principles to larger, general purpose CPUs found in laptops and desktops, the end result wouldn’t be drastically different. While such chips wouldn’t have the little cores alongside their big ones, they could implement a secure core on die without too much difficulty, according to Rambus’ Ben Levine.
“These cores should be and need to be much smaller than one of the main big CPU cores that you get in a chip from Intel or AMD,” he said. “It won’t be seven plus one, it will be eight or whatever core processor and one or perhaps more than one, small security core that provides security functions for all of the other cores.”
Crucially too, such cores wouldn’t even be complicated to implement.
“We’re not going to add much to the chip design cycle of getting a new chip into a consumer product,” he said. “Our impact is going to be pretty minimal. It’s just going to be the normal product life cycle of getting a chip architecture development into production, then into shipping products.”
Bringing it to the masses
Security can be a chicken and egg issue, with developers not keen to implement it without a specific need or demand from customers. But if hardware manufacturers were to combine their existing CPU cores with a secure core root of trust, the job of software developers would be a relatively easy one.
“Depending on the application, a lot of the use of the security core will be done at the OS and system level and not at the application level,” Levine explained. “If you’re building your OS and your overall system software correctly then you can utilize most of that security functionality without application developers having to worry about it. You can provide APIs to expose some of the security core functionality that could easily be consumed by the application developer like encrypting and decrypting data.”
By incorporating the root of trust in the hardware itself, and leaving the onus on implementing it to operating systems, software developers could swiftly benefit from the added security that it could bring to all facets of computing, including avoiding the pitfalls of Spectre and its ilk.
This could be where companies like Intel and AMD have been going wrong so far. While their patches, microcode fixes, and hardware tweaks have helped mitigate some of the problems of Spectre-like attacks, they all come with their own pitfalls. Performance has been degraded and in many cases the optional patches aren’t applied by device manufacturers because they don’t want to lose the power arms race.
Instead, Rambus, Arm, and others, are looking to dodge the issue entirely.
“We’re not claiming that we’re fixing Spectre or Meltdown, what we’re saying is first these exploits are not the only vulnerabilities out there,” Levine said. “There will always be more. The complexity of modern processors makes that inevitable. Let’s change the problem and let’s accept that there will be more vulnerabilities in general purpose CPUs and the things that we care a lot about, like keys, credentials, data, let’s move it out of the CPU and let’s bypass the whole problem.”
This way, users can trust that their system is secure without having to sacrifice anything. The root of trust hardware means that any data that is stolen away is useless to anyone. It leaves the ghost of Spectre in the shadowy realm of redundancy, where it can continue to haunt those using old hardware. But as people upgrade to new, root of trust-equipped future generations of hardware, it would become increasingly irrelevant and far less of a concern.