HNHacker News
TopNewBestAskShowJobs

bunnie

2,002 karma · joined March 9, 2013

submissionscomments
bunnie··on Building a Curve25519 Hardware Accelerator
You might be right about that concern, however, a lot of this work is done through public funding. Seems a little bit like double-dipping to get the public to pay for you to make IP that you then later sell to the highest bidder, with no obligation to share to the public.

Of course, if the professor was say, the NXP chair for crypto core excellence and they endowed her department with the understanding that all IP would belong exclusively to NXP, then sure, that would make more sense. I did not see anything like that, though, in the research groups' bio.

bunnie··on Building a Curve25519 Hardware Accelerator
The admonition runs through my mind all the time, too. I'm not qualified to implement Curve25519 entirely from scratch.

But, the good news is that this accelerates certain primitives within a Rust crate that was written by a cryptographer I personally know and trust; I think she's done a good job with the validation and test vectors, and she's been meticulous on documentation.

The theory is that as long as I don't break her tests, I'm probably OK. I did bump into some corner cases for correctness that might be extremely hard to catch in a random vector test bench, which I've noted in the post, but I do have some synthetic vectors that try to make sure I don't have a problem. I also tried hard to make sure I didn't introduce any new timing side channels; since all the ops are constant-time, hopefully I'm safe there.

So, I'm fully aware that I'm not perhaps the best qualified person in the world to build this. However, as I had mentioned elsewhere, my attempt to get source code from several research groups who have built such blocks met with no success. And also knowing how the silicon industry works, any "secure microcontroller" group peddling you some secret sauce closed source cryptoblocks likely were not designed to any level of scrutiny I would be satisfied with. Given the options of no acceleration, dubious closed source blocks, or trying to roll my own, I went with the latter, but with copious amount of documentation so that hopefully people smarter than me will have an easy time to review it for errors.

As a side note, in terms of things that I did implement for this system that should be cause for worry, I'd personally say the TRNG is the most worrisome, because TRNGs are full of scary footguns that are very exploitable. Then I'd worry about the AES instructions in the RISC-V core, the Curve25519 engine, and the SHA hardware accelerator in that order. I didn't write the AES instructions or the SHA accelerator, but I also haven't done a thorough review of them for things like timing side channels. I only rank the AES instructions as slightly more worrisome because I know those were implemented by a CPU architect without much input from cryptographers, whereas the SHA block comes from Google's OpenTitan project, which I would /hope/ was thoroughly reviewed but then again I'm just relying on the G-brand.

There is something comforting, though, to be able to know the provenance of your crypto primitives.

bunnie··on Building a Curve25519 Hardware Accelerator
Hi Jeremy!

So far only some anecdotal characterizations. Running the crypto core full-out on our wiggle-everything-to-see-that-it-works test vector suite adds 247mW +/- 5mW of power over the baseline idle condition.

This is fairly comparable to the power delta of loading our RISC-V core fully with a software task versus idling it (around 200mW).

So compared to the alternative of running the math on a RISC-V CPU core, we consume about 20% more power, but we complete the operation in 1/15th the time -- overall, it's a significant net savings of energy out of the battery pack.

Also, we do have the ability to completely gate the clock to the crypto blocks when they are not in use, so they don't contribute to any dynamic power during normal run time.

Static leakage then becomes the main concern. In the case of an FPGA, I suspect we're paying the static leakage penalty whether we use the logic or not, as they don't do VDD switching of configured domains on this chip. If this were to go to silicon, you'd either have to include circuitry to power off the block, bias the back side to reduce leakage, or just be willing to pay the static leakage penalty for the extra logic.

bunnie··on Building a Curve25519 Hardware Accelerator
Thanks! It's good to know I'm not alone in feeling this way.

This is actually an abridged version, if you click into the link for the "datasheet" (https://ci.betrusted.io/betrusted-soc/doc/engine.html) you can find all the gory details down to the register level...

bunnie··on Building a Curve25519 Hardware Accelerator
You're probably right. And assuming you are, then I think maybe the core problem may be that academics even tolerate the petty undercutting of reputation based not on the merit of the big ideas, but rather minor flaws in the proofs of concept.

There's also a problem in allowing papers to get away with making arbitrary claims that are by definition irreproducible. Every paper always includes some section about how many gates a design took up and how fast it ran -- but there aren't entirely consistent standards for reporting these things; it's often too easy to hide significant setup costs when running benchmarks.

This leads to an incentive to overstate results, because without any threat of checks it would be disadvantageous to not cherry-pick the absolute best numbers you could get through a peer review committee.

I get the desire to escape petty criticism: but it seems like a weak argument against the myriad of reproducibility and integrity hazards such a lack of transparency begets, especially for a line of work that ostensibly distinguishes itself on high standards for merit and integrity.

It also would have been nice to just receive a polite response of the form of "sorry, I don't support this anymore, I've moved on..." from anyone I had reached out to. Before starting on this project, I emailed four or five groups that had all published various papers on Curve25519 accelerators hoping to get even a broken non-compiling repo that could have helped me sanity-check my understanding of the thornier concepts presented in the papers.

Not even a single response...hence the motivation to write up notes and share them. Seems a waste of funding to have so many implementations, but no way to actually use any of them...

bunnie··on Dan Kaminsky has died
Dan will be missed. I am saddened by his passing and my heart goes out to his family.
bunnie··on Factoring 2048 RSA integers in 177 days with 13436 qubits and a multimode memory
I'm trying to make sense of the 'memory qubits' e.g. 'spatial modes' in the paper. Do you know if they are they a sort of...quantum flip flop?

Is this also a hypothetical structure, or have they been built and shown to be able to reliably store and retrieve quantum state in such spatial modes? 430 million is a much, much larger number than their headline 13436 qubits...

bunnie··on Student astronomer finds missing galactic matter
I'm pretty sure 'dark matter' candidates do include cold baryonic matter, it's just that in large part it's been ruled out due to a lack of observations exactly like the one reported here. The fact that we had not seen it, until now, did not definitely exclude it from the definition of dark matter; it just made it rather unlikely. In the absence of observational evidence, alternative, more exotic theories were developed.

The interesting question is how did this cloud form? One of the reasons, for example, that 'dark matter' can't be cold dead stars is that even if the stars were formed at the dawn of the universe, their remnants would still be warmer than the background temperature of the universe and thus we should be able to see them. Many other 'regular' baryonic sources were ruled out for similar arguments, eg, any process that could have created them would have imparted sufficient energy that we should be able to see it, or it would have been swept up into a star or formed a new star. The article did propose a mechanism, but I wish it went into it in more depth. Figuring out ways to explain the observation could lead to insights we had previously overlooked.

bunnie··on Synchronized violin players reveal uniqueness of human networks
> "Human networks behave differently than any other network we've ever measured," Fridman told The Jerusalem Post. "In a state of frustration, they don't look for a 'middle,' but ignore one of the inputs.

Huh. Maybe I'm reading too much into this, but it might imply a causal link between the overwhelming cacophony of modern media, and the breakdown of fact based discourse: faced with 'frustrated' (irreconcilable) viewpoints, it's the tendency of humans to simply ignore one of the inputs, and not seek the middle.

bunnie··on 5G Advocates Renew Attempts to Poach Wi-Fi’s 6GHz Spectrum
Can't agree more... 5G adoption hasn't been as fast as anticipated, and an easy fix to that problem is to give customers no choice but to upgrade to 5G by using regulatory mechanisms to prevent the roll out of potentially competitive upgrades.

Even if function wise they are different radios, consumers don't really know the difference - phone providers just need something new to pitch the next generation of handsets and wifi 6 could compete with 5G for being the 'it' upgrade on a generation of handsets.

"As long as a number goes up, it must be better...right?"

bunnie··on Why Is There a Bucatini Shortage in America?
Strangely, one of the first pasta casualties we noticed in Singapore was bucatini disappearing from the shelves here as well. Which has nothing to do with the FDA issue brought up in the article, but probably has to do with the comment in the article that pasta makers were reducing the output of less popular SKUs...hoping bucatini makes a comeback in 2021!
bunnie··on Precursor’s Custom PCBs
Weird, the site looks fine on my mobile...

It is a theme from like...almost 20 years ago. Minimalist, simple. I haven't been able to find a "new" theme that I'm happy with, they have too many features and too much javascript/PHP in them. But yah, I could see how this theme does not play nice with all combinations of mobile+browser.

bunnie··on Precursor’s Custom PCBs
I actually wanted to broaden the bandwidth of the planar inverted F antenna patch bit; it was too peaky and narrow. I experimented with about four or five variants of the logo until I found one that had the desired effect. So it is true, the peak gain is reduced by this, but the gain in bandwidth meant I had better average gain over the entire 2.4G band.

Unfortunately, I can't definitively explain why it was better beyond some theoretical platitudes -- in the end, it was literally a process of just making educated guesses and measuring stuff until I found something that worked.

I've tried modelling software in the past, but the results don't match well with measurement, and the paid licenses for modelling software are by far more expensive than the cost of copper tape and a good knife, and then running a few prototypes (and the free stuff I could find wasn't even close to meeting the task). Not to mention the time -- the sims take a long time to run, and building accurate models is also quite time consuming.

Sort of a dissatisfying reality, but that's how the sausage got made.

bunnie··on Apple unveils M1, its first system-on-a-chip for portable Mac computers
I note that the official press release from Apple does not mention ARM even once...
bunnie··on What is a System-on-Chip (SoC), and why do we care if they are open source?
thanks for reading them!
bunnie··on What is a System-on-Chip (SoC), and why do we care if they are open source?
Precursor is focused on applications that prioritize evidence-based trust over everything else. Thus it's envisioned that it could be useful for applications such as password managers, authentication token generation, secure comms and crypto wallets; but given its high price point it only makes sense for individuals at-risk to use it.

Thus it's overkill for your average user, but if you're a comptroller with million-dollar signature authority on corporate bank accounts or a journalist operating in hostile situations it could be worth the cost.

bunnie··on What is a System-on-Chip (SoC), and why do we care if they are open source?
Thanks for pointing that out. Yes, the $1mm number I cited in my post is the estimated raw cost of a full mask set for a relatively modern process in the 2Xnm or smaller range.

Definitely older processes have much cheaper mask sets -- in part because there are just fewer metal layers, and fewer & cheaper masks required to image the transistors when the wavelength of light used (193nm) is close to the line width of the devices themselves.

bunnie··on What is a System-on-Chip (SoC), and why do we care if they are open source?
It's a bit like trying to detect whether you are running in a virtual machine or not. You can't trust a chip to run a piece of code to introspect on itself; instead a more reliable characterization of a chip may come from examining how it fails when you throw it stuff that is out-of-spec.

For example, glitching the clock may lead to a repeatable behavior that could only be produced if no additional circuitry has been added to the critical path that leads to the glitch.

bunnie··on What is a System-on-Chip (SoC), and why do we care if they are open source?
I'm also worried about this, which is part of the reason why the Precursor design avoids using hard IP blocks like RAM and USB controllers. It does limit the performance of the system (we have a simple async RAM interface and full-speed USB only), but the explicit priority is transparency over performance.

The main attack surfaces to worry about when translating this design to an IC are the RAM, boundary scan and eFuse macros, and perhaps slightly less so the PLL and ADC blocks. While these are not trivial blocks to be worried about, there may be things we can do at a design level to complicate attempts to bake back doors into these blocks, and we're investigating methods to verify their correct in-silicon construction non-destructively.

bunnie··on Tokyo Stock Exchange Blackout: One Piece of Hardware Took Down a Market
From the article:

"When the error happened, the system should have carried out what’s called a failover -- an automatic switching to the No. 2 device. But for reasons the exchange’s executives couldn’t explain, that process also failed. That had a knock-on effect on servers called information distribution gateways that are meant to send market information to traders."

bunnie··on Precursor – A mobile, open source electronics platform
We've got a curve25519 accelerator for the reference hardware: https://ci.betrusted.io/betrusted-soc/doc/engine.html
bunnie··on Precursor – A mobile, open source electronics platform
This project is definitely security-first. That being said, we're defining "hackability" as "empowerment to hack". For example, this is one of the few platforms where you can hack the CPU itself by adding new instructions to it.
bunnie··on Precursor – A mobile, open source electronics platform
Thanks for the enthusiasm! I happen to be up really late tonight, but I'm going to bed soon. Thank you for the support and kind words.

The accelerometer is the LSM6DS3, I'll refer you directly to the manufacturer's website: https://www.st.com/en/mems-and-sensors/lsm6ds3.html

You can find out more about how it's integrated at https://github.com/betrusted-io/betrusted-hardware/blob/mast... (note: this is a "DVT" schematic, bugs were found, they are currently being fixed, but they aren't related to the accelerometer).

The TL;DR is that the accelerometer is integrated so that it's in the "always on" untrusted domain, so to access it from the main FPGA "SoC" you have to go through the system controller FPGA ("EC" as we call it). The idea is for it to be available in power down states for anti-tamper, hence the extra layer of complication.

Talking to it requires a call to the EC via the "COM" bus (https://github.com/betrusted-io/betrusted-soc/blob/master/fw...). The EC driver itself is based on the C-native library provided by STM and translated into Rust bindings. It's a little gross: https://github.com/betrusted-io/betrusted-ec/blob/master/sw/...

Hope that helps.

bunnie··on Precursor – A mobile, open source electronics platform
I'll be writing an article on this in the future, and you're right, the keyboard was a serious pain to build. It's one of the big reasons it took two years to bring the product to this state.
bunnie··on Precursor – A mobile, open source electronics platform
There is no change of stance, but there is a subtlety. The hair to split here is that between "security" and "trustability".

I'm defining "security" to include the ability of a device to keep a secret after it's been verified and provisioned. This is also known as "tamper resistance".

I'm defining "trustability" as the ability of one to draw the conclusion that the device in front of you is in fact the device you think it is. It's an essential pre-requisite for security, but it is not identical to "tamper resistance", which is probably what more people expect when they hear the word "security" (that is, security sounds more like a bullet proof vault than a correctly constructed system).

From the trustability standpoint, even a sophisticated technologist will typically have no evidence-based reason to trust any given chip, because they likely have no tools on hand that can verify its correct construction without simultaneously destroying the chip. For example, not many people have a ptychographic x-ray system at home.

On the other hand, you may have some reason to trust an FPGA, because with the tools in your home you can craft your own bitstreams and designs that incorporate countermeasures to potential exploits buried in the FPGA. It tips the balance of power from a "hands up I surrender" situation to a cat-and-mouse game. Furthermore, there is a limit to how deep the rabbit hole can go, because with sufficient countermeasures the circuitry required to backdoor the design without detection becomes larger than can fit within the raw size of the FPGA's silicon.

Thus, an FPGA is "more trustable" than an ASIC in the sense that there is any direct evidence-based reason at all for trusting it.

However, an FPGA is not necessarily more tamper-resistant than an ASIC. If your adversary has full physical possession of your device and has no regard to leaving it intact, then they have a number of venues to attack both the FPGA and the ASIC.

What this statement implies is that a properly designed ASIC will generally raise the bar on how hard it is to extract secrets compared to an FPGA, assuming an adversary with direct physical access to the device and no regard to evidence of tampering with the device.

More importantly, however, the ASIC will be cheaper. That is really the main point of that statement.

bunnie··on Precursor – A mobile, open source electronics platform
I agree this would be cool, and the good news is that systems close to meeting your wishes already exist today.

However, Precursor is more about evidence-based hardware security, and less about features and usability. To better understand the principles behind Precursor's design, please have a look at https://www.crowdsupply.com/sutajio-kosagi/precursor/updates....

The TL;DR is that it's a development platform for applications that strongly require secure and/or trustable hardware.

bunnie··on Precursor – A mobile, open source electronics platform
The iCE40UP5K is not the main processor. It's the embedded controller. Think of it as a power management coprocessor that takes care of things like managing the battery while the main CPU is asleep. It is packed to the gills, but the iCE40UP5K is low enough power to remain on and not drain the battery for several days.

The main CPU is a Spartan7 XC7S50, which has plenty of space for things like crypto accelerator cores beyond the primary RISC-V CPU.

bunnie··on Precursor – A mobile, open source electronics platform
thanks, fixed.
bunnie··on Scientists rename human genes to stop MS Excel from misreading them as dates
Think of the flip side: Programmers are terrible biologists.

Sure, it would be great if we all had more time to learn how to code. Coding is important. But I'd say the onus should be on coders to build better tools and documentation so they are empowering people to do something other than code, rather than reduce everything to a coding exercise because making everything look like code means less boring documentation and UX work for coders.

I mean, biology is in fact a full on degree program and you pretty much need a PhD before you're defining an original research topic. It's not because biologists are dumber and learn slower. It's that biology is complicated and poorly understood, and it takes years to learn.

Contrast this to coding... you don't even need to go to college to launch a successful software product, and the average person can became proficient after a few years of dedicated study. However, this is a few years that biologists don't have, as their PhDs are already some of the longest time-wise to finish.

The decision to rename genomes is totally consistent with the biologists MO: if a cell won't grow in a given set of conditions, change the conditions. Sure we can CRISPR edit the genes to modify a cell to to grow in a set of conditions, but if it's usually far easier to just change the temperature or growth media than to edit a cell's DNA.

My take away is that this is more a failure of programmers and/or a failure of their managers to guide the programmers to make tools for biologists, than of biologists to learn programming. Sure, coders get paid more, but they aren't going to cure cancer or make a vaccine for covid-19 without a biologist somewhere in the equation. And I'm glad the biologists developing vaccines today are doing biology, and not held up in their degree programs learning how to code!

bunnie··on On Contact Tracing and Hardware Tokens
It is creepy and a valid cause for concern. However, one of the redeeming features of a hardware token (vs. a phone app) for contact tracing is that eventually, the battery goes dead and the token is useless. So even if you forget to deactivate the token after the 'all-clear', within a matter of months the entire network goes dark.

To clarify, it'll probably be a small miracle if the 1000mAh battery in the token lasts a full year...probably more like 6 months is a realistic lifespan for the token absent a battery replacement.

← PreviousPage 6 of 7Next →