mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-21 13:57:52 +00:00
31cf85b707
The Librem Key is a custom device USB-based security token Nitrokey is producing for Purism and among other things it has custom firmware created for use with Heads. In particular, when a board is configured with CONFIG_LIBREMKEY, this custom firmware allows Heads to use the sealed TOTP secret to also send an HOTP authentication to the Librem Key. If the HOTP code is successful, the Librem Key will blink a green LED, if unsuccessful it will blink red, thereby informing the user that Heads has been tampered with without requiring them to use a phone to validate the TOTP secret. Heads will still use and show the TOTP secret, in case the user wants to validate both codes (in case the Librem Key was lost or is no longer trusted). It will also show the result of the HOTP verification (but not the code itself), even though the user should trust only what the Librem Key displays, so the user can confirm that both the device and Heads are in sync. If HOTP is enabled, Heads will maintain a new TPM counter separate from the Heads TPM counter that will increment each time HOTP codes are checked. This change also modifies the routines that update TOTP so that if the Librem Key executables are present it will also update HOTP codes and synchronize them with a Librem Key.
22 lines
766 B
Diff
22 lines
766 B
Diff
--- nitrokey-hotp-verification-a/Toolchain-heads.cmake 2018-05-22 09:55:46.907209235 -0700
|
|
+++ nitrokey-hotp-verification-b/Toolchain-heads.cmake 2018-05-22 09:55:26.659371966 -0700
|
|
@@ -0,0 +1,18 @@
|
|
+SET(CMAKE_SYSTEM_NAME Linux)
|
|
+SET(CMAKE_SYSTEM_VERSION 1)
|
|
+
|
|
+# Specify the cross compiler
|
|
+SET(CMAKE_C_COMPILER $ENV{INSTALL}/bin/musl-gcc)
|
|
+SET(CMAKE_CXX_COMPILER $ENV{INSTALL}/bin/musl-gcc)
|
|
+
|
|
+# Where is the target environment
|
|
+SET(CMAKE_FIND_ROOT_PATH $ENV{INSTALL})
|
|
+
|
|
+# Search for programs only in the build host directories
|
|
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
+
|
|
+# Search for libraries and headers only in the target directories
|
|
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
+
|
|
+INCLUDE_DIRECTORIES(hidapi)
|