Skip to content

Updates!

//Germanversion below

Hello everybody,

currently there is a problem in the firmware of the TPM chip from Infineon which was installed on the LetsTrust TPM modules.

Information about the problem can be found at the following links:
https://www.infineon.com/TPM-update
https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/ADV170012
https://sites.google.com/a/chromium.org/dev/chromium-os/tpm_firmware_update

Not affected are firmware versions >= 7.62.3126 for TPM 2.0.
You can check this under Linux with the eltt2 and the command "sudo ./eltt2 -g".

Unfortunately, there is currently no update tool which I could link here.


Max of pi3g has assured that he will take care of the rapid exchange of the modules.

Please note that when exchanging your module, all keys generated in the TPM and, of course, the stored keys will also be lost. Please take appropriate measures, for example, endcrypt your backups ^ __ ^.

Bye for now!

//German Version

Hallo allerseits,

aktuell gibt es ein Problem in der Firmware des TPM-Chips von Infineon welcher auf den LetsTrust-TPM-Modulen verbaut wurde.

Informationen zu dem Problem findest du unter folgende Links:
https://www.infineon.com/TPM-update
https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/ADV170012
https://sites.google.com/a/chromium.org/dev/chromium-os/tpm_firmware_update

Nicht betroffen sind Firmwareversionen >= 7.62.3126 für TPM 2.0.
Prüfen kannst du dies unter Linux mit dem eltt2 und dem Befehl „sudo ./eltt2 –g“.

Leider gibt es aktuell noch kein Update-Tool welches ihr ich hier verlinken könnte.

Max von pi3g hat mit zugesichert, dass er sich um den zügigen Austausch der Module kümmern wird.

Bedenk bitte, dass bei dem Austausch deines Moduls alle im TPM generierten und natürlich auch die gespeicherten Keys verloren gehen. Treffe bitte entsprechende Maßnahmen entschlüssele zB deine Backups ^__^.

Bis bald!
Paul
Kategorien: TPM

Howto Enable TPM Support on a Raspberry PI (0, 0W, 1, 2, 3, 3b+) and make it work with the LetsTrust TPM

UPDATE: Works for Pi 3b+, too!

Due to the recent inclusion of the TPM_TIS_SPI patches to the mainline kernel
and the consequent backports to v4.9.x and 4.11.x it's now much easier to get
the support for the LetsTrust TPM up and running.
No more patching necessary!

tldr: Enable CONFIG_TCG_TIS_SPI in your Kernel Config, and modify your
device tree accordingly.

This tutorial will show you how to perform these steps for your Raspberry PI
(0, 0W, 1, 2, 3).

It is assumed that you are cross-compiling from your desktop PC (i.e. not
building the kernel on the raspberry itself) and create everything in your home directory (~).

For more details please also read the excellent guide from the Raspberry Pi
Foundation on howto compile your kernel.
https://www.raspberrypi.org/documentation/linux/kernel/building.md
https://www.raspberrypi.org/documentation/linux/kernel/configuring.md

On a Ubuntu system you should install the following packages
gcc-arm-linux-gnueabihf
gddrescue
git
libncurses5-dev
bc


First download the toolchain you need for cross compilation
$ git clone https://github.com/raspberrypi/tools
and add the tools to your executable search path
$ export PATH=$PATH:~/tools

Then grab the kernel sources
$ git clone --depth=1 https://github.com/raspberrypi/linux
and enter the directory
$ cd linux

Next step is to get the default kernel configuration:

For Pi 1, Pi 0, Pi 0 W, or Compute Module:
$ KERNEL=kernel
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig


For Pi 2, Pi 3, or Compute Module 3:
$ KERNEL=kernel7
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig


Then we have to enable the TPM Support in the Kernel via make menuconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
In this gui navigate to
Device Drivers
---> Character devices
---> TPM Hardware Support

and press M (for Module) or Y (for build-in support)
Then press enter to get into the subdirectory and select
---> TPM Interface Specification 1.3 Interface / TPM 2.0 FIFO Interface - (SPI)
also again either via M or Y

If you want to use the TPM's HardwareNumberGenerator feature, please select
---> Hardware Random Number Generator Core support
---> TPM HW Random Number Generator support

Save and exit the menuconfig.

If this is too much hassle for you, you can also edit your .config file and
add these 5 lines to it.
CONFIG_HW_RANDOM_TPM=m
CONFIG_TCG_TPM=m
CONFIG_TCG_TIS_CORE=m
CONFIG_TCG_TIS_SPI=m
CONFIG_SECURITYFS=y


Next step is to add our DeviceTree Overlay to our kernel sources.
Simply download letstrust-tpm-overlay.dts and copy it to arch/arm/boot/dts/overlays/letstrust-tpm-overlay.dts
$ wget http://letstrust.de/uploads/letstrust-tpm-overlay.dts -O arch/arm/boot/dts/overlays/letstrust-tpm-overlay.dts

Now build your kernel and device tree blob
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs overlays/letstrust-tpm.dtbo -j8
please note the additional overlays/letstrust-tpm.dtbo

Now deploy your kernel and modules (standard rpi way, see howto above)
$ mkdir mnt/fat32
$ mkdir mnt/ext4
$ sudo mount /dev/sdb1 mnt/fat32
$ sudo mount /dev/sdb2 mnt/ext4
$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ext4 modules_install
$ sudo cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.img
$ sudo cp arch/arm/boot/zImage mnt/fat32/$KERNEL.img
$ sudo cp arch/arm/boot/dts/*.dtb mnt/fat32/
$ sudo cp arch/arm/boot/dts/overlays/*.dtb* mnt/fat32/overlays/
$ sudo cp arch/arm/boot/dts/overlays/README mnt/fat32/overlays/


Before you unmount your RPI SD Card, open mnt/fat32/config.txt
and ensure the line dtparam=spi=on isn't commented out (so no # at the beginning of the line)
and add
dtoverlay=letstrust-tpm
just beneath it.

More Details:
https://www.raspberrypi.org/documentation/configuration/device-tree.md
https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md
Of course we uploaded a reference config.txt for you

Unmount your SD card,
$ sudo umount mnt/fat32
$ sudo umount mnt/ext4

Put it into your PI and boot your raspberry pi.

After booting, on a shell do
sudo modprobe tpm_tis_spi and /dev/tpm0 should be visible.
(We are looking into it why it does not autoload)

You can tryout the functionality of your TPM with
https://github.com/Infineon/eltt2


Happy Hacking



p.s.: If you just want to try it out without compiling:
Download boot-v4.9.33.tpm.tar.bz2 (kernel, dtb, overlays) + modules-v4.9.33.tpm.tar.bz2

Extract the boot-v4.9.33.tpm.tar.bz2 into the boot partition of your rpi (e.g. sdb1) and the modules-v4.9.33.tpm.tar.bz2 into the second partition.(e.g. sdb2)

$ wget http://www.letstrust.de/uploads/boot-v4.9.33.tpm.tar.bz2 -O /tmp/boot-v4.9.33.tpm.tar.bz2
$ wget http://www.letstrust.de/uploads/modules-v4.9.33.tpm.tar.bz2 -O /tmp/modules-v4.9.33.tpm.tar.bz2
$ sudo mount /dev/sdb1 mnt/fat32
$ sudo mount /dev/sdb2 mnt/ext4
$ cd mnt/fat32
$ sudo tar -xvf /tmp/boot-v4.9.33.tpm.tar.bz2
$ cd ../ext4
$ sudo tar -xvf /tmp/modules-v4.9.33.tpm.tar.bz2
$ cd ..
$ sudo umount /dev/sdb1
$ sudo umount /dev/sdb2


Kategorien: TPM

was lange währt wird endlich gut.

Neues Plug&Play Image und diesmal: Eines für alle RaspberryPi´s!

Es handelt sich hierbei um ein frisches "Jessie" Image vom 21.06.2017 mit dem Kernel 4.9.33.
Der Pinguin hat freundlicherweise ein ungestartetes Jessie wie in diesem Post beschrieben modifiziert.

Lade dir das Image herunter.
Entpacke es und spiele das Image auf eine SD-Karte.
(Hierbei wird alles auf der SD-Karte vernichtet!)

Einfacher gehts nun fast nicht mehr.

Ist das LetsTrust-TPM an der richtigen Stelle und vor dem Booten gesteckt solltest du mit:
ls /dev/tpm0
dich vergewissern, dass das TPM erkannt wurde.

Nun zum ersten Kommando zum TPM
Im home Verzeichnis findet ihr im Ordner "TPM-Tools" das eltt2.

Öffnet ein Terminal:
cd /TPM-Tools/eltt2/
make
sudo ./eltt2 -G 20

Ihr habt nun 20 Byte Zufallszahlen vom LetsTrust-TPM erhalten!

Bis bald!

LetsTrust TPM und los gehts!

So, ich habe nun das Modul, und jetzt?
UPDATE:

Es gibt nun ein neues Plug&Play Image: Eines für alle Pi´s.

Hier findest du den Eintrag dazu: Link

Veraltet:

Du hast nun drei Möglichkeiten:
1.: Lade das Image für den Raspberry Pi herunter und kopiere dieses via dd auf eine SD-Karte >=4GB.
Image: plug_n_play_image.img
How to Plug and Play Image:PlugandPlayImage_en.txt

Prüfsummen des Images:
MD5: 27aeac85aa4e1ca1588808ad5b988a25
SHA-1: ceab60c4b538313a28d59b8bfce8184a7ad83f02
SHA-256: 88216ab485b93a706d229a9e95c99a0fa32291964b65c8fafb48440dc904eb9c

2.: Die vorkompilierten Module und den passenden Devicetree Eintrag im eigenen Kernel verwenden, die Anleitung und die Module sind gepackt.
Archiv: precompiled_modules_en.zip.
Prüfsummen des Archivs:
MD5: 5ea87f7068ff0603d673b017e4175097
SHA-1: 2cd863bdb67260f2eabbf73405a483e6153b5d28
SHA-256: 355b901178c39eb19398d9c352829923492a9e6987e1f3651a9a757955ad2559

3.: Oder der steinige und harte Weg: Kernel selbst bauen und patchen.
Anleitung und den Patch hierzu findest du in diesem Archiv:
compile_complete_kernel_en.zip
Prüfsummen des Archivs:
MD5: 7607cc3c35407f51fef23e44be2c32eb
SHA-1: d5a0b42ca40158ce30ef3a1ddef8f11ae383b732
SHA-256: 2eec1442315a1cd0691626bd6910ff54128d03793bf1eb2701aea4b54e8034bd


Happy Patching!



Das war´s für heute!

Bis bald!

Was ist ein TPM und wo bekomme ich Infos?

Dieser Eintrag ist eine Linksammlung auf alles Relevante, was mit dem TPM zu tun hat.
Vollständig wird diese Liste nur durch eine Mail von dir mit dem Link an: info[at]LetsTrust[punkt]de


Was ist ein TPM und wofür ist es gedacht?
deutsche Wikipedia
englische Wikipedia

Wer spezifiziert denn so ein TPM?
Das ist die TCG -> Trusted Computing Group
https://trustedcomputinggroup.org/

Welchen Chip-Hersteller habt ihr gewählt?
Wir haben ein Infineon SLB 9670 TPM 2.0 FW 7.40 verbaut,
Chip Beschreibung
Das Datenblatt:
Datenblatt

Was kann ich sonst noch lesen?
Eine sehr nützliche App-Note von Infineon für den Raspberry Pi 3:
Application Note

Dieser Blog ist empfehlenswert:
mjg59
Und explizit diese Artikel:
Eintrag1
Eintrag2
Eintrag3
Eintrag4
Eintrag5
Eintrag6


Und gibt es Repositories?

Klar gibts dazu ein paar:
Github.com/TPM 2.0 Tools
github.com/SoftwareStack

github.com/Infineon Embedded Linux TPM Toolbox 2.0
Other TPM Stuff


und natürlich
github.com/ suche nach TPM

Wenn du gerade an einem Projekt arbeitest, her damit, ich verlinke es gern!

Okay, verstanden, wo bekomme ich so ein Teil?
BuyZero.de


Das war's für heute.
Bis die Tage!
Kategorien: TPM

LetsTrust, was wird das hier?

Diese Seite wird eine Sammlung aller Projekte, Informationen und How To´s rund um das Projekt "LetsTrust".

Was ist nun „LetsTrust“?
Der Name ist angelehnt an „LetsEncrypt“: Diese Kampagne will mit SSL-Zertifikaten das Web sicherer machen. "LetsTrust" wird euch den Zugriff auf Krypto-Hardware ermöglichen um eure Projekte sicherer zu gestalten.

Beginnen werden wir mit „LetsTrust TPM“ einem "Trusted Platform Modul 2.0" fürs Raspberry Pi. Dieses Modul bekommt ihr auf LetsTrust TPM.

Diese Seite hier ist im Aufbau, die letzten Wochen war viel zu tun. Habt ein wenig Geduld, bis zum 15.05 gibt es hier dann Links zu Images, Kernel-Patches und auch eine englische Version dieser Seite.

Wie kommt man auf diese Blödsinn?
Anfang April 2017 kamen zufällig die drei Richtigen an denselben Tisch: Einer mit einem Shop, der Zweite mit einer fünf Jahre alten Idee und der Dritte mit der Erfahrung diese Idee umzusetzen.
Alle drei mit dem Gedanken: "hmm kann das funktionieren?"

LetsTrust war geboren.


Das war's für heute.
Bis die Tage!





Contact

//deutsche Version weiter unten

Contact

LetsTrust.de
Paul Kissinger
Robert-Stolz-Straße 4
DE-eight six three six eight gersthofen
Tel. Zero one seven six / six zero nine seven six eight thirty-three

Mail: info[at]LetsTrust[dot]de


copyright
The contents of my blog may be copied or otherwise used with my consent.
(Just say it and link or refer to this page)

The content of the linked pages are the sole responsibility of their operators. I take no responsibility for the content of external links.


The use of contact data published in the context of the imprint obligation by third parties for sending unsolicited advertising and information materials is hereby expressly excluded.


//German version

Impressum

LetsTrust.de
Paul Kissinger
Robert-Stolz-Straße 4
acht sechs drei sechs acht Gersthofen
Tel. Null eins sieben sechs / sechs null neun sieben sechs acht dreiunddreißig

Mail. info[at]LetsTrust[punkt]de


Copyright
Die Inhalte meines Blogs dürfen mit meiner Zustimmung kopiert oder anderweitig genutzt werden.
(Sage halt einfach Bescheid und verlinke oder verweise auf diese Seite)

Für den Inhalt der verlinkten Seiten sind ausschließlich deren Betreiber verantwortlich. Ich übernehme keine Haftung für die Inhalte externer Links.


Der Nutzung von im Rahmen der Impressumspflicht veröffentlichten Kontaktdaten durch Dritte zur Übersendung von nicht ausdrücklich angeforderter Werbung und Informationsmaterialien wird hiermit ausdrücklich widersprochen.