News for hackers. Stuff that matters.
Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by geerlingguy on Wednesday August 04, 2021 @11:41AM (#28062296)
To be clear, the blade adds TPM 2.0 via an Infineon chip, and you can interact with the chip, but features like secure boot require bootloader-level integration, and at this time, since no other Pi hardware has TPM, the Pi's closed-source bootloader doesn't support it.

Also something interesting to noodle on: technically the Pi 4/CM4/Pi 400 have ECC RAM [1] — but some ECC functionality may require CPU-level integration... which I'm guessing isn't present on the Pi's SoC (but who knows? I posted this forum topic asking for clarification: [2]).

[1] Product brief mentions LPDDR4 with on-die ECC: https://datasheets.raspberrypi.org/rpi4/raspberry-pi-4-produ...

[2] https://www.raspberrypi.org/forums/viewtopic.php?t=315415

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by formerly_proven on Wednesday August 04, 2021 @02:17PM (#28064344)
On-die ECC means that the DRAM array in the chip stores ECC and the chip itself handles that transparently. The interface does not use ECC in this case. One of the reasons this is done is higher cell densities (just like in storage) and allowing longer refresh intervals (refreshing requires power regardless of usage).
Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by Stampo00 on Wednesday August 04, 2021 @01:04PM (#28063487)
The inclusion of TPM is definitely the most interesting aspect of this to me. I was initially turned off by the idea because I tend to associate them with nasty enterprise-y DRM types of stuff.

But I wonder why it's included here. Maybe for secure storage of private keys? I'm guessing that's the desired purpose for TPM in a server setting.

Obviously I'm not super familiar with TPM. I wonder if it can be used for things like better random number generation or hardware-accelerated hashing. I'm guessing if it supported hashing from userspace, the cryptocurrency crowd would have been all over it already.

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by duskwuff on Wednesday August 04, 2021 @04:15PM (#28065737)
> I wonder if it can be used for things like better random number generation...

Too slow to be useful, and the BCM283x SoC already has an internal RNG:

https://github.com/torvalds/linux/blob/master/drivers/char/h...

> ... or hardware-accelerated hashing

The TPM is on a really slow bus (33 MHz, 4 bits, tons of wait states). Even without any hardware acceleration, hashing on the CPU is much faster.

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by staticassertion on Wednesday August 04, 2021 @07:51PM (#28067956)
You wouldn't hit a TPM every time you wanted a random number. Your OS would just use it when it wanted to seed its entropy pool.

This is particularly useful at boot when entropy is very low.

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by megous on Wednesday August 04, 2021 @03:47PM (#28065398)
TPMs are just SPI connected devices. You can add them to any SBC.

Hardware accelerated hashing would be severely limited by the SPI bus speed.

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by simcop2387 on Wednesday August 04, 2021 @03:19PM (#28065049)
I believe the 2.0 standard does support rng, but I;m not sure of the specifics. there might be some hashing functionality but the interface is going to be too slow for large data. I think it;s there to do integrity checks for bootloaders and such
Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by fakesheriff on Wednesday August 04, 2021 @12:53PM (#28063326)
Without bootloader integration, what's the difference between adding a TPM vs an HSM like [0]? Does TPM just have a more standardized interface?

[0] https://www.zymbit.com/2020/11/10/blog-security-module-raspb...

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by geerlingguy on Wednesday August 04, 2021 @01:05PM (#28063500)
You can actually add both—there's a partial GPIO header for the Zymkey 4i on the board.

But yeah, I think the idea is TPM is a bit more standardized across hardware, so some software that uses it would not need any tweaks to run on the Pi with a TPM built-in.

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by gruez on Wednesday August 04, 2021 @01:23PM (#28063723)
>But yeah, I think the idea is TPM is a bit more standardized across hardware

But there are USB HSMs, along with smart cards (which are also HSMs). Aren't those pretty standard?

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by tadfisher on Wednesday August 04, 2021 @02:01PM (#28064168)
Sort of; the communication protocol is standard (CCID), but the actual HSM interface varies. Yubikeys implement the OpenPGP smartcard interface, for example, as well as PKCS #11.

The TPM specification has its own crypto interface that is standard across all hardware, so you can do things like generate a key and perform crypto operations without requiring the hardware implement a particular interface beyond whatever TPM version you require.

There are advantages and disadvantages to both approaches. On Linux, TPMs are implemented in the kernel, and CCID is handled by userspace drivers.

Re:Uptime Lab's CM4 Blade Adds NVMe, TPM 2.0 to Raspberry Pi by pmorici on Thursday August 05, 2021 @01:32AM (#28070216)
The Zymbit is trying to make up for the lack of secureboot/tpm integration on the Pi by securing the enclosure and monitoring that perimeter.