Hacker News new | ask | show | jobs
by Havoc 1373 days ago
Am I right in thinking that this is basically like a yubikey except with openness as key differentiator?

Or is it’s function something else ?

5 comments

The Tillitis Key is a new kind of USB security key inspired by measured boot and DICE.

Tillitis Key’s design encourages developers to experiment with new security key applications and models in a way that makes adoption easier and less risky for end-users.

It offers both security and flexibility by being end-user programmable while also preventing applications loaded onto the device from knowing each other’s secrets. During use firmware on Tillitis Key derives a unique key for each application it runs by measuring it before execution. This is done by combining an application’s hash value with a unique per device secret. Applications are loaded onto the device from the host computer during use, and are not stored persistently on the device.

A user- or host-supplied secret can also be mixed into the key derivation function, providing further protection. A sophisticated physical attacker should be assumed to have knowledge of the target application’s hash, and will likely eventually succeed in extracting the UDS from the hardware. By adding a host-supplied secret, knowledge of the application used as well as the security key’s UDS is not sufficient to produce the application secret. This makes the security impact of a lost or stolen Tillitis Key less than for conventional security keys.

Device applications can be chain-loaded where the first application stage hands off its secret to the second stage. This improves user experience as it makes it possible for the application secret (and its public key) to remain the same even if a device application is updated. It also enables developers to define their own software update trust policies. A simple first-stage application might do code signing verification of the second stage, whereas a more advanced one will require m-of-n code signatures, or a Sigsum inclusion proof. Sigsum was designed with embedded use cases in mind.

Tillitis Key is and always will be open source hardware and software. Schematics, PCB design and FPGA design source as well as all software source code can be found on GitHub.

https://www.tillitis.se

https://github.com/tillitis/

(Full disclosure: I'm Fredrik Stromberg, cofounder of Mullvad VPN and co-designer of Tillitis Key)

What is DICE? I’m searching but the only results are the company and not whatever you’re referring to
https://trustedcomputinggroup.org/work-groups/dice-architect...

> The DICE Architectures Work Group is exploring new security and privacy technologies applicable to systems and components with or without a TPM. The goal is to develop new approaches to enhancing security and privacy with minimal silicon requirements. Even simple silicon capabilities combined with software techniques can establish a cryptographically strong device identity, attest software and security policy, and assist in safely deploying and verifying software updates.

So basically a pluggable HSM? Curious if this should be considered more similar to the Yubi HSM 2 [0] (think dedicated HSM, not very useful for anything else but very secure) or the USB Armory [1], very adaptive small arm SBC with a USB port? (for this thread option 3 - more similar to a bone stock Yubikey?)

Also curious if there are plans to support BLS signatures natively?

[0] https://www.yubico.com/product/yubihsm-2/

[1] https://inversepath.com/usbarmory

One question, with the two-stage approach, isn’t that a security risk? App 1 gets measured and can’t change, but it needs to identify app 2 in a way that still allows it to be updatable, invalidating the whole security chain.

I’m probably not understanding something, so I’d love an explanation (preferably one that non-cryptographers understand)

> One question, with the two-stage approach, isn’t that a security risk? App 1 gets measured and can’t change, but it needs to identify app 2 in a way that still allows it to be updatable, invalidating the whole security chain.

It doesn't invalidate it if it works as the application developer intended. The essential idea is that the first mutable boot stage contains a trust policy which somehow verifies the second stage. Let's say that's a valid signature over the hash value of the second mutable stage. The trusted public key in contained in the first stage.

What we've done there is first used measured boot, and then verified boot.

Measured boot is basically load-hash-measure-execute, where "measure" means "store the hash value of whatever I'm about to execute somewhere safe where the soon executed thing won't be able to undo my storing of its hash".

Verified boot on the other hand is about verifying the next stage and only execute it if it verifies as valid by the trust policy.

> I’m probably not understanding something, so I’d love an explanation (preferably one that non-cryptographers understand)

Honestly I'm beginning to realize it's not all that simple to explain.

Ah, so for example challenge-response/public key? The first stage knows the second stage’s public key, and can verify that it knows the private key.

That would make it less secure ("only" as secure as the private key), which is the trade-off the developer made in exchange for an upgradable app, correct?

IIUC, popular security key devices like the YubiKey securely store a private key, but only allow it to be used for specific authentication applications (e.g. OTP or U2F). Would the Tillitis Key be able to securely store a private key, then with appropriate authentication from the host, use that key for encryption and decryption?
> Would the Tillitis Key be able to securely store a private key, then with appropriate authentication from the host, use that key for encryption and decryption?

Yes. I don't think that would be very hard to do.

Devices like the YubiKey can also be used for encryption (e. g. with LUKS or OpenPGP), digital signatures and SSH authentication.
@kfreds thank you for the response, and the commitment you have for this project.

>> ... this is basically like a yubikey ...

> ... new kind of USB security key ...

The things you have listed are indeed very nice, but they are not new kind, as they are available elsewhere.

Can you give a bit more compare and contrast to the original question?

Again, thank you.

> The things you have listed are indeed very nice, but they are not new kind, as they are available elsewhere.

Really? I wasn't aware that there is another USB security key with measured boot-based key derivation. Please provide a link!

> Can you give a bit more compare and contrast to the original question?

Except for Tillitis Key, all USB security keys I'm aware of either boot any software, or only boot software that has been signed with a key pair. Tillitis Key is different in that it measures the application, and uses that measurement to derive a secret specific to the application as well as the stick it's running on.

No, the integrity is within the device. You load the small (64k) apps onto the key and the content of the apps with the unique key for the device can be used by the app to perform cryptography and their integrity can be audited. This is similar to JavaCard with cryptographic integrity of the applets. Read more at: https://github.com/tillitis/tillitis-key1/blob/main/doc/syst...
> A user- or host-supplied secret can also be mixed into the key derivation function

To clarify, this secret does not affect the program's hash, right? (e.g. to prove liveness, the parameter is a nonce to be signed with a deterministic private key)

No, the USS would be used (mixed in as kfreds stated) during the hash operation. So the hash result would be based in (1) the hash of the application, (2) the unique device secret, and (3) the user supplied secret. The result is called Compound Device Identity in DICE parlance. And is basically

CDI = Hash(UDS, Hash(application) + USS)

If the application would use the result (called CDI - Compound Device Identity in DICE parlance) to derive a pair of keys, the keys would thus be based on the hardware (the specific device you have), the integrity of the application and what you know.

Thanks for the detailed response!
According to [1]

> It offers both security and flexibility by being end-user programmable while also preventing applications loaded onto the device from knowing each other’s secrets. During use firmware on Tillitis Key derives a unique key for each application it runs by measuring it before execution. This is done by combining an application’s hash value with a unique per device secret. Applications are loaded onto the device from the host computer during use, and are not stored persistently on the device.

So the idea here is:

* General purpose, reprogrammable security coprocessor

* If you save secrets with application A, then install evil application B, it can't access the secrets from A.

* And if you revert back to A, those saved secrets will still be there.

* Therefore, it's more practical to run two different applications - and safer to experiment with your own applications, because you won't lose all your website logins.

[1] https://www.tillitis.se/

* If you save secrets with application A, then install evil application B, it can't access the secrets from A.

* And if you revert back to A, those saved secrets will still be there.

What stops app B from pretending it's an app A ?

1. The hardware contains a UDS (unique per device secret) which can only be read once per boot cycle.

2. Firmware in ROM does unconditional measurement of the first mutable boot stage, which is loaded from the host, over USB.

The KDF used for measurement is Blake2s(UDS, Blake2s(application), USS).

Note that when I say hardware I mean FPGA hardware design.

Again, what stops malicious app B from just taking the A's id and presenting it to device ? token doesn't know who sent USB packet
I'm not sure I understand your question.

If you're asking about applications running on the device (Tillitis Key) the answer is measured boot. You can read more on tillitis.se.

I think the app is installed on the stick itself, kind of like how you install coin apps on a Ledger.
It would have to hash to the same value as app A
The device is not checking app's hash tho, it has no way to verify that the usb frame containing that hash is really from app A
The app runs on the USB device. The code is loaded from the host, and if it hashes to the correct value, it will be able to access the secrets on the Tillitis.
Something like 'Secure Boot' / 'Measured Boot' on modern PCs, I imagine.

A bootloader will checksum the current application before running it, checking its digital signatures and version and whatnot, and deriving an encryption key based on that.

It is an FPGA, fully open both at software and hardware level. So quite a bit more futurproof, inspectable and upgradable than a yubikey.
(For full disclosure I am the primary FPGA designer of TillitisKey.)

It also perform a measurement of the application being loaded. And the measurement together with the Unique Device Secret (UDS) will generate the primary secret applications can use to derive keys etc it needs. This means that you can verify the application integrity.

This is very close to, inspired by DICE: https://www.microsoft.com/en-us/research/project/dice-device...

Did you design the board? It looks sick, such high density of components on the top layer.
No, the board design is done by the wizard Matt Mets at https://blinkinlabs.com/
OMG. Just saw the Thinking Machines CM-2 replica on their homepage. What an awesome idea.
Yeah, super cool. A old school lisp machine would be cool as well.
Does this mean that a software upgrade will change the keys?
For now, yes. But as Fredrik (kfreds) has written in another comment. What is possible to do is a two stage approach with an application (which gets measured) loading other applications.
What exactly is the “measurement”? A hash of the application code?
Yes. The hash of the application code and the 256 bit Unique Device Secret is hashed to generate a primary secret, which then the application can use to derive the secrets it needs.

You can additionally supply a secret from the host (the User Supplied Secret). This means that the keys generated are tied to the specific device (the UDS), that the integrity of the application is correct, and to you as a user.

I was under the impression that not being upgradeable was a security feature of Yubikeys?
It is. And therein lies the innovation here: upgradable with verification.
Not exactly sure, but the OSFC conference page has some extra info on what it can do: https://www.osfc.io/2022/talks/tillitis-key-a-usb-security-k...

Maybe it will be ~YubiKey plus extras?

So Solokey V2. Not that I'm complaining by the way. Any open competition to yubikey is a win in my book.
I really dislike how "Yubikey" is being used in many places as a name for U2F and FIDO2.
It's the same as "Google Authenticator" being used instead of TOTP. I think it's reasonable for apps' documentation to meet users on their turf to aid understanding.
This is because the fido2 libraries follows a lot of defacto standardisation: either to match yubikey or windows hello as the only real implementations in the wild. Fido2 ctap extensions would support all the use cases of the new device except you won't be able to use them e.g. in windows because vendors are ignorant about all the openess to push their own agenda.
Probably for use with something like secure enclave.