Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TPM2 LUKS setup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robotka István Adrián
TPM2 LUKS setup
Commits
c176c241
Verified
Commit
c176c241
authored
Aug 4, 2020
by
Robotka István Adrián
Browse files
Options
Downloads
Patches
Plain Diff
format
parent
2f2a0cb7
Branches
lecture_03-starter
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+23
-18
23 additions, 18 deletions
README.md
env
+13
-0
13 additions, 0 deletions
env
setup-tpm.sh
+1
-15
1 addition, 15 deletions
setup-tpm.sh
with
37 additions
and
33 deletions
README.md
+
23
−
18
View file @
c176c241
...
@@ -3,29 +3,34 @@
...
@@ -3,29 +3,34 @@
Source: https://threat.tevora.com/secure-boot-tpm-2/
Source: https://threat.tevora.com/secure-boot-tpm-2/
## Install
## Install
```
DO NOT COPY IN ONE!!!
```
sh
sudo
apt
install
tpm2-tools
./setup-tpm.sh
./setup-tpm.sh
cp passphrase-from-tpm /usr/local/bin/passphrase-from-tpm
cp initramfs-hook /etc/initramfs-tools/hooks/tpm2
nano /etc/crypttab
update-initramfs -u
sudo cp
passphrase-from-tpm /usr/local/bin/passphrase-from-tpm
sudo cp
initramfs-hook /etc/initramfs-tools/hooks/tpm2
sudo
nano /etc/crypttab
sudo
update-initramfs
-u
reboot
```
```
## PCR values
## PCR values
0 BIOS
-
0 BIOS
1 BIOS configuration
-
1 BIOS configuration
2 Option ROMs
-
2 Option ROMs
3 Option ROM configuration
-
3 Option ROM configuration
4 MBR (master boot record)
-
4 MBR (master boot record)
5 MBR configuration
-
5 MBR configuration
6 State transitions and wake events
-
6 State transitions and wake events
7 Platform manufacturer specific measurements
-
7 Platform manufacturer specific measurements
8-10 OS values (8-15 originally)
-
8-10 OS values (8-15 originally)
Could easily change:
Could easily change:
1 bios conf
-
1 BIOS
4 MBR
-
4 MBR
(master boot record)
8,9,10 OS
-
8,9,10 OS
values
I
suggest to use these values: 0,7,5
I
use these:
`sha256:0,5,7`
This diff is collapsed.
Click to expand it.
env
0 → 100644
+
13
−
0
View file @
c176c241
# IMPORTANT variable, RTFM
PCR_LIST="sha256:0,5,7"
####### Files to store data
BASE="data/"
PCR_BIN="${BASE}pcrs.bin"
POLICY="${BASE}policy.digest"
PRIMARY_CONTEXT="${BASE}primary.ctx"
LUKS_PASS="${BASE}luks.pass"
LUKS_PASS_CHECK="${LUKS_PASS}.check"
LUKS_PASS_PUB="${LUKS_PASS}.pub"
LUKS_PASS_PRIV="${LUKS_PASS}.priv"
LOAD_CONTEXT="${BASE}load.ctx"
This diff is collapsed.
Click to expand it.
setup-tpm.sh
+
1
−
15
View file @
c176c241
...
@@ -6,22 +6,8 @@
...
@@ -6,22 +6,8 @@
# halt on errors
# halt on errors
set
-e
set
-e
#sudo apt install tpm2-tools
##################### CONFIG #####################
##################### CONFIG #####################
# IMPORTANT variable, RTFM
source
./env
PCR_LIST
=
"sha256:0,5,7"
####### Files to store data
BASE
=
"data/"
PCR_BIN
=
"
${
BASE
}
pcrs.bin"
POLICY
=
"
${
BASE
}
policy.digest"
PRIMARY_CONTEXT
=
"
${
BASE
}
primary.ctx"
LUKS_PASS
=
"
${
BASE
}
luks.pass"
LUKS_PASS_CHECK
=
"
${
LUKS_PASS
}
.check"
LUKS_PASS_PUB
=
"
${
LUKS_PASS
}
.pub"
LUKS_PASS_PRIV
=
"
${
LUKS_PASS
}
.priv"
LOAD_CONTEXT
=
"
${
BASE
}
load.ctx"
mkdir
-p
$BASE
mkdir
-p
$BASE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment