Professional Documents
Culture Documents
3 4 Anton Gerasimov OTA
3 4 Anton Gerasimov OTA
3 4 Anton Gerasimov OTA
Anton Gerasimov
HERE Technologies
1 Introduction
2 Uptane
3 Implementation features
4 Conclusion
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Background
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Goals
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Why RIOT?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Why RIOT?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Results
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Outline
1 Introduction
2 Uptane
3 Implementation features
4 Conclusion
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Basic layout
get packages
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Basic layout (meatadata)
targets.json
1 {
2 ” signatures ” : [
3 {
4 ” k e y i d ” : ” ce69f17a69ca6 . . . ” ,
5 ”method” : ” ed25519 ” ,
6 ” s i g ” : ”gd945ORLpvCGo . . . ”
7 }
8 ],
9 ” signed ” : {
10 ” _type ” : ” Ta r g e t s ” ,
11 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
12 ” targets ” : {
13 ” first_firmware . txt ” : {
14 ” hashes ” : {
15 ” sha256 ” : ”1 bbb15aa921 . . . ” ,
16 },
17 ” l e n g t h ” : 2092
18 },
19 ” second_firmware . t x t ” : {
20 ” hashes ” : {
21 ” sha256 ” : ” f309846c846 . . . ” ,
22 },
23 ” l e n g t h ” : 3120
24 }
25
26 },
27 ” version ” : 2
28 }
29 } . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Key rotation
get keys
list of keys
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Key rotation (metadata)
targets.json root.json
1 { { 1
2 ” signatures ” : [ ” signatures ” : [ . . . ] , 2
3 { ” signed ” : { 3
4 ” k e y i d ” : ” ce69f17a69ca6 . . . ” , ” _type ” : ” Root ” , 4
5 ”method” : ” ed25519 ” , ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” , 5
6 ” s i g ” : ”gd945ORLpvCGo . . . ” ” keys ” : { 6
7 } ” ce69f17a6 . . . ” : { 7
8 ], ” k e y t y p e ” : ”ED25519 ” , 8
9 ” signed ” : { ” keyval ” : { 9
10 ” _type ” : ” Ta r g e t s ” , ” p u b l i c ” : ”1FAE772EF364C0 . . . ” 10
11 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” , } 11
12 ” targets ” : { } 12
13 ” first_firmware . txt ” : { }, 13
14 ” hashes ” : { ” roles ”: { 14
15 ” sha256 ” : ”1 bbb15aa921 . . . ” , ” root ” : { 15
16 }, ” keyids ” : [ 16
17 ” l e n g t h ” : 2092 ” ce69f17a69ca6 . . . ” 17
18 }, ], 18
19 ” second_firmware . t x t ” : { ” threshold ” : 1 19
20 ” hashes ” : { }, 20
21 ” sha256 ” : ” f309846c846 . . . ” , ” targets ” : { 21
22 }, ” keyids ” : [ 22
23 ” l e n g t h ” : 3120 ” ce69f17a69ca6 . . . ” 23
24 } ], 24
25 ” threshold ” : 1 25
26 }, } 26
27 ” version ” : 2 }, 27
28 } ” version ” : 1 28
29 } } . . . . . . . . . . . . . . . . . . . 29.
} . . . . . . . . . . . . . . . . . . . . 30
Director
report current FW
get FW to install
Director server
FW to install
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Director (continued metadata)
manifest.json
1 {
2 ” a t t a c k s _ d e t e c t e d ” : ”” ,
3 ” e c u _ s e r i a l ” : ” I VI−Unit ” ,
4 ” installed_image ” : {
5 ”fileinfo”: {
6 ” hashes ” : {
7 ” sha256 ” : ” f309846c846 . . . ”
8 },
9 ” l e n g t h ” : 3120
10 },
11 ” f i l e p a t h ” : ” second_firmware . t x t ”
12 }
13 }
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Multiple ECUs
report current FW
get FW to install
report current FW Director server
FW to install
Secondary
Primary ECU
ECU get FW to install get packages
1 {
2 ” ecu_version_manifests ” : {
3 ” L i g h t s−c o n t r o l l e r ” : {
4 ” signatures ” : [
5 ...
6 ],
7 ” signed ” : {
8 ” attacks_detected ” : ”” ,
9 ” e c u _ s e r i a l ” : ” L i g h t s−c o n t r o l l e r ” ,
10 ” installed_image ” : {
11 ”fileinfo”: {
12 ” ha s h e s ” : {
13 ” sha256 ” : ” f309846c846 . . . ”
14 },
15 ” l e n g t h ” : 2092
16 },
17 ” filepath ” : ” first_firmware . txt ”
18 }
19 }
20 },
21 ” I V I−Unit ” : {
22 ” signatures ” : [
23 ...
24 ],
25 ” signed ” : {
26 ...
27 }
28 }
29 },
30 ” p r i m a r y _ e c u _ s e r i a l ” : ” I V I−Unit ”
31 }
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Delegations
report current FW
get FW to install
report current FW Director server
FW to install
Secondary
Primary ECU
ECU get FW to install get packages and
delegations
list of packages OEM
and delegations
images server
Tier 1
images server
1 Introduction
2 Uptane
3 Implementation features
4 Conclusion
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
How do you parse JSON on MCU
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Why not the whole tree?
1 {
{}
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : { ”_type” ”expires” ”targets” ”version”
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 } ”Targets” ”3021-07-13T01:02:03Z” 2
{}
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ” ”second_firmware” ”first_firmware”
15 },
16 ” l e n g t h ” : 3120
17 }, {}
18 ” first_firmware . txt ” : { ...
19 ” custom ” : {
20 ”ecuIdentifiers”: { ”custom” ”hashes” ”length”
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 } {} {} 3120
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
”ecuIdentifiers” ”sha256”
29 ” l e n g t h ” : 2092
30 }
31 },
32
33 }
” version ” : 2 ... . . . . . . .
”f309846c846...”
. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Why not the whole tree?
{}
”Targets” ”3021-07-13T01:02:03Z” 2
{}
• Around 200-300 (and
growing!) bytes per target in ”second_firmware” ”first_firmware”
metadata.
• 10s to 100s of devices in a {}
...
vehicle. ”custom” ”hashes” ”length”
• Holding that array of data in
RAM is not really an option. {} {} 3120
”ecuIdentifiers” ”sha256”
... . .
”f309846c846...”
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”_type”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”Targets”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”expires”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17
18
},
” first_firmware . txt ” : {
”3021−07−13T01:02:03Z”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”targets”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”second_firmware.txt”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”custom”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”ecuIdentifiers”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { ”IVI-Unit”
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Why not token by token?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Something hacky
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : { {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Something hacky
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ” ”_type”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD” ”Targets”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Something hacky
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ” ”expires”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD” ”3021-07-13T01:02:03Z”
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Something hacky
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : {
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: {
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 }
11 }
12 },
13 ” hashes ” : {
14 ” sha256 ” : ” f309846c846 . . . ” ”targets”
15 },
16 ” l e n g t h ” : 3120
17 },
18 ” first_firmware . txt ” : {
19 ” custom ” : {
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD” {}
23 }
24 }
25 },
26 ” hashes ” : {
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092
30 }
31 },
32 ” version ” : 2 . . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Something hacky
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : { ”second_firmware”
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: { {}
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 } ”custom” ”hashes” ”length”
11 }
12 },
13 ” hashes ” : { {} {} 3120
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120 ”ecuIdentifiers” ”sha256”
17 },
18 ” first_firmware . txt ” : {
19 ” custom ” : { {} ”f309846c846...”
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD”
”IVI-Unit”
23 }
24 }
25 },
26 ” hashes ” : { {}
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092 ”hardwareId”
30 }
31 },
32 ” version ” : 2 ”RPI3b”
. . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Something hacky
1 {
2 ” _type ” : ” Ta r g e t s ” ,
3 ” e x p i r e s ” : ”3021−07−13T01 : 0 2 : 0 3 Z” ,
4 ” targets ” : { ”first_firmware”
5 ” second_firmware . t x t ” : {
6 ” custom ” : {
7 ”ecuIdentifiers”: { {}
8 ” IVI−Unit ” : {
9 ” h a r d w a r e I d ” : ”RPi3b”
10 } ”custom” ”hashes” ”length”
11 }
12 },
13 ” hashes ” : { {} {} 2092
14 ” sha256 ” : ” f309846c846 . . . ”
15 },
16 ” l e n g t h ” : 3120 ”ecuIdentifiers” ”sha256”
17 },
18 ” first_firmware . txt ” : {
19 ” custom ” : { {} ”1bbb15aa921...”
20 ”ecuIdentifiers”: {
21 ” L i g h t s−c o n t r o l l e r ” : {
22 ” h a r d w a r e I d ” : ”LEDLIGHTRD” ”Lights-controller”
23 }
24 }
25 },
26 ” hashes ” : { {}
27 ” sha256 ” : ”1 bbb15aa921 . . . ”
28 },
29 ” l e n g t h ” : 2092 ”hardwareId”
30 }
31 },
32 ” version ” : 2 ”LEDLIGHTRD”
. . . . . . . . . . . . . . . . . . . .
33 } . . . . . . . . . . . . . . . . . . . .
Something hacky
fed again.
• jsmn is ”rewound” when {} ”1bbb15aa921...”
necessary. ”Lights-controller”
1 Introduction
2 Uptane
3 Implementation features
4 Conclusion
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Isn’t it RIOT Summit?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Links
• Uptane: https://uptane.github.io/
• Aktualizr: inmplementation of Uptane primary, secondaries
and minimal backend:
https://github.com/advancedtelematic/aktualizr
• libuptiny is a part of aktualizr, available under
https://github.com/advancedtelematic/aktualizr/
tree/master/partial/libuptiny
• jsmn, a minimalistic JSON tokenizer and primary parser:
https://github.com/zserge/jsmn
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Thanks!
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .