Lines Matching +full:8 +full:- +full:9
1 .. zephyr:code-sample:: tfm_psa_crypto
2 :name: TF-M PSA crypto
8 This TF-M integration example demonstrates how to use the PSA crypto API in
10 this example also demonstrates certain TF-M features that are covered as part
15 Trusted Firmware (TF-M) Platform Security Architecture (PSA) APIs
17 non-secure processing environment.
20 handle secure TF-M API calls and responses.
22 The sample prints test info to the console either as a single-thread or
23 multi-thread application.
26 https://www.psacertified.org/security-certification/psa-certified-level-1/
36 - Generate/import a persistent key: secp256r1 (usage: ecdsa-with-SHA256)
37 - Display the public key based on the private key data above
38 - Calculate the SHA256 hash of a payload
39 - Sign the hash with the persistent key
40 - Verify the signature using the public key
41 - Destroy the key
45 - Generate/import a persistent key: secp256r1 (usage: ecdsa-with-SHA256)
46 - Set subject name in device CSR
47 - Generate device CSR in PEM format
48 - Encode device CSR as JSON
59 Demonstrates how to request an initial attestation token (IAT) from the TF-M
71 - macOS Mojave using QEMU 4.2.0 with gcc-arm-none-eabi-7-2018-q2-update
72 - macOS Mojave with gcc-arm-none-eabi-7-2018-q2-update
73 - Ubuntu 18.04 using Zephyr SDK 0.11.2
75 TF-M BL2 logs
78 Add the following to ``prj.conf`` to see the logs from TF-M BL2:
80 .. code-block:: cfg
88 1. Build Zephyr with a non-secure configuration
89 (``-DBOARD=mps2/an521/cpu0/ns``).
93 .. code-block:: bash
96 west build -p -b mps2/an521/cpu0/ns samples/tfm_integration/psa_crypto
100 .. code-block:: bash
103 rm -rf build
105 cmake -GNinja -DBOARD=mps2/an521/cpu0/ns ..
110 .. code-block:: bash
113 rm -rf build
115 cmake -DBOARD=mps2/an521/cpu0/ns ..
124 .. code-block:: bash
135 IMAGE1FILE: \SOFTWARE\tfm_sign.bin ; TF-M with application binary blob
142 Build Zephyr with a non-secure configuration (``-DBOARD=mps2/an521/cpu0/ns``)
147 .. code-block:: bash
150 west build -p -b mps2/an521/cpu0/ns samples/tfm_integration/psa_crypto -t run
154 .. code-block:: bash
157 rm -rf build
159 cmake -GNinja -DBOARD=mps2/an521/cpu0/ns ..
164 .. code-block:: bash
167 rm -rf build
169 cmake -DBOARD=mps2/an521/cpu0/ns ..
175 Build Zephyr with a non-secure configuration:
177 .. code-block:: bash
179 $ west build -p -b lpcxpresso55s69_ns samples/tfm_integration/psa_crypto/ --
181 Make sure your board is set up with :ref:`lpclink2-jlink-onboard-debug-probe`,
185 J-Link as follows:
187 .. code-block:: console
189 JLinkExe -device lpc55s69 -if swd -speed 2000 -autoconnect 1
190 J-Link>r
191 J-Link>erase
192 J-Link>loadfile build/tfm_merged.bin
202 Build Zephyr with a non-secure configuration
203 (``-DBOARD=nrf5340dk/nrf5340/cpuapp/ns`` or ``-DBOARD=nrf9160dk/nrf9160/ns``).
207 .. code-block:: bash
210 rm -rf build
212 cmake -GNinja -DBOARD=nrf9160dk/nrf9160/ns ..
219 .. code-block:: bash
221 nrfjprog -f NRF91 --program tfm/bin/bl2.hex --sectorerase
223 Finally, flash the concatenated TF-M + Zephyr binary.
227 .. code-block:: bash
234 Build Zephyr with a non-secure configuration
235 (``-DBOARD=bl5340_dvk/nrf5340/cpuapp/ns``).
239 .. code-block:: bash
242 rm -rf build
244 cmake -GNinja -DBOARD=bl5340_dvk/nrf5340/cpuapp/ns ..
246 Flash the concatenated TF-M + Zephyr binary.
250 .. code-block:: bash
252 west flash --hex-file tfm_merged.hex
257 .. code-block:: console
262 *** Booting Zephyr OS build v2.7.99-1102-gf503ba9f1ab3 ***
268 0 1 2 3 4 5 6 7 8 9 A B C D E F
277 00000080 01 FA 58 75 5F 65 86 27 CE 54 60 F2 9B 75 29 67 ..Xu_e.'.T`..u)g
278 00000090 13 24 8C AE 7A D9 E2 98 4B 90 28 0E FC BC B5 02 .$..z...K.(.....
285 00000100 56 5D A2 6A DF 34 C3 29 48 9A DC 38 06 66 53 48 V].j.4.)H..8.fSH
287 00000120 24 25 2B EB 70 D7 2C 6B FC 92 CD BE 5B 65 9E C7 $%+.p.,k....[e..
289 00000140 30 2E 30 2E 30 05 58 20 B3 60 CA F5 C9 8C 6B 94 0.0.0.X .`....k.
290 00000150 2A 48 82 FA 9D 48 23 EF B1 66 A9 EF 6A 6E 4A A3 *H...H#..f..jnJ.
299 000001E0 40 59 23 3E 80 5E E0 9F FA E3 F4 14 62 D3 15 A5 @Y#>.^......b...
301 00000200 41 97 BC 6F C6 7D 9C A5 21 BB 4C 2C D1 2C F3 66 A..o.}..!.L,.,.f
302 00000210 4E D4 85 D2 57 15 72 11 E8 9E 06 4F C4 46 D0 58 N...W.r....O.F.X
308 0 1 2 3 4 5 6 7 8 9 A B C D E F
309 00000000 04 07 93 39 CD 42 53 7B 18 8C 8A F1 05 7F 49 D1 ...9.BS{......I.
310 00000010 6B 30 D5 39 0D 1A 6E 95 BA 0C CD FE DB 59 A3 03 k0.9..n......Y..
315 [00:00:03.020,000] <inf> app: Calculating SHA-256 hash of value
317 0 1 2 3 4 5 6 7 8 9 A B C D E F
323 0 1 2 3 4 5 6 7 8 9 A B C D E F
324 00000000 9D 08 E3 E6 DB 1C 12 39 C0 9B 9A 83 84 83 72 7A .......9......rz
325 00000010 EA 96 9E 1D 13 72 1E 4D 35 75 CC D4 C8 01 41 9C .....r.M5u....A.
327 [00:00:03.032,000] <inf> app: Signing SHA-256 hash
329 0 1 2 3 4 5 6 7 8 9 A B C D E F
331 00000010 BF B7 38 78 2A 91 C8 82 32 F8 73 85 56 08 D2 A0 ..8x*...2.s.V...
332 00000020 A6 22 2C 64 7A C7 E4 0A FB 99 D1 8B 67 37 F7 13 .",dz.......g7..
335 [00:00:03.658,000] <inf> app: Verifying signature for SHA-256 hash
340 0 1 2 3 4 5 6 7 8 9 A B C D E F
341 00000000 24 5C B3 EB 88 D2 80 76 23 B3 07 CA 16 92 8F 3D $\.....v#......=
344 00000030 1B 30 6E 3C DA 80 F2 55 F7 FA 10 8B F5 78 CE 92 .0n<...U.....x..
345 00000040 92 FF F2 A3 22 4D 2D F6 62 39 6D A5 DD E1 E1 C4 ...."M-.b9m.....
347 00000060 8A B5 98 26 D3 1A 84 75 55 52 4F E1 6D 4B 84 99 ...&...uURO.mK..
348 00000070 0F C2 5E 88 D5 8B E6 AA 2F 61 DC 63 79 5B 69 3F ..^...../a.cy[i?
349 00000080 19 79 5A 78 49 29 22 92 9D F5 F3 FD 16 60 E2 72 .yZxI)"......`.r
350 00000090 EA F8 8E 32 7D 81 A0 21 0C 82 4A A8 4C EE 9C 0E ...2}..!..J.L...
351 000000A0 D7 BF 50 60 6C 65 8A 7C A6 CD C5 98 8B 15 EA F0 ..P`le.|........
352 000000B0 26 D0 15 F4 EB DE A0 FD 88 2F 72 8B ED 07 44 5C &......../r...D\
353 000000C0 91 46 17 8C 26 46 F2 7C BF 6B 45 63 B6 71 E7 51 .F..&F.|.kEc.q.Q
355 000000E0 80 ED 7E 9D 0A 21 09 9C 9C 55 A9 14 AF A2 66 65 ..~..!...U....fe
356 000000F0 DE 8D BE C2 8B 31 B8 ED 06 AE A9 0B 7E 62 75 87 .....1......~bu.
363 0 1 2 3 4 5 6 7 8 9 A B C D E F
365 00000010 C4 C0 B1 E9 64 CB 45 1F E3 4A 95 52 A8 75 B2 8C ....d.E..J.R.u..
366 00000020 4D F1 CB 4F C2 26 2C 90 C9 05 B2 E4 4C 2A E9 9D M..O.&,.....L*..
367 00000030 11 DF 35 1B 0E 86 D5 9C A1 1F FC FA ED 21 9A B5 ..5..........!..
378 -----BEGIN CERTIFICATE REQUEST-----
384 -----END CERTIFICATE REQUEST-----
390 …-----BEGIN CERTIFICATE REQUEST-----\nMIHrMIGQAgEAMC4xDzANBgNVBAoMBkxpbmFybzEbMBkGA1UEAwwSRGV2aWNlI…