A New Key in U-Boot: Introducing Support for the Tillitis TKey

A new patch series has landed in U-Boot concept, adding foundational support for the Tillitis TKey, an open-source USB security token. This series lays the groundwork for integrating hardware-backed security operations directly within the bootloader.

The TKey is an interesting piece of hardware. It’s a small, programmable USB device that contains a unique, internal secret key. When you plug it in, it starts in a firmware mode, ready to receive a small application. Once the application is loaded, the TKey transitions to an “app mode” where it can perform cryptographic tasks, like deriving keys, without ever exposing its core secret. When the key is removed, the application is erased, along with all data.

This initial 8-patch series introduces the necessary components to get started with the TKey in U-Boot.


What’s Included?

The support is built around a new tkey uclass, providing a standard driver model interface for communicating with the device. The series includes several key pieces:

  • A New tkey Command: A simple command-line tool to interact with the device. You can get device info, load applications, and derive keys.
  • Signer App Firmware: The series includes the binary for the standard “signer” application. This is the code that gets loaded onto the TKey to perform key derivation. You can build this yourself if you like, but for now U-Boot uses the vendor-provide version (see Tellitis TKey Signer).
  • User-Supplied Secret (USS) Derivation: To support the TKey’s key derivation mechanism, support for the blake2s hashing algorithm has been added. The TKey uses this to combine its internal secret with a user-provided password (the USS).
  • Sandbox Emulator and Driver: For development and testing, a full TKey emulator is included for the sandbox environment. Additionally, a sandbox driver that can talk to a real TKey over a serial port (/dev/ttyACM0) is provided, making it easy to test with actual hardware from a development machine.

How It Works: A Quick Example

The main goal of this feature is to derive a secret key that can be used for other purposes, like unlocking an encrypted disk. The workflow is straightforward. Using the new tkey command, you can provide a password (a “User-Supplied Secret” or USS):

Bash

=> tkey connect
Connected to TKey device
=> tkey getkey my-secret
Public Key: 505152535455565758595a5b5c5d5e5f505152535455565758595a5b5c5d5e5f
Disk Key: 228b2f6abf8be05649b2417586150bbf3e1b3f669afa1c6151ddc72957933c21
Verification Hash: a72a46b8f8c7ff0824416ada886f62b6c2808896d71201a32814ab432c7a81cf
=> 

The TKey loads the signer app using the USS, combines its internal secret with your password, and generates a unique public key. From this, a deterministic Disk Key is derived using a hash function. Because the TKey’s internal secret is unique and stable, the same password will always produce the same disk key on the same TKey, but a different key on any other TKey.

The command also outputs a Verification Hash. This can be stored and used later to check if a password is correct without having to perform a full decryption operation.


What’s Next?

This patch series provides the basic building blocks. It’s a first step toward more advanced and interesting security features. We’re looking forward to seeing how the community builds on this foundation, with potential integrations into secure boot flows, disk encryption unlocking with LUKS, and other security-sensitive operations.