https://github.com/hybridgroup/tinygo-tkey
Develop applications for the Tillitis TKey-1 an open source, open hardware FPGA-based USB security token using TinyGo
https://github.com/hybridgroup/tinygo-tkey
embedded fpga golang riscv security security-token tillitis tinygo tkey usb-devices
Last synced: 7 days ago
JSON representation
Develop applications for the Tillitis TKey-1 an open source, open hardware FPGA-based USB security token using TinyGo
- Host: GitHub
- URL: https://github.com/hybridgroup/tinygo-tkey
- Owner: hybridgroup
- License: bsd-2-clause
- Created: 2024-12-04T15:00:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-10T09:12:32.000Z (10 months ago)
- Last Synced: 2026-01-15T07:32:54.651Z (3 months ago)
- Topics: embedded, fpga, golang, riscv, security, security-token, tillitis, tinygo, tkey, usb-devices
- Language: Go
- Homepage: https://tillitis.se/products/tkey/
- Size: 1.52 MB
- Stars: 35
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# tinygo-tkey
[](https://pkg.go.dev/github.com/hybridgroup/tinygo-tkey/pkg/proto) [](https://github.com/hybridgroup/tinygo-tkey/actions/workflows/build.yml)
This package is to develop applications using [TinyGo](https://tinygo.org/) on the [Tillitis TKey-1](https://github.com/tillitis/tillitis-key1), an open source, open hardware FPGA-based USB security token.
## Protocol
The `tinygo-tkey` package includes an implementation of the [Tillitis framing protocol for communication](https://dev.tillitis.se/protocol/) between the device and client.
This can be used for device applications that run on the TKey hardware written using TinyGo. Of course, it pairs nicely with client applications written using "big" Go.
See the [package documentation](https://pkg.go.dev/github.com/hybridgroup/tinygo-tkey/pkg/proto) for more information, as well as the code in this repo.
## Examples
### Blinker

Example application for TKey written using TinyGo for the device application and Go for the client application.
#### Device application
To compile and flash the TKey with the device application:
```shell
tinygo flash -size short -target=tkey ./examples/blinker/app
```
The LED should start blinking green every half second.
#### Client application
Now you can run the command line client application on your computer:
```shell
go run ./examples/blinker/cmd --led 0 --timing 250
```
The LED should now be blinking blue every 250 ms.
### Signer
ed25519 signing tool that runs on the TKey hardware device.
It can be used by the [`tkey-ssh-agent`](https://github.com/tillitis/tkey-ssh-agent) application for SSH authentication, and by the [`tkey-sign`](https://github.com/tillitis/tkey-sign-cli) application for providing digital signatures of files.
See the [README.md](./examples/signer/README.md) for more information.