Skip to content

Commit 23a1c8e

Browse files
committed
Merge branch 'develop'
2 parents fe6c294 + a6954a4 commit 23a1c8e

7 files changed

Lines changed: 410 additions & 1 deletion

File tree

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*tssh* manages [TPM](https://trustedcomputinggroup.org/resource/tpm-library-specification/)-backed keys that are ready to use with *ssh*.
33
Its main focus is to be as stateless as possible by leveraging the fact that TPMs can derive keys deterministically.
44
By default, TSSH uses the username, hostname and port as the salt for key derivation, thereby ensuring that each host has a unique public key. Furthermore, TSSH ensures that the SSH server is offered only the correct key.
5+
Check further down for detailed diagrams.
56

67
## Prerequisites
78

@@ -20,7 +21,7 @@ Execute the following from the project route:
2021

2122

2223
```console
23-
cargo --path ./tssh/ --locked
24+
cargo install --path ./tssh/ --locked
2425
```
2526

2627
## Nix tests
@@ -77,6 +78,23 @@ localhost $> ssh user@example.com
7778
user@example.com $>
7879
```
7980

81+
# Diagrams
82+
83+
## Architecture
84+
<div style="width: 100%;">
85+
<img src="architecture.svg" style="width: 100%;" alt="Diagram of the architecture of tssh" />
86+
</div>
87+
88+
## Key Creation
89+
<div style="width: 100%;">
90+
<img src="key-creation.svg" style="width: 100%;" alt="Diagram of how keys are created by tssh" />
91+
</div>
92+
93+
## SSH Login
94+
<div style="width: 100%;">
95+
<img src="ssh-login.svg" style="width: 100%;" alt="Diagram of how a ssh login work with tssh" />
96+
</div>
97+
8098
# Features planned
8199
* [ ] Key import
82100
* [ ] Keys with pin

architecture.d2

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
vars: {
2+
d2-config: {
3+
layout-engine: elk
4+
}
5+
}
6+
7+
CLIENT: Client {
8+
PKCS: PKCS11\nDynamic lib
9+
TPM: TPM {
10+
shape: page
11+
}
12+
FILE: SSH Config
13+
SQLITE: SQlite
14+
TSSH: TSSH
15+
SSH: SSH Client
16+
TSSH -> FILE
17+
TSSH <-> SQLITE
18+
TSSH <-> TPM
19+
PKCS <-> TPM
20+
PKCS <-> SQLITE
21+
SSH -> PKCS
22+
SSH <- FILE
23+
}
24+
25+
HOST: SSH Server
26+
27+
HOST <-> CLIENT.SSH

architecture.svg

Lines changed: 102 additions & 0 deletions
Loading

key-creation.d2

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
TSSH Key creation flow: {
2+
shape: sequence_diagram
3+
4+
TSSH: TSSH
5+
TPM: TPM
6+
SQLITE: SQlite
7+
FILE: SSH Config Files
8+
9+
TSSH -> TSSH: Derive best core template:\nAlgorithm,..
10+
TSSH -> TSSH: Enrich template with salt:\nuser@host:22
11+
TSSH -> TPM: Request public key\n for template
12+
TPM -> TPM: Derive key pair\n with template
13+
TPM -> TSSH: Public key
14+
TSSH -> SQLite: Store Template
15+
TSSH -> File: Write host config
16+
}

key-creation.svg

Lines changed: 108 additions & 0 deletions
Loading

ssh-login.d2

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
SSH Login flow: {
2+
shape: sequence_diagram
3+
4+
CLIENT: SSH Client
5+
SQLITE: SQlite
6+
FILE: SSH Config Files
7+
PKCS11: PKCS11 lib
8+
TPM: TPM
9+
SERVER: SSH Server
10+
11+
CLIENT -> FILE: Lookup public key for user@host
12+
FILE -> CLIENT: Public key
13+
CLIENT -> SERVER: Offer public key
14+
SERVER -> CLIENT: Challenge
15+
CLIENT -> PKCS11: Key, challenge
16+
PKCS11 -> SQLite: Lookup key
17+
SQLITE -> PKCS11: Template
18+
PKCS11 -> TPM: Derive key pair\nfor template
19+
TPM -> TPM: Key pair
20+
PKCS11 -> TPM: Challenge
21+
TPM -> PKCS11: Solved challenge
22+
PKCS11 -> CLIENT: Solved challenge
23+
CLIENT -> SERVER: Solve challenge
24+
}

ssh-login.svg

Lines changed: 114 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)