| Moteur de recherche de fiches techniques de composants électroniques |
|
AN4240 Fiches technique(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4240 Fiches technique(HTML) 13 Page - STMicroelectronics |
|
13 / 30 page ![]() Doc ID024209 Rev 2 13/30 AN4240 Application code structure 5 Application code structure This section gives an overview of the application code implemented to test some CSE features as the encryption/decryption using ECB and CBC cipher modes and an example code in order to release a Secure Boot loading some cryptographic keys in the secure slots. 5.1 Peripherals and tools used • Device: SPC564xB/C • Compiler: GHS v6.1 • Debugger: Lauterbach • System clock: 120 MHz by PLL initialization • CGM (Clock Generation Module): PLL is configured as system clock • CSE module • ME: Mode entry in order to configure the Magic Carpet • SWT: Software Watchdog in order to disable the periodic reset 5.2 Code Implementation In order to load the cryptographic keys in the secure flash of the device, to release a secure boot and then start the demo application, three different GHS projects are implemented. First project is needed to load the cryptographic keys obtained off line, using an executable file precompiled in order to obtain all the five “M” parameters and the 2 K parameters to generate 10 user Crypto Keys, BOOT_MAC_KEY and MASTER_ECU_KEY. For more information read the Appendix A at the end of this document. Second project is used to release a Secure Boot OK, adding in the start up file and in the locator file, few lines of code and implementing the Secure Boot Procedure as describe in Figure 5. Third project is the demo application code which shows the main differences between the ECB and CBC cipher mode, as described in the previous paragraph. The first application code configures the device in order to have the following: • Basic configuration procedure: – Disable Software Watchdog – Initialize Magic Carpet – initialize PLL to 120 MHz from 40 MHz of the external oscillator • Initialization of the CSE module • Updating a blank sample and loading the cryptographic keys into the secure flash – Issue a Get UID command – Issue a LOAD KEY command |
|
Lien URL |
| ALLDATASHEET vous a-t-il été utile ? [ DONATE ] |
À propos de Alldatasheet | Publicité | Contactez-nous | Politique de confidentialité | Lien vers la fiche technique | Echange de liens | Fabricants All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |