8 ms·
UC Berkeley to build open-source secure enclave using RISC-V
- detaro 8y agopreviously: https://news.ycombinator.com/item?id=18616285 https://news.ycombinator.com/item?id=18616285
- jiveturkey 8y ago> This is a game changer for security. uh, no. it might be a game changer for open source, though. maybe.
- judge2020 8y agoYa, secure enclaves have been available for a while now (and for decades in the form of HSM's), but AFAIK none have been open source.
- cyphar 8y agoIt should be noted (and this is one of the biggest concerns with open hardware) is that you often cannot change said hardware -- after all it's a physical object. But this means that if the hardware has keys baked into it which you cannot change, it can be rendered non-free even though you have the chip design. So while secure enclaves will be very useful for many things, and I am hoping we can get some even more ambitious uses of secure enclaves, I would be very wary if industry starts reinventing Intel's BootGuard with RISC-V (which has Intel's firmware keys burned into hardware -- rendering free firmware impossible to use on such platforms). All that's necessary is a way to enroll new keys, and when new keys are enrolled all the secure storage is wiped. This allows for free use of your own hardware, while also keeping secrets safe from attackers.
- excalibur 8y agoUmm, I'm pretty sure it has that? Why would you make an HSM with a set of predefined unchangeable keys, that's retarded.
- gmueckl 8y agoNo, this is actually not retarded if you need to store program code externally and want to make sure that this code is unaltered. The XBox 360 early boot did this as an anti-piracy measure IIRC: a minimal on-chip program would load and verify the first couple of blocks of externally stored firmware before executing them.
- excalibur 8y agoYes, if you the manufacturer want to make sure that nobody but you can alter the data. If you're providing cryptographic hardware for somebody else, they're gonna want to set their own.
- deleted 8y ago[deleted]
- gmueckl 8y agoIf you do this, you weaken your device against hostile tempering as well, don't you? The key update mechanism becomes part of the attack surface.
- excalibur 8y agoYes, but if implemented in a secure manner the key update mechanism presents a smaller risk than that of a hardcoded key becoming known to an adversarial party.
- lclarkmichalek 8y agoIn my experience, that's not usually a requirement. From an implementation perspective, you just say 'this certificate is the root' and trust it explicitly without needing access to the key on the HSM. From a security perspective, adding the ability to set your own key is a risk (adds RW storage to a previously immutable system, changes the model from 'no one ever sees the key' to 'no one ever sees the key as long as it was written correctly and any non hsm stored copy is deleted'), and doesn't really improve the security of the system - you trust the HSM manufacturer already, seeing as it's their hardware.
- wyldfire 8y agoTagged memory is the biggest game changer for security IMO. RISC-V has a proposal IIRC, but ARM has a product (ARMv8.5) that looks like it will really raise the bar.
- anonymousDan 8y agoCan you point me to some resources on this?
- wyldfire 8y agoARM: https://community.arm.com/processors/b/blog/posts/arm-a-profile-architecture-2018-developments-armv85a https://community.arm.com/processors/b/blog/posts/arm-a-prof... RISC-V: https://www.lowrisc.org/docs/tagged-memory-v0.1/tags/ https://www.lowrisc.org/docs/tagged-memory-v0.1/tags/ You can think of this feature like a hardware ASan. Instead of using ASan as a design tool, you could use it as a security feature. Capitalizing on this feature requires compiler and C lib changes. I'd bet that the support should be available in popular open source compilers before ARM ships.
- anonymousDan 8y agoThanks, they look pretty interesting. Do you know what granularity the ARM tagging supports (e.g. byte level)? Would be interesting to see performance numbers - although I guess the hw is not available yet?
- wyldfire 8y agoIIRC the ARM tagging would protect ~8 (maybe 16?) byte regions. More info on this is at [1] [2] -- note that some of this discusses a software-only approach (with likely higher performance impact). I think the majority of performance cost for HW Asan will come from the additional bits stored to memory, but it was "modest" (< 5%?). A couple of additional CPU instructions during memory allocate and free, these are probably of negligible impact. [1] https://arxiv.org/abs/1802.09517 https://arxiv.org/abs/1802.09517 [2] https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html https://clang.llvm.org/docs/HardwareAssistedAddressSanitizer...
- deleted 8y ago[deleted]
- LeifCarrotson 8y agoTechnology cannot stop hackers but let authorized users if humans are still vulnerable to "You have a request from SexyMama69, enter your password to recieve video call" and other forms of social engineering. Secure enclaves are only really useful at allowing people who don't own the device from preventing those who do own it from taking certain actions.
- yoklov 8y agoThey're used for more than that, but I agree it's unfortunate that DRM is a major use case.
- TeMPOraL 8y ago'LeifCarrotson didn't say "DRM", though it's kind of implied as a part. Third parties preventing device owner from operating the device is a cornerstone of information security, justified by observing that regular folks are very prone to selfpwning themselves if a little of social engineering is applied (+ it's hard in general to distinguish user-initiated actions from sofware-initiated ones). It's important to remember that legit security needs and user freedoms start to be in conflict pretty much as soon as the device in question gets connected to the Internet.
- userbinator 8y agoAlso known as "authoritarianism", and the security community seems to be full of it. After all, isn't it more secure if the user can't do anything at all and the device controls the user? Let's not forget that DRM also goes beyond preventing consumption of media (although that is a big application) --- it can be, and is, also used to force users to accept unwanted behaviour of software. Win10's deeply embedded telemetry is one example: It would be relatively easy to patch out if it weren't for the files being signed and "protected" by "secure" boot, and the constant barrage of updates (not all of which are for fixing remote unattended attacks, IMHO the ones which are actually important.) The situation is much worse on mobile devices.
- 8y ago
- Lind5 8y agoalso addressing this Open-Source RISC-V Hardware And Security https://semiengineering.com/security-and-open-source-hardware/ https://semiengineering.com/security-and-open-source-hardwar...
- badosu 8y agoNo. I recommend using the original title: "RISC-V Will Stop Hackers Dead From Getting Into Your Computer" Even though it's still very fallacious.
- foobiekr 8y agoMy guess is that this is true as an accident but once they have real market traction they honeymoon will be over since it is very likely that the tools and software will have substantial bugs early on, not even including hardware errata; one of the Intel/AMD/POWER strongpoints is that they have huge verification libraries that RISC V vendors will not have. A slightly different memory model will also expose issues that happen to work on x86.
- TickleSteve 8y agoHardware Security Modules (HSMs) are in plentiful supply, they're not new and the OP seems to have swallowed a bit of the Apple KoolAid from the description of the M7 being 'revolutionary'. This is simply another HSM implementation, and no, they don't stop hackers, there are plenty other exploits to go for. (For one example hhttps://www.nxp.com/products/identification-and-security/security-controller-ics:MC_71108 https://www.nxp.com/products/identification-and-security/sec...)
- srcmap 8y agoI was brainwashed by the "Security Now" podcast --- I will trust the HSM that is open to any security researchers to do extensively study/review more than typical "security by obscurity" implementations.
- jiveturkey 8y agothis is a far cry from an HSM. an HSM provides much better protection than an enclave, but it can do much less.
- orionblastar 8y agoBeing a different platform means that hackers will have to adapt to it. That was the argument of the Macintosh it didn't get Windows viruses because it wasn't Windows.
- jchw 8y agoCool. HSMs are a notable step up from secure execution environments like TrustZone and SGX because they make side-channel attacks that take advantage of the shared hardware much more difficult. That said, the HSM itself becomes a target after a while. So the more stuff you off-load to your enclave, the larger the attack surface becomes, and now you moved your problem over. And I am further skeptical about how much this improves on the status quo. Apple delivered a secure enclave that was essentially a blackbox. Google delivered one and is open sourcing the firmware at some point (apparently.) Now, this is going to give us an enclave with open source hardware. But in a world where there are known, novel attacks against the integrity of microchips that would make it difficult to verify even in the presence of microscope images of a decapped chip, I'm not sure if this really gives us that much reassurance that the chip does what it says. And if it did, we would never know for sure that it is free of security-sensitive bugs. I still think this is great. Again, step above SGX and TrustZone in my opinion. But, this article makes it sound like a panacea, which I don't think is the case. (Case in point: people have successfully attacked devices secured with enclaves, including iPhones and I assume Pixel. Doesn't matter how bad ass your gate is if it isn't surrounded by an equally strong fence. These devices should keep encryption secrets secure, but they don't 'stop hackers.')
- anonymousDan 8y agoHSMs have been around for donkey's years. SGX is interesting because now you can run e.g. a whole database inside an enclave on commodity CPUs with competitive performance.
- mtgx 8y agoArm has already announced crypto-processors, which I assume aren't very expensive. Every chip maker could use one as an HSM now. https://developer.arm.com/products/system-ip/security-ip/cryptoisland-family https://developer.arm.com/products/system-ip/security-ip/cry... https://developer.arm.com/products/system-ip/security-ip/cryptocell-700-family https://developer.arm.com/products/system-ip/security-ip/cry...
- 8y ago
- hexo 8y agoNo it will not.
- ctwentz 8y agoIsn't this highly similar to MIT's Sanctum from 2015, also open source and ignoring the hardware changes needed to make meaningful guarantees about sidechannel attack robustness? Useful if you want to avoid hardware mods, but the enclave model is not new. https://eprint.iacr.org/2015/564.pdf https://eprint.iacr.org/2015/564.pdf and open source code via MIT license here: https://github.com/pwnall/sanctum https://github.com/pwnall/sanctum
- nickik 8y agoWell its the next evolution by many of the same people.
- jasonmoo 8y agoPlug alert: I am working with a company that's building a full representation of the Sanctum system using custom extensions of RISC-V (https://eprint.iacr.org/2015/564.pdf https://eprint.iacr.org/2015/564.pdf). There are critical features like root of trust key and entropy generation, and cache isolation that are missing from the vanilla RISC-V keystone approach. It offers a measure of security worth having but we're taking it all the way. We're working with MIT prof Srini Devadas. You can read more about it here if you're interested: https://medium.com/gradient-tech/announcing-gradient-crypto-processor-the-gradient-network-23ad2b441644 https://medium.com/gradient-tech/announcing-gradient-crypto-... Also we're hiring! https://www.gradient-tech.co/jobs https://www.gradient-tech.co/jobs
- ccamrobertson 8y agoThat's great - will it be open sourced in some way? SiFive demonstrated RISC-V secure boot using (closed) Rambus IP for the RoT.
- ctwentz 8y agoSome version at least will be yes. RE: RoT + RISV-V, cache isolation appears missing here, so sidechannel attacks using cache timing and other methods still work
- ccamrobertson 8y agoAwesome! It was unclear to me where the Rambus IP began and SiFive's core took over in the demo. Keystone using existing RISC-V extensions is exciting to see, but it's frustrating that the Hack a Day article seems to confound where it begins and ends (at least today). The Keystone presentation notes that the RoT is derived from Sanctum and their docs indicate that you need to bring your own entropy and key storage, neither of which are made clear in the blog post.
- laburn 8y agoI don't understand how this differentiates itself from ARM TrustZone. You can already create a system with a dedicated HSM and run your own trusted operating system using the features of the processor. With Intel SGX you are somewhat stuck with using the HSM provided by Intel. With the BSD-licensing aren't we left in the same place as ARM processors, with the exception of producing a RISC-V processor being less expensive with regard to licensing?
- jiveturkey 8y agoIs TrustZone open source? It's in TFA, the differentiator is that this is open source. Enclaves per se have existed for a long time now.