Using Cryptographic Service Engine 2 (CSE2)

Size: px
Start display at page:

Download "Using Cryptographic Service Engine 2 (CSE2)"

Transcription

1 NXP Semiconductors Document Number: AN5418 Application Note Rev. 0, 03/2017 Using Cryptographic Service Engine 2 (CSE2) An introduction to CSE2 module and its working 1 Introduction This application note describes the usage of Cryptographic Services Engine2 (CSE2). The module can be used to authenticate or to encrypt/ decrypt any kind of data. All the features supported by CSE2 are compliant to Secure Hardware Extension (SHE) functional specification version 1.1. After reading this application note, reader should be able to understand the basic functionality of CSE2 and the usage of various commands of CSE2. This application note will not explain SHE specification and assumes the reader to have information on the same. 1.1 Introduction to CSE2 The CSE2 is a peripheral module that implements the security functions described in the SHE Functional Specification Version 1.1. The CSE2 design includes a host interface with a set of memory mapped registers that are used by the CPU to issue commands and a system bus interface that allows the CSE2 to directly access system memory. There is dedicated secure memory flash block for the storage of CSE2 firmware and secure keys. Its basic features are: - Secure Storage Contents 1 Introduction Introduction to CSE AES-128 encryption and decryption CMAC Secure boot Secure memory Secure storage for cryptographic keys Key attributes CSE2 commands CSE2 error handling How to use CSE Execution of Secure Boot CSE2 Commands with example code APPENDIX A Memory update protocol Example Code For Updating a Key In Secure Memory APPENDIX B Resetting the secure flash to its factory state APPENDIX C Standard output of predefined data as per SHE Spec APPENDIX D Brief steps to operate CSE AES-128 Encryption/Decryption AES-128 CMAC calculation and Authentication True Random Generation Secure Boot Modes of operation CSE2 supports operation in normal as well as in debug mode. Use of secure keys is controlled based on the flags set on the keys. These flags may restrict the usage of key as per debugger connection or secure boot failure. For details refer Security flags on page 6. CSE2 has an internal low power mode in which the access to register interface is allowed. This means only registers interface can be accessed in CSE2 s low power mode but none of the operation is supported.

2 Introduction AES-128 encryption and decryption Block diagram CSE2 contains command processor, host interface, system bus interface, local memory, AES logic and True random number generator as shown in the figure below. Figure 1. CSE block diagram 1.2 AES-128 encryption and decryption CSE2 supports AES-128 encryption and decryption in ECB and CBC modes. AES stands for Advanced Encryption Standard. This algorithm was selected and specified by the US National Institute of Standard and Technology (NIST)[FIPS197] after a public championship. The AES algorithm is symmetric cipher, that means encryption and decryption uses the same key. CSE2 supports two of its cipher modes, i.e. ECB and CBC Electronic Codebook (ECB) This cipher mode is the simplest cipher mode as each block to encrypted or decrypted has no relationship with another block. 2 NXP Semiconductors

3 Introduction CMAC Figure 2. ECB block Diagram Cipher-block Chaining (CBC) Cipher-block Chaining (CBC) mode invented in 1976, is one of the most important cipher modes. In this mode, the output of last encoding step is xor ed with the input block of actual encoding step. Because of this, addition is required for first encoding step that is known as initializing vector (IV). Figure 3. CBC Block Diagram 1.3 CMAC CMAC is basically a technique used for authenticity of messages and data. It uses the AES algorithm. This algorithm takes a secret key and arbitrary-length message that is to be authenticated as inputs, and returns a CMAC value as output. The CMAC value protects the message data integrity as well as its authenticity, by allowing verifiers (who also possess the secret key) to detect any changes to the message content. NXP Semiconductors 3

4 Introduction Secure boot Figure 4. Explanation of CMAC operation 1.4 Secure boot CSE2 has a secure boot mechanism which allows users to authenticate boot code in flash. The MCU can be configured in such a way that, on every reset cycle a section of code is authenticated. Authentication follows the process of MAC generation and the generated MAC will be compared with a value previously stored in secure flash. This is supported only for flash boot modes. It is not supported for other boot modes (serial download, wakeup to RAM) as this may present a potential security issue. The key to authenticate the boot code is BOOT_MAC_KEY. A value for comparison is stored in secure flash and is called BOOT_MAC. Details on secure boot can be found in Execution of Secure Boot on page 10. There can be different modes of secure boot that can be configured through Device Configuration Format (DCF s). These different secure boot configurations will decide the gating of main core with secure boot Parallel secure boot mode In this boot mode, main core is released in parallel with CSE2. It can also be said that SECURE_BOOT command will be executed by CSE2 in parallel to main core. In this booting mode, system frequency can be switched to PLL without interrupting CSE2. Due to this, this booting mode is much faster in authentication than any other booting mode Sequential secure boot mode In this boot mode, main core is release after CSE2 has finished executing SECURE_BOOT command. Core logic is clock gated from hardware until SECURE_BOOT has been finished by CSE2. Core SWT will be running in background that will generate reset if authentication taken longer time or in case SECURE_BOOT command is stuck due to unfavorable conditions. SWT configured timeout may vary from device to device so it if preferable to refer SoC specific chapter for this information. In this booting mode, system frequency will be on default IRC, i.e. 16MHz, so this booting mode is slower in authentication that parallel booting mode Strict sequential boot mode This boot mode is same as of sequential boot mode. The only difference between both the boot modes is that in sequential boot mode core clock gating logic will be released once the SECURE_BOOT command is completed by CSE2. It doesn t matter whether secure boot is passed or failed in this case (MAC generated matches with reference MAC or no). If secure boot is passed then all the secure keys will be available, but if secure boot fails, in that case keys with BOOT_PROT (refer to Boot Protection Flag (BP) on page 6 for details on BOOT_PROT) flag set will not be available for use. Whereas, in case of strict sequential boot mode, core clock gating logic will never be released if secure boot fails. Device can boot up successfully only if secure boot is passed. 4 NXP Semiconductors

5 Introduction Secure memory 1.5 Secure memory CSE2 has a dedicated secure memory flash block where secure firmware (CSE2 firmware) and secure keys are stored. When parts are received from the factory, these are populated with secure firmware, Unique Identification Number (UID) and a secret key. Secret key is a random number whose value is never disclosed to anyone. User can store user keys in the same memory. 1.6 Secure storage for cryptographic keys The CSE2 provides secure, nonvolatile storage for cryptographic keys as described in the SHE Functional Specification. The keys are stored in 25 memory slots, with one ROM slot, 23 nonvolatile slots, and one RAM slot as shown in Table 1. Memory slots on page 5. The first four slots have a dedicated use; the other slots are available for application specific keys. The CSE2 extends the SHE specification by providing 10 extra application key slots (KEY_11 KEY_20) which are enabled by setting the CSE_CR[KBS] bit. The BOOT_MAC slot is loaded with a MAC value used by the secure boot process. All other slots are used for encryption or message authentication keys. The SECRET_KEY slot is programmed with a random value during device fabrication. All CSE2 encryption and message authentication commands specify a key by its Key ID. Table 1. Memory slots Slot name KBS Key ID Type SECRET_KEY x 0x0 ROM MASTER_ECU_KEY x 0x1 non volatile BOOT_MAC_KEY x 0x2 non volatile BOOT_MAC x 0x3 non volatile KEY_1-KEY_10 0 0x4-0xD non volatile KEY_11-KEY_20 1 0x4-0xD non volatile RAM_KEY x 0xE RAM In addition to the 25 memory slots, the CSE2 holds a 120-bit read-only UID that is programmed during device fabrication. The UID is used in the memory update procedure and is available for application-specific uses. 1.7 Key attributes There are different attributes of secure key. It includes Security flags, counter value, KEY_ID and so on. Every key has its own Key_ID and counter value. Security flags are set by user. The table below defines the structure of secure key. Table 2. Physical memory slot format Offset 0x00 0x04 Value Key W0 Key W1 Table continues on the next page... NXP Semiconductors 5

6 Introduction Key attributes Table 2. Physical memory slot format (continued) Offset 0x08 0x0C Value Key W2 Key W3 0x10 Key ID Reserved Flags 0x14 0x18 0x1C Counter Reserved Checksum Security flags Each key has six flags associated to it that defines the usage of key in different conditions. Table 3. Memory slot security flags Flag name VERIFY_ONLY WRITE_PROT BOOT_PROT Description If set, the memory slot key cannot be used by the GENERATED_MAC command, only by the VERIFY_MAC command. This bit has no effect if KEY_USAGE =0 If set, the memory slot can be updated If set, the memory slot is disabled if CSE_SR[BOK] =0 or CSE_SR[BFN]=0 DEBUG_PROT If set, the memory slot is disabled if CSE_SR[EDB] = 1 KEY_USAGE WILDCARD If set, the memory slot holds a MAC key; otherwise, it holds an encryption key If set, the memory slot the memory slot cannot be updated with wildcard UID Write Protection Flag (WP) Setting this flag prevents the key from being updated even if an authorization key is known. Also, this flag prevents to reset the part to factory settings (See Resetting the secure flash to its factory state on page 31). NOTE As setting this flag is an irreversible step, so precaution is suggested while setting this flag Boot Protection Flag (BP) If this flag is set, then this key cannot be used if secure boot fails. By secure boot fails it means if the MAC value calculated in the SECURE_BOOT step did not match the reference MAC value stored in secure Flash Debugger Usage Protection Flag (DP) If this flag is set, then this key cannot be used if an external debugger is (or has ever been) connected to the MCU since it was last reset. 6 NXP Semiconductors

7 Introduction CSE2 commands Wildcard Protection Flag (WC) If this flag is set, then this key cannot be updated using a special wildcard UID(UID=0) Key Usage Flag (KU) This flag determines if a key can be used for encryption/decryption or for MAC generation/verification (CMAC). If the flag is set, the key is used for MAC generation/verification. If the flag is clear, the key is used for encryption VERIF_ONLY Flag If this flag is set, then this key can be used only for VERIFY_MAC command. This key can not be used for GEN_MAC command. The VERIF_ONLY security flag is a CSE2-specific feature that is not defined in the SHE specification. If the CSE_CR[SFE] bit is set when the LOAD_KEY command is executed, the security flag field (FID) in the M2 message is extended by one bit with the VERIF_ONLY flag and the adjacent zero fill field is reduced to 94-bits. The CSE_CR[SFE] bit has no effect on the enforcement of the VERIF_ONLY flag for commands issued after the LOAD_KEY. Table 4. Information to be stored with Keys as per SHE spec Slot Name Key ID Write_Prot Boot_Prot Debug_Pro Wildcard Key_Usage Counter MASTER_ECU_KE Y 0x1 Yes Yes Yes Yes - Yes Boot_MAC_KEY 0x2 Yes - Yes Yes - Yes BOOT_MAC 0x3 Yes - Yes Yes - Yes KEY<n> 0x4-0xD Yes Yes Yes Yes Yes Yes RAM KEY 0xE Key counter Each user key has a 28-bit long counter that must be increased on every time key is updated. The new counter value is used in the derivation of M2 when a key is being updated (See Generate M2 on page 27) Key ID Each key has an identifying number associated with it. This number is used to identify the key being updated and the key authorizing the update. Table 1. Memory slots on page 5 shows the Key_ID for each key. 1.8 CSE2 commands There are different commands of CSE2 that are used to perform different types of operations. The below table describes different commands available for CSE2 and its corresponding command ID. Table 5. List of Available commands along with Command ID Sr. No Command Name Command ID 1 ENC_ECB 0x01 Table continues on the next page... NXP Semiconductors 7

8 Introduction CSE2 error handling Table 5. List of Available commands along with Command ID (continued) Sr. No Command Name Command ID 2 ENC_CBC 0x02 3 DEC_ECB 0x03 4 DEC_CBC 0x04 5 GENERATE_MAC 0x05 6 VERIFY_MAC 0x06 7 LOAD_KEY 0x07 8 LOAD_PLAIN_KEY 0x08 9 EXPORT_RAM_KEY 0x09 10 INIT_RNG 0x0A 11 EXTEND_SEED 0x0B 12 RND 0x0C 13 SECURE_BOOT 0x0D 14 BOOT_FAILURE 0x0E 15 BOOT_OK 0x0F 16 GET_ID 0x10 17 CANCEL 0x11 18 DEBUG_CHAL 0x12 19 DEBUG_AUTH 0x13 20 TRNG_RND 0x14 21 INIT_CSE 0x15 22 MP_COMPRESS 0x16 For detailed description of each command along with example code, refer to CSE2 Commands with example code on page CSE2 error handling When the CSE2 command processor encounters an error condition, it stops processing and returns an error code as described in Table 6. The CSE_SR[BSY] and CSE_SR[EX] bits are cleared and interrupt request is generated same as of generated during command had completed successfully. In most cases, error conditions are detected before data processing begins and no output values are written. Intermediate or invalid output data is never written to the parameter registers or system memory. However, it is possible for outputs to system memory to be partially written when an error occurs. The CSE does not zero out this partially written data. 8 NXP Semiconductors

9 Introduction CSE2 error handling Error Code No. Error Description Error Conditions Table 6. Error code summary 0x0 No error 1. Command successfully executed with no errors encountered. 0x2 0x3 0x4 Command sequence error Key not available Invalid key 1. Command issued (except for CANCEL) before the SECURE_BOOT or INIT_CSE command. 2. The DEBUG_AUTH command issued before the DEBUG_CHAL command. 3. SECURE_BOOT or INIT_CSE command issued after an initial SECURE_BOOT or INIT_CSE is issued. 1. A required key is not available due to a BOOT_PROT or DEBUG_PROT security flag restriction. 1. The specified key slot is not valid for the command. (See the SHE specification) 2. The specified key slot is not available due to a KEY_USAGE security flag restriction 0x5 Empty key 1. The specified key slot is empty. 0x6 0x7 0x8 0x9 No secure boot Key write protected Key update error Random number seed not initialized 1. SECURE_BOOT issued when secure boot is disabled or the BOOT_MAC_KEY slot is empty. 2. BOOT_FAIL or BOOT_OK issued with incorrect settings for either the CSE_SR[SB], CSE_SR[BFN] or CSE_SR[BOK] flag. 1. Attempt to load a key slot with the WRITE_PROT security flag set. 2. Attempt to enter internal debug mode (DEBUG_CHAL, DEBUG_AUTH) with a WRITE_PROT security flag set in one or more key slots. The LOAD_KEY command failed due to one of the following conditions: 1. The M3 MAC value is invalid. 2. The wildcard UID is specified with the WILDCARD flag set. 3. The specified UID does not match the device UID. 4. The update counter or security flag values are not zero when loading the RAM_KEY slot. 5. The specified update counter value is not greater than the current counter value for the slot. (Counter value is zero for an empty slot) 1. RND, EXTEND_SEED or DEBUG_CHAL command issued before the INIT_RNG command. Table continues on the next page... NXP Semiconductors 9

10 How to use CSE2 Execution of Secure Boot Error Code No. 0x0A 0x0B 0x0C 0x10 0x11 Error Description Internal debug not allowed Command issued while busy System memory error Internal memory error Invalid command Error Conditions Table 6. Error code summary (continued) 1. DEBUG_AUTH command issued with invalid MAC value. 1. Command issued when the CSE_SR[BSY] bit is set. 1. A system memory error was encountered while executing the command. (The CSE flash memory block error code is generated for bus errors encountered when accessing the CSE flash memory blocks) 1. An internal memory error was encountered while executing the command. 1. Value written to CSE_CMD register is out of range. 0x12 TRNG error 1. One or more statistical tests run on the TRNG output failed. 0x13 0x14 0x15 CSE flash block error Internal command processor error Length error 1. Error reading, programming, or erasing one of the CSE flash memory blocks. 2. UID or SECRET_KEY required but not available. 1. MAC length for VERIFY_MAC command is greater than Message length for GENERATE_MAC, VERIFY_MAC, or MP_COMPRESS command is greater than 0x7FFFFFFFF (4GB). 1. MAC length for VERIFY_MAC command is greater than Message length for GENERATE_MAC, VERIFY_MAC, or MP_COMPRESS command is greater than 0x7FFFFFFFF (4GB). 2 How to use CSE2 Entire functionality of CSE2 depends upon CSE2 firmware and secure keys. When part leaves from factory, it will be programmed with secure firmware, UID and Secret key. To make CSE2 functional, user need to upload its own keys. This section of application note will help the reader to understand how to execute secure boot, how to load user keys and use of all the commands of CSE Execution of Secure Boot Secure boot along with secure boot mode can be enabled from DCF s. On some of the devices it may be programmed from factory if not, then it can be enabled by user. Secure image address will be taken from RCHW and length of secure image on which MAC is to be calculated is again configurable from DCF s or RCHW on some of the devices Once done with these settings, further to execute secure boot on these, the user needs to program MASTER_ECU_KEY and BOOT_MAC_KEY. These keys can be loaded through software using LOAD_KEY command. 10 NXP Semiconductors

11 How to use CSE2 Execution of Secure Boot Once these keys are loaded successfully, give a power cycle to the device. After the reset is released, CSE2 implements the SHE secure boot protocol. In some device boot modes, the BAM or system boot logic issues the SECURE_BOOT command to the CSE2, which starts the secure boot process. For details about how and when the SECURE_BOOT command is issued on this chip, see the chip-specific CSE2 information. The first step in this process is for the CSE2 is to download the command processor firmware and memory slot data from flash memory blocks into local memory. If BOOT_MAC_KEY slot is empty, CSE_SR[SB] flag is cleared and the process is finished. Otherwise, the CSE_SR[SB] flag is set and CSE2 calculates the MAC over the specified bootloader code. If the BOOT_MAC slot is empty, the calculated MAC is loaded into the BOOT_MAC slot, the CSE_SR[BIN] and CSE_SR[BFN] flags are set, and the process is finished. Otherwise, the calculated MAC value is compared to the value in the BOOT_MAC slot. If the values match, the CSE_SR[BOK] bit is set; otherwise, the CSE_SR[BFN] bit is set. If the CSE_SR[BOK] flag is set, the user boot code can issue the BOOK_OK command which sets the CSE_SR[BFN] bit. The memory slots that have the BOOT_PROT flag set are enabled when both the CSE_SR[BFN] and CSE_SR[BOK] flags are set. The SECURE_BOOT command can run either before the user boot code is executed or in parallel with the user boot code. If the parallel mode is used, the user boot code must suspend command processing (set CSE_CR[SUS] to 1) while performing any operations such as configuring the flash controller that may interfere with the CSE2 accessing flash memory. A device-specific bit selects whether to run the SECURE_BOOT command before or in parallel with the user boot code. For details about this bit, see the chip-specific CSE2 information. The CSE2 implements an internal timer that is started when the SECURE_BOOT command is issued. The initial value of the timer is set to 0x00F4_2400 (16,000,000 CSE2 system clocks). If the timer expires before the SECURE_BOOT command completes, any application code intended to be blocked by the SECURE_BOOT process will instead see the non-completed SECURE_BOOT status of CSE_SR[BSY]=1 and CSE_SR[BOK]=0. In the event of a SECURE_BOOT timeout, the CSE2 will continue executing the SECURE_BOOT command until completion, until suspended, or until receiving the CANCEL command from the application code. There is no error code associated with a SECURE_BOOT timeout. NXP Semiconductors 11

12 How to use CSE2 CSE2 Commands with example code Figure 5. Explanation of CSE2 boot process 2.2 CSE2 Commands with example code This section of application note will help the reader to understand all the CSE2 commands in details along with the example code for all the commands. 12 NXP Semiconductors

13 2.2.1 Encrypt ECB The ENC_ECB command performs AES-128 encryption in ECB mode on any 128-bit blocks of data with the parameters specified in the table below. Table 7. ENC_ECB command parameters CSE_CMD 0x01 - CSE_P1 Key ID Input CSE_P2 Number of blocks (n) Input CSE_P3 First plain text block address Input CSE_P4 First cipher text block address Output CSE_P5 - - How to use CSE2 CSE2 Commands with example code Example code: typedef volatile unsigned int vuint32_t; vuint32_t plain_text [16]; vuint32_t cipher_text [16]; CSE.P1.R = KEY_ID; /* Key used for encryption has KEY_USAGE=0 */ CSE.P2.R = 4; /* 4 blocks of 128-bit data to be encrypted*/ CSE.P3.R = (vuint32_t) & plain_text; /*Pointer to data to be encrypted*/ CSE.P4.R = (vuint32_t) & cipher_text; /*Pointer where encrypted data to be stored*/ CSE.CMD.R = 0x01; /* ENC_ECB command ID*/ After successful command execution, output will be stored in cipher_text [4] Encrypt CBC The ENC_CBC command performs AES-128 encryption on any 128-bit blocks of data in CBC mode with the parameters specified in the table below. The number of blocks parameter is a 32-bit value. Table 8. ENC_CBC command parameters CSE_CMD 0x02 - CSE_P1 Key ID Input CSE_P2 IV Address Input CSE_P3 Number of blocks (n) Input CSE_P4 First plain text block address Input CSE_P5 First cipher text block address Output Example code: typedef volatile unsigned int vuint32_t; NXP Semiconductors 13

14 How to use CSE2 CSE2 Commands with example code vuint32_t plain_text [16]; vuint32_t cipher_text [16]; vuint32_t IV_ARRAY[4]; CSE.P1.R = KEY_ID; /* Key used for encryption has KEY_USAGE=0 */ CSE.P2.R = (vuint32_t) & IV_ARRAY; /* Pointer to IV array*/ CSE.P3.R = 4; /* 4 blocks of 128-bit data to be encrypted*/ CSE.P4.R = (vuint32_t) & plain_text; /*Pointer to data to be encrypted*/ CSE.P5.R = (vuint32_t) & plain_text; /*Pointer where encrypted data to be stored*/ CSE.CMD.R = 0x02; /* ENC_CBC command ID*/ while(cse.sr.b.bsy==1) {}; After successful command execution, output will be stored in cipher_text [4] Decrypt ECB The DEC_ECB command performs AES-128 ECB decryption on any 128-bit blocks of data with the parameters specified in the table below. Table 9. DEC_ECB command parameters CSE_CMD 0x03 - CSE_P1 Key ID Input CSE_P2 Number of blocks (n) Input CSE_P3 First cipher text block address Input CSE_P4 First plain text block address Output CSE_P5 - - Example code typedef volatile unsigned int vuint32_t; vuint32_t plain_text [16]; vuint32_t cipher_text [16]; CSE.P1.R = KEY_ID; /* Key used for encryption has KEY_USAGE=0 */ CSE.P2.R = 4; /* 4 blocks of 128-bit data to be encrypted*/ CSE.P3.R = (vuint32_t) & plain_text; /*Pointer to data to be encrypted*/ CSE.P4.R = (vuint32_t) & plain_text; /*Pointer where encrypted data to be stored*/ CSE.CMD.R = 0x03; /* DEC_ECB command ID*/ while(cse.sr.b.bsy==1) {}; After successful command execution, output will be stored in plain_text [4] Decrypt CBC The DEC_CBC command performs AES-128 decryption in CBC mode on any 128-bit blocks of data with the parameters specified in the table below. The number of blocks parameter is a 32-bit value. 14 NXP Semiconductors

15 How to use CSE2 CSE2 Commands with example code Table 10. DEC_CBC command parameters CSE_CMD 0x04 - CSE_P1 Key ID Input CSE_P2 IV address Input CSE_P3 Number of blocks (n) Input CSE_P4 First cipher text block address Input CSE_P5 First plain text block address Output Example code typedef volatile unsigned int vuint32_t; vuint32_t plain_text [16]; vuint32_t cipher_text [16]; vuint32_t IV_ARRAY[4]; CSE.P1.R = KEY_ID; /* Key used for encryption has KEY_USAGE=0 */ CSE.P2.R = (vuint32_t) & IV_ARRAY; /* Pointer to IV array*/ CSE.P3.R = 4; /* 4 blocks of 128-bit data to be encrypted*/ CSE.P4.R = (vuint32_t) & plain_text; /*Pointer to data to be encrypted*/ CSE.P5.R = (vuint32_t) & plain_text; /*Pointer where encrypted data to be stored*/ CSE.CMD.R = 0x04; /* DEC_CBC command ID*/ while(cse.sr.b.bsy==1) {}; After successful command execution, output will be stored in plain_text [4] Generate MAC The GENERATE_MAC command calculates the MAC of a given message with the parameters specified in the table below. The AES CMAC algorithm is used to calculate a 128-bit MAC output. The message length input is a 64-bit value that specifies the length of the message in bits. A length error (EC = 0x15) is returned if the message length is greater than 0x7ffffffff (4 GB). Table 11. GENERATE_MAC command parameters CSE_CMD 0x05 - CSE_P1 Key ID Input CSE_P2 Message length(bits) address Input CSE_P3 Message start address Input CSE_P4 MAC address Output CSE_P5 - - Example code: typedef volatile unsigned int vuint32_t; unsigned long long int length =256; NXP Semiconductors 15

16 How to use CSE2 CSE2 Commands with example code vuint32_t MSG_ARRAY [8]; vuint32_t MAC_VALUE [4]; CSE.P1.R = KEY ID; /* KEY has KEY_USAGE=1 (CMAC) */ CSE.P2.R = (unsigned long long int)&length ); /* MAC to be calculated of 256 bits*/ CSE.P3.R = (vuint32_t) & MSG_ARRAY; /*Message of which MAC is to be calculated*/ CSE.P4.R = (vuint32_t) & MAC_VALUE; /*Pointer where MAC will be stored*/ CSE.CMD.R = 0x5 /* Command ID of Generate MAC*/ if (CSE.ECR.R!= 0) fail_count++; After successful command execution, output MAC will be stored in MAC_VALUE [4] VERIFY_MAC The VERIFY_MAC command verifies the MAC of a given message with the parameters specified in the table below. The AES CMAC algorithm is used to calculate a 128-bit MAC that is truncated per the MAC length parameter, which specifies the number of most significant bits in the MAC to compare. A MAC length value of 0 indicates that all 128 bits are compared; a value greater than 128 returns a length error (EC = 0x15). The message length input is a 64-bit value that specifies the length of the message in bits. A length error(ec=0x15) is returned if message length is greater than 0x7fffffff(4GB). If the input MAC matched the MAC calculated over the message, the CSE.P5 register is set to 0, otherwise it is set to 1. Table 12. VERIFY_MAC command parameters CSE_CMD 0x06 - CSE_P1 Key ID Input CSE_P2 Message length(bits) address Input CSE_P3 Message start address Input CSE_P4 MAC address Input CSE_P5 MAC length (bits) / Verification status Input / Output Example Code: typedef volatile unsigned int vuint32_t; unsigned long long int length =256; unsigned long long int bits_to_validate =128; compared*/ vuint32_t MSG_ARRAY [8]; vuint32_t MAC_VALUE [4]; /*can be 0 or 128 if all the bits are to be CSE.P1.R = KEY ID; /* KEY has KEY_USAGE=1 (CMAC) */ CSE.P2.R = (unsigned long long int)&length ); /* MAC to be calculated of 256 bits*/ CSE.P3.R = (vuint32_t) & MSG_ARRAY; /*Message of which MAC is to be calculated*/ CSE.P4.R = (vuint32_t) & MAC_VALUE; /*Pointer where MAC will be stored*/ CSE.P5.R = (unsigned long long int) & bits_to_validate); /*Bits to be compared*/ CSE.CMD.R = 0x6 /* Command ID of Generate MAC*/ if (CSE.ECR.R!= 0) fail_count++; if (CSE.P5.R!= 0) fail_count++; After successful command execution, verification status can be read in CSE.P5 register. 16 NXP Semiconductors

17 2.2.7 LOAD_KEY The LOAD_KEY command updates a memory slot using parameters specified in the table below per SHE memory slot update protocol. The 128-bit M1 message contains the UID, Key ID and authentication Key ID. The 256-bit M2 message contains the new security flag, counter and the key value all encrypted using a key derived from the Authentication key. The 128-bit M3 message is a MAC generated over M1 and M2 messages. The 256-bit M4 message is the concatenation of UID, Key ID, Authorization Key ID and encrypted counter value. The 128-bit M5 message is the MAC calculated over message M4. For details on how to generate M1-M5 messages, refer to Memory update protocol on page 26. Table 13. LOAD_KEY command parameters CSE_CMD 0x07 - CSE_P1 M1 address Input CSE_P2 M2 address Input CSE_P3 M3 address Input CSE_P4 M4 address Output CSE_P5 M5 address Output How to use CSE2 CSE2 Commands with example code Example Code typedef volatile unsigned int vuint32_t; vuint32_t M1 [4]; vuint32_t M2 [8]; vuint32_t M3 [4]; vuint32_t M4 [8]; vuint32_t M5 [4]; CSE.P1.R = (vuint32_t) & M1; /* Pointer to M1 */ CSE.P2.R= (vuint32_t) & M2; /* Pointer to M2 */ CSE.P3.R= (vuint32_t) & M3; /* Pointer to M3 */ CSE.P4.R = (vuint32_t) & M4; /* Pointer to M4 */ CSE.P5.R = (vuint32_t) & M5; /* Pointer to M5 */ CSE.CMD.R = 0x7 /* Command ID of LOAD_KEY*/ LOAD_PLAIN_KEY The LOAD_PLAIN_KEY command updated the RAM key memory slot with 128-bit plain text key with the parameters shown in below table. Table 14. LOAD_PLAIN_KEY command parameters CSE_CMD 0x08 - CSE_P1 Plain Key address Input Table continues on the next page... NXP Semiconductors 17

18 How to use CSE2 CSE2 Commands with example code Table 14. LOAD_PLAIN_KEY command parameters (continued) CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example code: typedef volatile unsigned int vuint32_t; /*User specific key*/ vuint32_t KEY_TO_BE_LOADED [4] = {0xABABABAB, 0xCDCDCDCD, 0xEFEFEFEF, 0x }; CSE.P1.R = (vuint32_t) & KEY_TO_BE_LOADED; /* Pointer to key to be loaded */ CSE.CMD.R = 0x8 /* Command ID of LOAD_PLAIN_KEY*/ /*Polling for busy bit to get clear*/ After successful execution of command, RAM_KEY (KEY_ID =0xE) will be loaded EXPORT_RAM_KEY The EXPORT_RAM_KEY command exports the RAM key data with the parameters in the table below. Only keys loaded with the LOAD_PLAIN_KEY command may be exported. The output messages are compatible with the messages used for LOAD_KEY. Table 15. EXPORT_RAM_KEY command parameters CSE_CMD 0x09 - CSE_P1 M1 address Output CSE_P2 M2 address Output CSE_P3 M3 address Output CSE_P4 M4 address Output CSE_P5 M5 address Output Example Code typedef volatile unsigned int vuint32_t; vuint32_t M1 [4]; vuint32_t M2 [8]; vuint32_t M3 [4]; vuint32_t M4 [8]; vuint32_t M5 [4]; CSE.P1.R = (vuint32_t) & M1; /* Pointer to M1 */ CSE.P2.R = (vuint32_t) & M2; /* Pointer to M2 */ CSE.P3.R = (vuint32_t) & M3; /* Pointer to M3 */ 18 NXP Semiconductors

19 How to use CSE2 CSE2 Commands with example code CSE.P4.R = (vuint32_t) & M4; /* Pointer to M4 */ CSE.P5.R = (vuint32_t) & M5; /* Pointer to M5 */ CSE.CMD.R = 0x9 /* Command ID of EXPORT_RAM_KEY*/ All the parameters of this command will be generated as output. Once this command is executed successfully, these M1-M5 messages can be used as input to LOAD_KEY command Initialize RNG INIT_TRNG command initializes the internal PRNG state with a seed value generated by the TRNG and sets the CSE.SR[RIN] flag. It takes 2048 TRNG clock cycles to generate a seed value. Divider in CSE.CR[DIV] register must be set properly before executing this command. There is a very small probability that this command will return TRNG error (EC =0x12). INIT_TRNG command must be issued after each reset before RND command is issued. This command has no parameters to be passed. Table 16. INIT_TRNG command parameters CSE_CMD 0x0A - CSE_P1 - - CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example Code: Refer to example code of Generate random number on page Extended PRNG Seed EXTENDED_SEED command extends the state of the PRNG using a 128-bit entropy input value. The current PRNG state and the input data are compressed into a new PRNG state value. This command is issued with parameters shown in below table. Table 17. EXTENDED_PRNG command parameters CSE_CMD 0x0B - CSE_P1 Entropy Value Address input CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example Code: NXP Semiconductors 19

20 How to use CSE2 CSE2 Commands with example code Refer to example code of section Generate random number on page Generate random number RND command generates 128-bit random value and updates the state of the internal PRNG. The PRNG state must be initialized after reset using INIT_TRNG command before this command can be issued. This command can be issued with parameters shown in below table: Table 18. RND command parameters CSE_CMD 0x0C - CSE_P1 Random Value address Output CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - Example Code typedef volatile unsigned int vuint32_t; vuint32_t entropy [4]; vuint32_t random_number [4]; // Setting the divider value CSE.CR.B.DIV = k; description*/ // Initializing TRNG CSE.CMD.R = 0x0A; while(cse.sr.b.rin==0) {}; /*For value of K, refer CR register /*Command ID for INIT_TRNG*/ /*Polling RIN flag to get set*/ // Extending Entropy (This command is optional if extended entropy is required to be added) CSE.P1.R = (vuint32_t) & entropy; CSE.CMD.R = 0x0B; /*Command ID for EXTENDED_SEED*/ // Generating Random number CSE.P1.R = (vuint32_t) & random_number; CSE.CMD.R = 0x0C; /*Command ID for RND*/ 20 NXP Semiconductors

21 SECURE_BOOT The SECURE_BOOT command loads the command processor firmware and memory slot data from the CSE flash memory blocks, and then it executes the SHE secure boot protocol using the parameters shown in the table below. For details on SECURE_BOOT, refer Execution of Secure Boot on page 10. Table 19. SECURE_BOOT command parameters CSE_CMD 0x0D - CSE_P1 Bootloader size Input CSE_P2 Bootloader start address Input CSE_P3 Firmware Version Output CSE_P4 - - CSE_P5 - - How to use CSE2 CSE2 Commands with example code BOOT_FAILURE BOOT_FAILURE command sets the CSE.SR[BFN] flag and clears the CSE.SR[BOK] flag. Once CSE.SR[BOK] flag is cleared, keys with BOOT_PROT flag set will be disabled for use. This command has no parameters to be passed as shown in the table below. Table 20. BOOT_FAILURE command parameters CSE_CMD 0x0E - CSE_P1 - - CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example code: CSE.CMD.R= 0x0E /*Command ID for BOOT_FAILURE*/ BOOT_OK BOOT_OK command sets the CSE.SR[BFN] flag and leaves the CSE.SR[BOK] flag set to confirm the successful completion of secure boot process. This enabled the use of keys with BOOT_PROT flag set if they are not disabled for some other reason. This command has no parameters to be passed as shown in the table below. NXP Semiconductors 21

22 How to use CSE2 CSE2 Commands with example code Table 21. BOOT_OK command parameters CSE_CMD 0x0F - CSE_P1 - - CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example code: CSE.CMD.R = 0x0F /*Command ID for BOOT_OK*/ GET_ID GET_UID command returns the UID, CSE_SR [24:31] and 128-bit MAC calculated over the concatenation of a 128-bit input challenge value, UID and CSE_SR [24:31]. MASTER_ECU_KEY is used for MAC calculation. A value of zero is returned for the MAC if MASTER_ECU_KEY slot is empty. UID output is 128-bit value with eight least significant bits set to zero. This command is issued with parameters as shown in the table below. Table 22. GET_UID command parameters CSE_CMD 0x10 - CSE_P1 Challenge address Intput CSE_P2 UID output address Output CSE_P3 CSE_SR [24:31] Output CSE_P4 MAC address Output CSE_P5 - - Example Code typedef volatile unsigned int vuint32_t; char get_id_challenge[16] = {0xE6,0xFE,0x09,0x7D,0xBC,0x72,0x3E,0x2C,0xF0,0xEA, 0x41,0x6F, 0xE6,0x8A, 0xD3,0x3E}; /* user selects these values*/ vuint32_t GET_ID_UID [4]; vuint32_t UID_MAC [4]; CSE.P1.R = (vuint32_t) & get_id_challenge; /*Pointer to ID challenge*/ CSE.P2.R = (vuint32_t) & GET_ID_UID; /*Pointer to location, UID to be stored at*/ CSE.P3.R = 0; CSE.P4.R = (vuint32_t) & UID_MAC; /*Pointer to location, MAC to be stored at*/ CSE.CMD.R = 0x10; /*Command ID of GET_ID */ 22 NXP Semiconductors

23 How to use CSE2 CSE2 Commands with example code After successful completion of this command, UID will be stored in GET_ID_UID [4] CANCEL The CANCEL command aborts processing of the current command and clears the CSE_SR[BSY] flag. This command is issued with no parameters as shown in the table below. Table 23. CANCEL command parameters CSE_CMD 0x11 - CSE_P1 - - CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example code CSE.CMD.R = 0x11 /*Command ID for CANCEL*/ DEBUG_CHALLENGE The DEBUG_CHAL command generates a 128-bit random challenge output value that is used in conjunction with the DEBUG_AUTH command. The PRNG state must be initialized after reset using the INIT_RNG command before this command can be issued. This command is issued with the parameter shown in the table below. Table 24. DEBUG_CHAL command parameters CSE_CMD 0x12 - CSE_P1 Challenge Address Output CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example Code Example code can be seen in Resetting the secure flash to its factory state on page 31 NXP Semiconductors 23

24 How to use CSE2 CSE2 Commands with example code DEBUG_AUTHORIZATION The DEBUG_AUTH command erases all user keys and sets the CSE_SR[IDB] flag which enables internal debugging, if the 128-bit authorization input value is valid and no memory slots are write protected. The authorization input is generated using the DEBUG_CHAL command output and the UID as described in the SHE Functional Specification. If the DEBUG_CHAL command is not issued before the DEBUG_AUTH command, a command sequence error (EC = 0x02) is returned. However, other commands may be issued between the DEBUG_CHAL and DEBUG_AUTH commands. This command is issued with the parameter shown in the table below. Table 25. DEBUG_AUTH command parameters CSE_CMD 0x13 - CSE_P1 Authorization Address Input CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example Code Example code can be seen in Resetting the secure flash to its factory state on page Generate TRNG Random Number The TRNG_RND command generates a 128-bit random output value using the TRNG. It takes 2048 TRNG clock cycles to generate a random value. The CSE_CR[DIV] field must be properly configured before this command is executed. This command takes much longer to execute than the RND command that should normally be used to generate random values. There is a very small probability that this command may return a TRNG error (EC = 0x12) even when the TRNG is operating properly. This command is issued with the parameter shown in the table below. Table 26. TRNG_RAND command parameters CSE_CMD 0x14 - CSE_P1 Random Value Address Output CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example Code typedef volatile unsigned int vuint32_t; vuint32_t entropy [4]; vuint32_t random_number [4]; // Setting the divider value 24 NXP Semiconductors

25 How to use CSE2 CSE2 Commands with example code CSE.CR.B.DIV = k; /*For value of K, refer CR register description*/ // Initializing TRNG CSE.CMD.R = 0x0A; while(cse.sr.b.rin==0) {}; /*Command ID for INIT_TRNG*/ /*Polling RIN flag to get set*/ // Extending Entropy (This command is optional if extended entropy is required to be added) CSE.P1.R = (vuint32_t) & entropy; CSE.CMD.R = 0x0B; /*Command ID for EXTENDED_SEED*/ // Generating Random number CSE.P1.R = (vuint32_t) & random_number; CSE.CMD.R = 0x14; /*Command ID for TRNG_RND*/ After successful execution of this command, output will be stored in random_number[4] INITIALIZE_CSE The INIT_CSE command loads the command processor firmware and memory slot data from the CSE2 flash memory blocks into local memory. It does not execute the secure boot protocol. The CSE2 firmware version is loaded into the CSE_P1 register as shown in the table below. This command must be issued before any other command when secure boot is not enabled. Table 27. INIT_CSE command parameters CSE_CMD 0x15 - CSE_P1 Firmware Version Output CSE_P2 - - CSE_P3 - - CSE_P4 - - CSE_P5 - - Example code CSE.CMD.R = 0x15 /*Command ID for INIT_CSE*/ Miyaguchi-Preneel (MP) Compression The MP_COMPRESS command is a one-way compression function used to derive a 128-bit output from a given message with the parameters specified in the below table. The AES ECB algorithm is used to derive the 128-bit output as described NXP Semiconductors 25

26 APPENDIX A Memory update protocol in the SHE specification. The message length input is a 64-bit value which specifies the length of the message in bits. A length error (EC=0x15) is returned if the message length is greater than 0x7ffffffff (4GB). Table 28. MP_COMPRESS command parameters CSE_CMD 0x16 - CSE_P1 Message length(bits) Address Input CSE_P2 Message start address Input CSE_P3 Output address Output CSE_P4 - - CSE_P5 - - Example Code typedef volatile unsigned int vuint32_t; unsigned long long int length =176; internal padding by MP_COMPRESS function*/ vuint32_t MSG_ARRAY [8]; vuint32_t MP_COMPRESS_VALUE [4]; CSE.P1.R = (unsigned long long int) & length ); CSE.P2.R = (vuint32_t) & MSG_ARRAY; calculated*/ CSE.P4.R = (vuint32_t) & MP_COMPRESS_VALUE; CSE.CMD.R = 0x16 /*Length is 176 rather than 256 because of /*Message of which MP_COMPRESS to be /*Pointer where MP_COMPRESS will be stored*/ /* Command ID of Generate MAC*/ After successful execution of this command, output will be stored in MP_COMPRESS_VALUE 3 APPENDIX A 3.1 Memory update protocol By memory update protocol, we mean loading user keys to secure memory. To load user keys to secure memory using LOAD_KEY command, we need to have M1, M2, M3, M4 and M5 ready. In this section of application note, generation of M1- M5 is explained along with example of LOAD_KEY command Generating M1, M2, M3 In order, to generate M1, M2 and M3 the following steps must be performed Generate K1 K1 = KDF (KAuthID, KEY_UPDATE_ENC_C) KDF is key derivation function which derives a secret key (K1) from a secret value. KAuthID Authorizing key value. In the case where a part from the factory has no keys programmed (the Secure Flash is erased) the value stored in flash does not have a valid checksum and CSE2 does not copy it to RAM at initialization, 26 NXP Semiconductors

27 APPENDIX A Memory update protocol hence this value, in the CSE2 s RAM, is zero. In this case, we are using AuthID =KEY_ID (i.e. the authorizing key will be the key itself). KEY_UPDATE_ENC_C Constant value defined by SHE as: 0x _ _ _000000B Generate K2 K2 = KDF(KAuthID,KEY_UPDATE_MAC_C) KEY_UPDATE_MAC_C Constant value defined by SHE as: 0x _ _ _000000B Generate M1 M1 = UID ID AuthID AuthID can be either ID (number of key being updated) or MASTER_ECU_KEY number (0x1) UID can be 0 (Wildcard value) because WC flag = 0 on parts from the factory UID is 120 bit and ID and AuthID are four bits each Generate M2 M2 = ENCCBC,K1,IV=0(CID FID 0...0"95 KID ) Run a CBC encryption using K1 (as defined previously) with Initial Value (IV) =0 The message for encryption is a concatenation of: CID - the new counter value (28 bits). 0x in this case FID - New Protection flags - WP BP DP KU WC (5 bits) 95 zeros to fill first 128-bit block with zeros 4. KID - The new key value (128 bits) Generate M3 M3 = CMACK2(M1 M2) A CMAC is performed over M1 and M2 using key K Generating M4, M5 When the CSE_LOAD_KEY command is issued CSE2 derives M4 and M5. These values can be independently generated offline and compared against those generated by the CSE Generating K3 K3 = KDF(KEYID,KEY_UPDATE_ENC_C) KEY_UPDATE_ENC_C Constant value defined by SHE as: 0x _ _ _000000B Generate M4 M4 = UID ID AuthID M4* M4 is a concatenation of: 1. UID Unique ID (120 bits) 2. ID number of key updated (4 bits) NXP Semiconductors 27

28 APPENDIX A Example Code For Updating a Key In Secure Memory 3. AuthID number of key authorizing the update (4 bits) M4* - the encrypted counter value; prior to encryption the counter value (28 bits) is padded with a 1 and 99 0 s. The key for the ECB encryption is K3 (derived as above) Generate M5 M5 = CMACK4(M4) K4 = KDF (KEYID,KEY_UPDATE_MAC_C) If M4 and M5 match to what was calculated offline and CSE2 returns NO_ERROR in the CSE_ECR (Error Code Register) then the LOAD_KEY command was successful. NOTE If a key has it s Write Protect (WP) attribute set, the key cannot ever be updated or erased. Write Protection should only be used when the user is certain that the key never needs to be changed or erased. Setting Write Protection on any single key will mean that the part cannot be reset to its factory state using the DEBUG CHALLENGE/AUTHORIZATION sequence. See section Appendix B Resetting the Secure flash to its Factory State. 3.2 Example Code For Updating a Key In Secure Memory In this example, we will update key with ID=0x1(MASTER_ECU_KEY) for the first time. /* KDF function definition*/ void KDF (char *key, char *constant, char *d_key) { char mpc_in[32]; unsigned long long mpc_len = 176; // copy key + constant to mpc_in, 32 bits at a time *(vuint32_t *) &mpc_in[0] = *(vuint32_t *) &key[0]; *(vuint32_t *) &mpc_in[4] = *(vuint32_t *) &key[4]; *(vuint32_t *) &mpc_in[8] = *(vuint32_t *) &key[8]; *(vuint32_t *) &mpc_in[12] = *(vuint32_t *) &key[12]; *(vuint32_t *) &mpc_in[16] = *(vuint32_t *) &constant[0]; *(vuint32_t *) &mpc_in[20] = *(vuint32_t *) &constant[4]; *(vuint32_t *) &mpc_in[24] = *(vuint32_t *) &constant[8]; *(vuint32_t *) &mpc_in[28] = *(vuint32_t *) &constant[12]; CSE.P1.R = (vuint32_t) &mpc_len; /* message length (bits) address */ CSE.P2.R = (vuint32_t) &mpc_in; /* message start address */ CSE.P3.R = (vuint32_t) d_key; /* output address of derived key */ CSE.CMD.R = CSE_MP_COMPRESS; /* issue MP_COMPRESS command */ /*wait until CSE is idle*/ } /* function to upload key*/ Void key_update() { vuint32_t M1[4], m2_input[8], M2[8], m3_input[12], M3[4], m4_input_1[4], m4_input[4], M4[8], M4_OUTPUT[8], M5[4],K1[4],k_authid[4]; vuint32_t id, authid, cid, fid; char K2[16], K3[16], K4[16]; 28 NXP Semiconductors

29 APPENDIX A Example Code For Updating a Key In Secure Memory /*User specific Values*/ vuint32_t new_key[4]={0x , 0x , 0x , 0x }; /*If UID is not known, use GET_UID command also if UID for UID value*/ /* In this example, below mentioned UID is used*/ vuint32_t uid[4]={0x , 0x ,0x ,0x }; /*Constants Values*/ vuint32_t KEY_UPDATE_ENC_C[4] = {0x ,0x ,0x ,0x000000B0}; vuint32_t KEY_UPDATE_MAC_C[4] = {0x ,0x ,0x ,0x000000B0}; vuint32_t initial_value_cbc[4] = {0,0,0,0}; unsigned long long length = 384; unsigned long long length2 =256; /*Generating K1, K2, K3, K4*/ /* k_authid will be all 0 in case key is being loaded for the first time*/ /*If key is being updated, means there is already key updated in memory with same KEY_ID, then in that case k_authid will be either MASTER_ECU_KEY or 128-bit key value that is already loaded in memory*/ KDF((char *)k_authid, (char *)KEY_UPDATE_ENC_C, (char *)K1); KDF((char *)k_authid, (char *)KEY_UPDATE_MAC_C, (char *)K2); KDF((char *)new_key, (char *)KEY_UPDATE_ENC_C, (char *)K3); KDF((char *)new_key, (char *)KEY_UPDATE_MAC_C, (char *)K4); /*Generating M1 */ id=0x1; auth_id=0x1; M1[0] = uid[0] ; M1[1] = uid[1] ; M1[2] = uid[2] ; M1[3] = uid[3] + (id <<4) + authid; /*Generating M2*/ cid= 0x1; time*/ fid = 0; is set*/ if(verif_only_flag) { m2_input[0] = (cid <<4) (fid>>2) ; m2_input[1] = (fid <<30); } else { m2_input[0] = (cid <<4) (fid>>1) ; m2_input[1] = (fid <<31); } m2_input[2] = 0 ; m2_input[3] = 0 ; m2_input[4] = new_key[0] ; m2_input[5] = new_key[1] ; m2_input[6] = new_key[2] ; m2_input[7] = new_key[3] ; /*Key ID*/ /* Authorization Key ID*/ /* counter value 1 as loading for first /*flag to be set on key, here no flag / *if verif only flag is to be set*/ CSE.P1.R = (vuint32_t) &K1; CSE.CMD.R= 0x8; /*LOAD_PLAIN_KEY*/ while (CSE.SR.B.BSY ==1){} ; /*wait until CSE is idle*/ CSE.P1.R = 0xE ; /*RAM Key */ NXP Semiconductors 29

30 APPENDIX A Example Code For Updating a Key In Secure Memory CSE.P2.R = (vuint32_t)&initial_value_cbc; CSE.P3.R = 2; /* number of blocks */ CSE.P4.R = (vuint32_t) &m2_input; CSE.P5.R = (vuint32_t) & M2; CSE.CMD.R= 0x2; /*CSE_ENC_CBC*/ /*wait until CSE is idle*/ /* Generating M3*/ m3_input[0] = M1[0]; m3_input[1] = M1[1]; m3_input[2] = M1[2]; m3_input[3] = M1[3]; m3_input[4] = M2[0]; m3_input[5] = M2[1]; m3_input[6] = M2[2]; m3_input[7] = M2[3]; m3_input[8] = M2[4]; m3_input[9] = M2[5]; m3_input[10] = M2[6]; m3_input[11] = M2[7]; CSE.P1.R = (vuint32_t) &K2; CSE.CMD.R= 0x8; while (CSE.SR.B.BSY ==1){} ; /*LOAD_PLAIN_KEY*/ /*wait until CSE is idle*/ CSE.P1.R = 0xE; /* RAM key */ CSE.P2.R = (unsigned long long) & length; /* msg length */ CSE.P3.R = (vuint32_t)&m3_input; CSE.P4.R = (vuint32_t)m3; CSE.CMD.R= 0x5; while (CSE.SR.B.BSY ==1){}; /*wait until CSE is idle*/ /*Generating M4*/ m4_input_1[0]=(cid <<4) +8; m4_input_1[1]=0; m4_input_1[2]=0; m4_input_1[3]=0; CSE.P1.R = (uint32_t) &K3; CSE.CMD.R= 0x8; while (CSE.SR.B.BSY ==1){}; /*cid is counter value*/ /*LOAD_PLAIN_KEY*/ /*wait until CSE is idle*/ CSE.P1.R = 0xE ; /*RAM key*/ CSE.P2.R = 1; /* number of blocks */ CSE.P3.R = (vuint32_t) &m4_input_1; CSE.P4.R = (vuint32_t) m4_input; CSE.CMD.R= 0x2; /*ENC_CBC*/ while (CSE.SR.B.BSY ==1){}; /*wait until CSE is idle*/ M4[0]=uid[0]; M4[1]=uid[1]; M4[2]=uid[2]; M4[3]=uid[3] + (id <<4) + authid; M4[4]=m4_input[0]; M4[5]=m4_input[1]; M4[6]=m4_input[2]; M4[7]=m4_input[3]; /*Generating M5*/ CSE.P1.R = (vuint32_t) &K4; 30 NXP Semiconductors

Getting Started with CSEc Security Module

Getting Started with CSEc Security Module NXP Semiconductors Getting Started with CSEc Security Module CSEc Cryptographic Service Engine Compressed by: Kushal Shah 1 Introduction This Application note explains features and functionalities offered

More information

Tweeting? Please use hashtag #FTF2011. Freescale on Facebook Tag yourself in photos and upload your own!

Tweeting? Please use hashtag #FTF2011. Freescale on Facebook Tag yourself in photos and upload your own! 23 June 2011 Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobilegt, PowerQUICC, QorIQ, StarCore and Symphony are trademarks

More information

M2351 Security Architecture. TrustZone Technology for Armv8-M Architecture

M2351 Security Architecture. TrustZone Technology for Armv8-M Architecture Architecture TrustZone Technology for Armv8-M Architecture Outline NuMicro Architecture TrustZone for Armv8-M Processor Core, Interrupt Handling, Memory Partitioning, State Transitions. TrustZone Implementation

More information

Boot Loader. Bootloader

Boot Loader. Bootloader October 2013 Boot Loader A program that is executed upon initial power-up that typically involves a power-on self-test, locating and initializing peripheral devices, and then loading and starting an operating

More information

MPC5748G Gateway, HSM and Secure OTA Update

MPC5748G Gateway, HSM and Secure OTA Update MPC5748G Gateway, HSM and Secure OTA Update FTF-AUT-F0347 Alasdair Robertson Auto MCU Applications EKB APR.2014 TM External Use Agenda MPC5748G Device Overview Automotive Security Overview Why do we need

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

Security Policy: Astro Subscriber Encryption Module Astro Spectra, Astro Saber, Astro Consolette, and Astro XTS3000. Version

Security Policy: Astro Subscriber Encryption Module Astro Spectra, Astro Saber, Astro Consolette, and Astro XTS3000. Version Security Policy: Astro Subscriber Encryption Module Astro Spectra, Astro Saber, Astro Consolette, and Astro XTS3000 Version 02.00.07 3/22/2004 1.0 Introduction 3 1.1 Scope 3 1.2 Overview 3 1.3 Astro Subscriber

More information

UM2330 User manual. ST8500 boot. Introduction

UM2330 User manual. ST8500 boot. Introduction UM30 User manual ST8500 boot Introduction This user manual describes ST8500 bootloader functionalities and operations to be done for a correct device boot and the firmware images download. The following

More information

Secret Key Cryptography

Secret Key Cryptography Secret Key Cryptography General Block Encryption: The general way of encrypting a 64-bit block is to take each of the: 2 64 input values and map it to a unique one of the 2 64 output values. This would

More information

FIPS Level 2 Security Policy for FlagStone Core (Versions V a, V a, V )

FIPS Level 2 Security Policy for FlagStone Core (Versions V a, V a, V ) FIPS 140-2 Level 2 Security Policy for FlagStone Core (Versions V1.0.1.1a, V1.0.1.2a, V1.0.1.3) Issue: 1.1 This document may be freely reproduced and distributed only in its entirety without revision.,

More information

Application Note: JN-AN-1003 JN51xx Boot Loader Operation

Application Note: JN-AN-1003 JN51xx Boot Loader Operation Application Note: JN-AN-1003 JN51xx Boot Loader Operation This Application Note describes the functionality of the boot loaders for the NXP, JN514x and wireless microcontrollers, covering the following

More information

MAC57D5xx Start-Up Sequence

MAC57D5xx Start-Up Sequence Freescale Semiconductor Document Number: AN5285 Application Note Rev. 0, 05/2016 MAC57D5xx Start-Up Sequence by: Manuel Rodriguez 1 Introduction The MAC57D5xx family is the next generation platform of

More information

Indect Block Cipher Application

Indect Block Cipher Application Indect Block Cipher Application User s manual 7 UE FP INDECT Project Department of Telecommunications AGH University of Science and Technology, Krakow 1 Application ICB application is an implementation

More information

Getting Started with the MCU Flashloader

Getting Started with the MCU Flashloader NXP Semiconductors Document Number: MBOOTFLASHGS User's Guide Rev 3, 05/2018 Getting Started with the MCU Flashloader Contents Contents Chapter 1 Introduction...3 Chapter 2 Overview...4 2.1 MCU flashloader...4

More information

Lecture 2B. RTL Design Methodology. Transition from Pseudocode & Interface to a Corresponding Block Diagram

Lecture 2B. RTL Design Methodology. Transition from Pseudocode & Interface to a Corresponding Block Diagram Lecture 2B RTL Design Methodology Transition from Pseudocode & Interface to a Corresponding Block Diagram Structure of a Typical Digital Data Inputs Datapath (Execution Unit) Data Outputs System Control

More information

Security Policy for FIPS KVL 3000 Plus

Security Policy for FIPS KVL 3000 Plus Security Policy for FIPS 140-2 KVL 3000 Plus Version 01.01.19 Motorola General Business Information 1 of 21 Motorola General Business Information 2 of 21 1 INTRODUCTION... 4 1.1 SCOPE... 4 1.2 OVERVIEW...

More information

6 Cryptographic Operations API

6 Cryptographic Operations API 118/202 TEE Internal API Specification Public Release v1.0 6 Cryptographic Operations API This part of the Cryptographic API defines how to actually perform cryptographic operations: Cryptographic operations

More information

OpenSSL is a project comprising (1) a core library and (2) a toolkit. The core library offers an API for developers of secure applications.

OpenSSL is a project comprising (1) a core library and (2) a toolkit. The core library offers an API for developers of secure applications. 1 OpenSSL is a project comprising (1) a core library and (2) a toolkit. The core library offers an API for developers of secure applications. The toolkit offers a series of command-line tools to perform

More information

The purpose of this course is to provide an introduction to the RL78's flash features and archectecture including security features, code and data

The purpose of this course is to provide an introduction to the RL78's flash features and archectecture including security features, code and data 1 The purpose of this course is to provide an introduction to the RL78's flash features and archectecture including security features, code and data flash organization as well as self and external programming

More information

CHAPTER 6. SYMMETRIC CIPHERS C = E(K2, E(K1, P))

CHAPTER 6. SYMMETRIC CIPHERS C = E(K2, E(K1, P)) CHAPTER 6. SYMMETRIC CIPHERS Multiple encryption is a technique in which an encryption algorithm is used multiple times. In the first instance, plaintext is converted to ciphertext using the encryption

More information

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes Course Introduction Purpose: This course provides an overview of the Direct Memory Access Controller and the Interrupt Controller on the SH-2 and SH-2A families of 32-bit RISC microcontrollers, which are

More information

YubiHSM. User Manual. Version: 1.5.0

YubiHSM. User Manual. Version: 1.5.0 YubiHSM User Manual Version: 1.5.0 April 6, 2015 Introduction Disclaimer Yubico is the leading provider of simple, open online identity protection. The company s flagship product, the YubiKey, uniquely

More information

F2MC-8FX EEPROM Library

F2MC-8FX EEPROM Library Fujitsu Microelectronics (Shanghai) Co., Ltd. Application Note MCU-AN- 500019-E-23 F²MC-8FX FAMILY 8-BIT MICROCONTROLLER MB95200 SERIES F2MC-8FX EEPROM Library APPLICATION NOTE Revision History Revision

More information

AFRecorder 4800R Serial Port Programming Interface Description For Software Version 9.5 (Last Revision )

AFRecorder 4800R Serial Port Programming Interface Description For Software Version 9.5 (Last Revision ) AFRecorder 4800R Serial Port Programming Interface Description For Software Version 9.5 (Last Revision 8-27-08) Changes from Version 9.2 1. The communication baud rate is raised to 9600. 2. Testing with

More information

FIPS Security Policy. for Marvell Semiconductor, Inc. Solaris 2 Cryptographic Module

FIPS Security Policy. for Marvell Semiconductor, Inc. Solaris 2 Cryptographic Module FIPS 140-2 Security Policy for Marvell Semiconductor, Inc. Solaris 2 Cryptographic Module Hardware Version: 88i8925, 88i8922, 88i8945, and 88i8946 Firmware Version: Solaris2-FIPS-FW-V1.0 Document Version:

More information

FIPS Non-Proprietary Security Policy. Level 1 Validation Version 1.2

FIPS Non-Proprietary Security Policy. Level 1 Validation Version 1.2 Oracle Solaris Kernel Cryptographic Framework with SPARC T4 and T5 Software Version: 1.0 and 1.1; Hardware Version: SPARC T4 (527-1437-01) and T5 (7043165) FIPS 140-2 Non-Proprietary Security Policy Level

More information

Dolphin DCI 1.2. FIPS Level 3 Validation. Non-Proprietary Security Policy. Version 1.0. DOL.TD DRM Page 1 Version 1.0 Doremi Cinema LLC

Dolphin DCI 1.2. FIPS Level 3 Validation. Non-Proprietary Security Policy. Version 1.0. DOL.TD DRM Page 1 Version 1.0 Doremi Cinema LLC Dolphin DCI 1.2 FIPS 140-2 Level 3 Validation Non-Proprietary Security Policy Version 1.0 DOL.TD.000921.DRM Page 1 Version 1.0 Table of Contents 1 Introduction... 3 1.1 PURPOSE... 3 1.2 REFERENCES... 3

More information

Secure Cryptographic Module (SCM)

Secure Cryptographic Module (SCM) Page 1 of 11 FIPS 140 2 Cryptographic Module Security Policy Secure Cryptographic Module (SCM) Document Version 3.0.4 FIPS 140 2 Non Proprietary JVC KENWOOD Corporation Page 2 of 11 Revision History Date

More information

Practical Aspects of Modern Cryptography

Practical Aspects of Modern Cryptography Practical Aspects of Modern Cryptography Lecture 3: Symmetric s and Hash Functions Josh Benaloh & Brian LaMacchia Meet Alice and Bob Alice Bob Message Modern Symmetric s Setup: Alice wants to send a private

More information

Lexmark PrintCryption TM (Firmware Version 1.3.1)

Lexmark PrintCryption TM (Firmware Version 1.3.1) Lexmark PrintCryption TM (Firmware Version 1.3.1) FIPS 140-2 Non-Proprietary Security Policy Level 1 Validation Version 0.95 April 2007 Table of Contents INTRODUCTION... 3 PURPOSE... 3 REFERENCES... 3

More information

Oracle Solaris Kernel Cryptographic Framework Software Version 1.0 and 1.1

Oracle Solaris Kernel Cryptographic Framework Software Version 1.0 and 1.1 Oracle Solaris Kernel Cryptographic Framework Software Version 1.0 and 1.1 FIPS 140-2 Non-Proprietary Security Policy Level 1 Validation Version 1.2 12/12/2013 Copyright 2013 Oracle Corporation Table of

More information

Block Cipher Modes of Operation

Block Cipher Modes of Operation Block Cipher Modes of Operation Luke Anderson luke@lukeanderson.com.au 23 rd March 2018 University Of Sydney Overview 1. Crypto-Bulletin 2. Modes Of Operation 2.1 Evaluating Modes 2.2 Electronic Code Book

More information

Memory Map for the MCU320 board:

Memory Map for the MCU320 board: Memory Map for the MCU320 board: The Intel 8051 MCUs and all derivatives are based on the Harvard architecture. This is to say that they have separate memory space for program (CODE) and external data

More information

Dolphin Board. FIPS Level 3 Validation. Security Policy. Version a - Dolphin_SecPolicy_000193_v1_3.doc Page 1 of 19 Version 1.

Dolphin Board. FIPS Level 3 Validation. Security Policy. Version a - Dolphin_SecPolicy_000193_v1_3.doc Page 1 of 19 Version 1. Dolphin Board FIPS 140-2 Level 3 Validation Security Policy Version 1.3 14a - Dolphin_SecPolicy_000193_v1_3.doc Page 1 of 19 Version 1.3 Table of Contents 1 INTRODUCTION...3 1.1 PURPOSE...3 1.2 REFERENCES...3

More information

RFID A1 Module User Manual V1.183

RFID A1 Module User Manual V1.183 RFID A1 Module User Manual V1.183 Table of Contents 1 Introduction... 4 1.1 Device Overview... 4 1.2 Pinout... 5 1.3 Application... 6 2 Electrical Characteristics... 7 2.1 Test Conditions... 7 2.2 Absolute

More information

Kinetis Bootloader to Update Multiple Devices in a Field Bus Network

Kinetis Bootloader to Update Multiple Devices in a Field Bus Network Freescale Semiconductor, Inc. Document Number: AN5204 Application Note Rev. 0, 01/2016 Kinetis Bootloader to Update Multiple Devices in a Field Bus Network 1. Introduction This application note describes

More information

Introducing the PIC24F GB2 MCU Family: extreme Low Power with Hardware Crypto Engine

Introducing the PIC24F GB2 MCU Family: extreme Low Power with Hardware Crypto Engine Introducing the PIC24F GB2 MCU Family: extreme Low Power with Hardware Crypto Engine Alexis Alcott, Product Marketing Manager, MCU16 Division June 24, 2014 2 Announcing at Sensors Expo PIC24F GB2 MCUs

More information

F2MC-8FX EEPROM LIBRARY

F2MC-8FX EEPROM LIBRARY Fujitsu Semiconductor (Shanghai) Co., Ltd. Application Note MCU-AN-500019-E-29 F²MC-8FX FAMILY 8-BIT MICROCONTROLLER NEW 8FX SERIES F2MC-8FX EEPROM LIBRARY APPLICATION NOTE Revision History Revision History

More information

How to Enable Boot from HyperFlash and SD Card

How to Enable Boot from HyperFlash and SD Card NXP Semiconductors Document Number: AN12107 Application Note Rev. 0, 12/2017 How to Enable Boot from HyperFlash and SD Card 1. Introduction The i.mx RT Series is industry s first crossover processor provided

More information

Crypto Library. Microchip Libraries for Applications (MLA) Copyright (c) 2012 Microchip Technology Inc. All rights reserved.

Crypto Library. Microchip Libraries for Applications (MLA) Copyright (c) 2012 Microchip Technology Inc. All rights reserved. Crypto Library Microchip Libraries for Applications (MLA) Copyright (c) 2012 Microchip Technology Inc. All rights reserved. MLA - Crypto Library Help Table of Contents 1 Crypto Library 6 1.1 Introduction

More information

FEITIAN Technologies Company, LTD epass Token Hardware Version: FIPS Non-Proprietary Security Policy

FEITIAN Technologies Company, LTD epass Token Hardware Version: FIPS Non-Proprietary Security Policy FEITIAN Technologies Company, LTD epass Token Hardware Version: 1.0.0 FIPS 140-2 Non-Proprietary Security Policy FIPS Security Level: 3 Document Version: 1.0 Prepared for: Prepared by: FEITIAN Technologies

More information

FIPS Security Policy

FIPS Security Policy Version 1.8 Last Update: 09/4/2014 1 WideBand Corporation 401 West Grand Street, Gallatin, MO 64640, USA 1 The actual module is a single chip within the depicted package WideBand Corporation, 2014 and

More information

s132_nrf52 release notes

s132_nrf52 release notes s132_nrf52 release notes Table of Contents Introduction to the s132_nrf52 release notes These release notes describe the changes in the s132_nrf52 from version to version. The release notes are intended

More information

Introduction to Symmetric Cryptography

Introduction to Symmetric Cryptography Introduction to Symmetric Cryptography Tingting Chen Cal Poly Pomona 1 Some slides are from Dr. Cliff Zou. www.cs.ucf.edu/~czou/cis3360-12/ch08-cryptoconcepts.ppt Basic Cryptography Private Key Cryptography

More information

Security Policy. FORTEZZA Crypto Card

Security Policy. FORTEZZA Crypto Card Security Policy for January 16, 1997 Prepared by ipower Business Unit 2900 Semiconductor Drive P.O. Box 58090, M/S 16-225, Santa Clara, CA 95052-8090 Telephone (408) 721-5000 T his page intentionally blank

More information

NITGEN. Developer Guide. Version RS-232C serial protocol for Stand-Alone Fingerprint Recognition Device. Serial Protocol

NITGEN. Developer Guide. Version RS-232C serial protocol for Stand-Alone Fingerprint Recognition Device. Serial Protocol NITGEN RS-232C serial protocol for Stand-Alone Fingerprint Recognition Device Developer Guide (Supported device: FIM10 Ver. 1.18, FIM01 Ver. 1.58, FIM20xx Ver. 1.58, FIM30xx Ver 1.10) Version 1.75 NITGEN

More information

Canon MFP Security Chip. ISO/IEC Security Policy

Canon MFP Security Chip. ISO/IEC Security Policy Canon MFP Security Chip ISO/IEC 19790 Security Policy Version 1.07 2016/12/26 Canon Inc. 1 Table of Contents 2 List of Figures Date of Issue: 2016/12/26 Figure 1 Exterior of Canon MFP Security Chip (FK4-1731A)...

More information

CSE 127: Computer Security Cryptography. Kirill Levchenko

CSE 127: Computer Security Cryptography. Kirill Levchenko CSE 127: Computer Security Cryptography Kirill Levchenko October 24, 2017 Motivation Two parties want to communicate securely Secrecy: No one else can read messages Integrity: messages cannot be modified

More information

ECE 206, Fall 2001: Lab 3

ECE 206, Fall 2001: Lab 3 ECE 206, : Lab 3 Data Movement Instructions Learning Objectives This lab will give you practice with a number of LC-2 programming constructs. In particular you will cover the following topics: - Load/store

More information

Bluefly Processor. Security Policy. Bluefly Processor MSW4000. Darren Krahn. Security Policy. Secure Storage Products. 4.0 (Part # R)

Bluefly Processor. Security Policy. Bluefly Processor MSW4000. Darren Krahn. Security Policy. Secure Storage Products. 4.0 (Part # R) Bluefly Processor Security Policy PRODUCT NAME: PROJECT NUMBER: AUTHOR: Bluefly Processor MSW4000 Darren Krahn REVISION : 1.16 DOCUMENT REFERENCE : SP-MSW4000-01 DOCUMENT TYPE: DEPARTMENT: Security Policy

More information

Lecture 6: Symmetric Cryptography. CS 5430 February 21, 2018

Lecture 6: Symmetric Cryptography. CS 5430 February 21, 2018 Lecture 6: Symmetric Cryptography CS 5430 February 21, 2018 The Big Picture Thus Far Attacks are perpetrated by threats that inflict harm by exploiting vulnerabilities which are controlled by countermeasures.

More information

INNOVATIVE TECHNOLOGY LTD CC2. Communications Protocol Manual GA863. Issue version Page 1 of 108

INNOVATIVE TECHNOLOGY LTD CC2. Communications Protocol Manual GA863. Issue version Page 1 of 108 INNOVATIVE TECHNOLOGY LTD CC2 Communications Protocol Manual GA863 Issue version 1.2.4 Page 1 of 108 Contents 1. CC2... 1 1. Contents... 2 2. Version History... 4 3. Introduction... 5 4. Representations...

More information

Oracle Solaris Userland Cryptographic Framework Software Version 1.0 and 1.1

Oracle Solaris Userland Cryptographic Framework Software Version 1.0 and 1.1 Oracle Solaris Userland Cryptographic Framework Software Version 1.0 and 1.1 FIPS 140-2 Non-Proprietary Security Policy Level 1 Validation Version 1.3 2014-01-08 Copyright 2014 Oracle Corporation Table

More information

WiMOD LR Base Plus Host Controller Interface

WiMOD LR Base Plus Host Controller Interface WiMOD LR Base Plus Host Controller Interface Specification Version 1.2 Document ID: 4000/40140/0125 IMST GmbH Carl-Friedrich-Gauß-Str. 2-4 47475 KAMP-LINTFORT GERMANY Introduction Document Information

More information

1 Contents. Version of EnSilica Ltd, All Rights Reserved

1 Contents. Version of EnSilica Ltd, All Rights Reserved 1 Contents esi-apb-aes 1 Contents 2 2 Overview 3 3 Hardware Interface 4 3.1 Area 5 4 Software Interface 6 4.1 Register Map 6 5 AES Operation 11 5.1 Introduction 11 5.2 DMA operation 12 5.3 CBC operation

More information

AND8386/D. Bootloading BelaSigna 250 Using the I 2 C Interface APPLICATION NOTE

AND8386/D. Bootloading BelaSigna 250 Using the I 2 C Interface APPLICATION NOTE Bootloading BelaSigna 250 Using the I 2 C Interface APPLICATION NOTE INTRODUCTION This application note describes how to bootload BelaSigna 250 through its I 2 C interface when it does not have an EEPROM

More information

ARX (Algorithmic Research) PrivateServer Hardware version 4.7 Firmware version 4.8.1

ARX (Algorithmic Research) PrivateServer Hardware version 4.7 Firmware version 4.8.1 ARX (Algorithmic Research) PrivateServer Hardware version 4.7 Firmware version 4.8.1 FIPS 140-2 Non-Proprietary Security Policy Level 3 Validation April 2012 Copyright 2012 Algorithmic Research This document

More information

ATAES132A 32K AES Serial EEPROM Complete Data Sheet

ATAES132A 32K AES Serial EEPROM Complete Data Sheet ATAES132A 32K AES Serial EEPROM Complete Data Sheet Features Crypto Element Device with Secure Hardware-Based Key Storage 32 kb Standard Serial EEPROM Memory Compatible with the Microchip AT24C32D and

More information

Block Cipher Modes of Operation

Block Cipher Modes of Operation Block Cipher Modes of Operation Luke Anderson luke@lukeanderson.com.au 24th March 2016 University Of Sydney Overview 1. Crypto-Bulletin 2. Modes Of Operation 2.1 Evaluating Modes 2.2 Electronic Code Book

More information

AN5153 Application note

AN5153 Application note Application note IMA usage with SPC582B60 Introduction This document describes the usage of IMA. This design targets automotive applications and this cost-effective solution is based on the SPC582B60 device

More information

Wireless M-Bus Host Controller Interface DLL

Wireless M-Bus Host Controller Interface DLL Wireless M-Bus Host Controller Interface DLL Document ID: 4100/6404/0051 IMST GmbH Carl-Friedrich-Gauß-Str. 2-4 47475 KAMP-LINTFORT GERMANY General Information Document Information File name WMBus_HCIDLL_Spec.docx

More information

BCM58100B0 Series: BCM58101B0, BCM58102B0, BCM58103B0 Cryptographic Module VC0 Non-Proprietary Security Policy Document Version 0.

BCM58100B0 Series: BCM58101B0, BCM58102B0, BCM58103B0 Cryptographic Module VC0 Non-Proprietary Security Policy Document Version 0. BCM58100B0 Series: BCM58101B0, BCM58102B0, BCM58103B0 Cryptographic Module VC0 Non-Proprietary Security Policy Document Version 0.8 Broadcom Ltd. Revision Date: 2016-05-25 Copyright Broadcom 2016. May

More information

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some 3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some popular block ciphers Triple DES Advanced Encryption

More information

Seagate Secure TCG Enterprise SSC Pulsar.2 Self-Encrypting Drive FIPS 140 Module Security Policy

Seagate Secure TCG Enterprise SSC Pulsar.2 Self-Encrypting Drive FIPS 140 Module Security Policy Seagate Secure TCG Enterprise SSC Pulsar.2 Self-Encrypting Drive FIPS 140 Module Security Policy Security Level 2 Rev. 0.9 November 12, 2012 Seagate Technology, LLC Page 1 Table of Contents 1 Introduction...

More information

CIS 4360 Secure Computer Systems Symmetric Cryptography

CIS 4360 Secure Computer Systems Symmetric Cryptography CIS 4360 Secure Computer Systems Symmetric Cryptography Professor Qiang Zeng Spring 2017 Previous Class Classical Cryptography Frequency analysis Never use home-made cryptography Goals of Cryptography

More information

AT90SDC10X Summary Datasheet

AT90SDC10X Summary Datasheet AT90SDC10X Summary Datasheet Features General twincore Secure Dual Core Architecture - 135 Powerful s (Most Executed in a Single Clock Cycle) Total isolation between Master & Secure Cores Secure Inter-Core

More information

Lecture 1 Applied Cryptography (Part 1)

Lecture 1 Applied Cryptography (Part 1) Lecture 1 Applied Cryptography (Part 1) Patrick P. C. Lee Tsinghua Summer Course 2010 1-1 Roadmap Introduction to Security Introduction to Cryptography Symmetric key cryptography Hash and message authentication

More information

JMY505G User's Manual

JMY505G User's Manual JMY505G User's Manual (Revision 3.42) Jinmuyu Electronics Co. LTD 2011/6/28 Please read this manual carefully before using. If any problem, please mail to: jinmuyu@vip.sina.com Contents 1 Product introduction...

More information

Integral Memory PLC. Crypto Dual (Underlying Steel Chassis) and Crypto Dual Plus (Underlying Steel Chassis) FIPS Security Policy

Integral Memory PLC. Crypto Dual (Underlying Steel Chassis) and Crypto Dual Plus (Underlying Steel Chassis) FIPS Security Policy Integral Memory PLC. Chassis) and Crypto Dual Plus (Underlying FIPS 140-2 Security Policy Table of Contents 1. INTRODUCTION... 1 1.1 Purpose....1 1.2 References... 1 1.3 Document History... 1 2. PRODUCT

More information

P2_L6 Symmetric Encryption Page 1

P2_L6 Symmetric Encryption Page 1 P2_L6 Symmetric Encryption Page 1 Reference: Computer Security by Stallings and Brown, Chapter 20 Symmetric encryption algorithms are typically block ciphers that take thick size input. In this lesson,

More information

HAI Network Communication Protocol Description

HAI Network Communication Protocol Description Home Automation, Inc. HAI Network Communication Protocol Description This document contains the intellectual property of Home Automation, Inc. (HAI). HAI authorizes the use of this information for the

More information

Implementing Secure Software Systems on ARMv8-M Microcontrollers

Implementing Secure Software Systems on ARMv8-M Microcontrollers Implementing Secure Software Systems on ARMv8-M Microcontrollers Chris Shore, ARM TrustZone: A comprehensive security foundation Non-trusted Trusted Security separation with TrustZone Isolate trusted resources

More information

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device.

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device. APPLICATION NOTE RX Family R01AN1691EJ0220 Rev. 2.20 Introduction This application note describes the simple I 2 C module using firmware integration technology (FIT) for communications between devices

More information

PCI-HPDI32A-COS User Manual

PCI-HPDI32A-COS User Manual PCI-HPDI32A-COS User Manual Preliminary 8302A Whitesburg Drive Huntsville, AL 35802 Phone: (256) 880-8787 Fax: (256) 880-8788 URL: www.generalstandards.com E-mail: support@generalstandards.com User Manual

More information

Flash Self-programming Library

Flash Self-programming Library 16 Flash Self-programming Library Type T01, European Release 16 Bit Single-chip Microcontroller RL78 Series Installer: RENESAS_FSL_RL78_T01E_Vx.xxx All information contained in these materials, including

More information

ARM TrustZone for ARMv8-M for software engineers

ARM TrustZone for ARMv8-M for software engineers ARM TrustZone for ARMv8-M for software engineers Ashok Bhat Product Manager, HPC and Server tools ARM Tech Symposia India December 7th 2016 The need for security Communication protection Cryptography,

More information

Contents. Cortex M On-Chip Emulation. Technical Notes V

Contents. Cortex M On-Chip Emulation. Technical Notes V _ Technical Notes V9.12.225 Cortex M On-Chip Emulation Contents Contents 1 1 Introduction 2 2 Access Breakpoints 3 3 Trace 5 4 NXP LPC 5 4.1 Boot and Memory Remapping 5 4.2 LPC17xx Startup 5 4.1 LPC11A02/04

More information

Chapter 18: wolfcrypt API Reference

Chapter 18: wolfcrypt API Reference Chapter 18: wolfcrypt API Reference Table of Contents March, 2016 Version 3.9.0 18.1 AES 18.2 Arc4 18.3 ASN 18.4 Blake2 18.5 Camellia 18.6 ChaCha 18.7 ChaCha20 with Poly1305 18.8 Coding 18.9 Compression

More information

ST19WR08 Dual Contactless Smartcard MCU With RF UART, IART & 8 Kbytes EEPROM Features Contactless specific features

ST19WR08 Dual Contactless Smartcard MCU With RF UART, IART & 8 Kbytes EEPROM Features Contactless specific features Dual Contactless Smartcard MCU With RF UART, IART & 8 Kbytes EEPROM Data Brief Features Enhanced 8-bit CPU with extended addressing modes 112 KBytes user ROM with partitioning 2 KBytes user RAM with partitioning

More information

盤技術Approaches for Secure and Efficient In-Vehicle Key Management*

盤技術Approaches for Secure and Efficient In-Vehicle Key Management* Modern vehicle systems have transitioned from being 盤技術Approaches for Secure and Efficient In-Vehicle Key Management* Takeshi SUGASHIMA Dennis Kengo OKA Camille VUILLAUME DENSO TECHNICAL REVIEW Vol.21

More information

SEL-3021 Serial Encrypting Transceiver Security Policy Document Version 1.9

SEL-3021 Serial Encrypting Transceiver Security Policy Document Version 1.9 SEL-3021 Serial Encrypting Transceiver Security Policy Document Version 1.9 Schweitzer Engineering Laboratories, Inc. May 21, 2007 Copyright 2005-2007 Schweitzer Engineering Laboratories, Inc. May be reproduced

More information

M2351 TrustZone Program Development

M2351 TrustZone Program Development Application Note for 32-bit NuMicro Family AN0019 M2351 TrustZone Program Development Document Information Abstract Introduce TrustZone programing including how to partition security attribution and how

More information

Embit Binary Interface - IEEE Specific Documentation. embit s.r.l.

Embit Binary Interface - IEEE Specific Documentation. embit s.r.l. Embit Binary Interface - IEEE 802.15.4-Specific Documentation embit s.r.l. Document information Versions & Revisions Revision Date Author Comments 1.0 A. Sala First release 1.1 14/12/2012 C. Biagi Minor

More information

UM2379. The BlueNRG-1, BlueNRG-2 radio driver. User manual. Introduction

UM2379. The BlueNRG-1, BlueNRG-2 radio driver. User manual. Introduction User manual The BlueNRG-1, BlueNRG-2 radio driver Introduction This document describes the BlueNRG-1, BlueNRG-2 radio low level driver, which provides access to the BlueNRG-1 and BlueNRG-2 devices in order

More information

FIPS SECURITY POLICY FOR

FIPS SECURITY POLICY FOR FIPS 140-2 SECURITY POLICY FOR SPECTRAGUARD ENTERPRISE SENSOR August 26, 2011 FIPS 140-2 LEVEL-2 SECURITY POLICY FOR AIRTIGHT NETWORKS SPECTRAGUARD ENTERPRISE SENSOR 1. Introduction This document describes

More information

Version. Table of Contents

Version. Table of Contents NAP Protocol 1.0 Version Version Date By Comment v1.0 24.01.2011 JP Release version of NAP documentation. Table of Contents 1 Basic concepts...3 1.1 Usage info...3 1.2 Length byte...3 1.3 Literal characters...4

More information

Symmetric Cryptography

Symmetric Cryptography CSE 484 (Winter 2010) Symmetric Cryptography Tadayoshi Kohno Thanks to Dan Boneh, Dieter Gollmann, John Manferdelli, John Mitchell, Vitaly Shmatikov, Bennet Yee, and many others for sample slides and materials...

More information

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING ENEE 457 Computer Systems Security Instructor: Charalampos Papamanthou Homework 2 Out: 09/23/16 Due: 09/30/16 11:59pm Instructions

More information

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 08r. Pre-exam 2 Last-minute Review Cryptography Paul Krzyzanowski Rutgers University Spring 2018 March 26, 2018 CS 419 2018 Paul Krzyzanowski 1 Cryptographic Systems March 26, 2018 CS

More information

ESP8266 Application Note Firmware Download Protocol

ESP8266 Application Note Firmware Download Protocol ESP8266 Application Note Firmware Download Protocol Version 1.0 Copyright 2016 About This Guide This document introduces ESP8266 firmware download protocol with a structure as follows. Chapter Title Subject

More information

Conto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION

Conto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION PR 121 rev. 0 11/11/2011 Pagina 1 di 9 ELECTRICITY ENERGY METER FIRMWARE 1.6 Conto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION 2.0 DATA MESSAGE DESCRIPTION 2.1 Data field description 2.2 Data format

More information

6.857 L17. Secure Processors. Srini Devadas

6.857 L17. Secure Processors. Srini Devadas 6.857 L17 Secure Processors Srini Devadas 1 Distributed Computation Example: Distributed Computation on the Internet (SETI@home, etc.) Job Dispatcher Internet DistComp() { x = Receive(); result = Func(x);

More information

NOVOtechnik. Content. TIM CANopen Gebrauchsanleitung TIM CANopen user manual SIEDLE GRUPPE

NOVOtechnik. Content. TIM CANopen Gebrauchsanleitung TIM CANopen user manual SIEDLE GRUPPE Content 9 CANopen 2 9.1 EDS Files 2 9.2 Features 2 9.2.1 Basic information 2 9.2.2 Basics based on CiA DS-301, V4.02 2 9.2.3 Basics based on CiA DSP-406, V3.2 3 9.2.4 Basics SDO communication 3 9.2.5 Basics

More information

Meru Networks. Security Gateway SG1000 Cryptographic Module Security Policy Document Version 1.2. Revision Date: June 24, 2009

Meru Networks. Security Gateway SG1000 Cryptographic Module Security Policy Document Version 1.2. Revision Date: June 24, 2009 Security Gateway SG1000 Cryptographic Module Security Policy Document Version 1.2 Meru Networks Revision Date: June 24, 2009 Copyright Meru Networks 2008. May be reproduced only in its original entirety

More information

Read section 8 of this document for detailed instructions on how to use this interface spec with LibUSB For OSX

Read section 8 of this document for detailed instructions on how to use this interface spec with LibUSB For OSX CP2130 INTERFACE SPECIFICATION 1. Introduction The Silicon Labs CP2130 USB-to-SPI bridge is a device that communicates over the Universal Serial Bus (USB) using vendor-specific control and bulk transfers

More information

ECE254 Lab3 Tutorial. Introduction to MCB1700 Hardware Programming. Irene Huang

ECE254 Lab3 Tutorial. Introduction to MCB1700 Hardware Programming. Irene Huang ECE254 Lab3 Tutorial Introduction to MCB1700 Hardware Programming Irene Huang Lab3 Requirements : API Dynamic Memory Management: void * os_mem_alloc (int size, unsigned char flag) Flag takes two values:

More information

nrf52810 Engineering A

nrf52810 Engineering A nrf52810 Engineering A Errata v1.3 4430_133 v1.3 / 2018-03-23 Contents 1 nrf52810 Engineering A Errata........................ 3 2 Change log.................................... 4 3 New and inherited anomalies.........................

More information

M2351 Trusted Boot. Application Note for 32-bit NuMicro Family

M2351 Trusted Boot. Application Note for 32-bit NuMicro Family M2351 Trusted Boot Application Note for 32-bit NuMicro Family Document Information Abstract Apply to Introduce the M2351 Secure Bootloader, Secure Boot verification mechanism, and how it works to perform

More information

EEPROM Emulation with the ez80f91 MCU. Discussion

EEPROM Emulation with the ez80f91 MCU. Discussion Application Note EEPROM Emulation with the ez80f91 MCU AN015803-0608 Abstract This Application Note describes a method to utilize a portion of Zilog s ez80acclaimplus! MCU s Flash memory to emulate the

More information

8032 MCU + Soft Modules. c = rcvdata; // get the keyboard scan code

8032 MCU + Soft Modules. c = rcvdata; // get the keyboard scan code 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 { 0x25, 0x66 }, // "4" { 0x2E, 0x6D }, // "5" { 0x36, 0x7D }, // "6" { 0x3D, 0x07 }, // "7" { 0x3E, 0x7F }, // "8" { 0x46,

More information