Application Note
Renesas RA Family

Secure Crypto Engine Operational Modes
Introduction
The Secure Crypto Engine 9 (SCE9) on Renesas RA Family MCUs can operate in two different modes,
called Compatibility Mode and Protected Mode. This Application Note describes the two modes, highlights
the advantages and disadvantages of each, and provides guidance for using the two modes. In addition,reference links are provided to existing Renesas RA Family Application Projects demonstrating these twomodes, so the user can refer to them for details on the corresponding FSP module usage.

Prerequisites and Intended Audience
This application note assumes you have some knowledge about cryptography. The reader is recommended
to read the Secure Crypto Engine chapter of the Hardware User’s Manual to understand the basics of the
hardware features of the SCE.
The intended audience are product developers, product manufacturers, product support, or end users whoare involved with designing application systems involving usage of the Renesas RA Family MCU Secure
Crypto Engine.

Contents
1.

Overview of RA Family MCU Secure Crypto Engine ................................................................ 2

1.1

General Structure of the Secure Crypto Engine ...................................................................................... 2

1.2

Cryptographic Capabilities of the Secure Crypto Engine ........................................................................ 3

1.3

Key Handling Capabilities of the Secure Crypto Engine ......................................................................... 3

1.3.1

Support for Wrapped Keys .................................................................................................................... 3

1.3.2

Support for Plaintext Keys ..................................................................................................................... 4

2.

Compatibility Mode of the Secure Crypto Engine ..................................................................... 4

2.1

Advantages of Compatibility Mode .......................................................................................................... 4

2.2

Disadvantages of Compatibility Mode ..................................................................................................... 4

2.3

Compatibility Mode Support with Renesas RA Family FSP .................................................................... 4

3.

The Protected Mode of the Secure Crypto Engine ................................................................... 4

3.1

Advantages of Protected Mode ............................................................................................................... 4

3.2

Disadvantages of Protected Mode .......................................................................................................... 5

3.3

Protected Mode Support with Renesas RA Family FSP and Renesas Flash Programmer .................... 5

4.

Secure Crypto Engine Operational Modes Summary ............................................................... 55.

Mode Selection based on Application Use Cases .................................................................... 6

5.1

Trusted Firmware M (TF-M) .................................................................................................................... 6

5.2

Internet Connectivity ................................................................................................................................ 6

5.3

Private Infrastructure Connectivity .......................................................................................................... 6

5.4

Production Support and Supply Chain Considerations ........................................................................... 6

6.

References ..............................................................................................................................6

R11AN0498EU0110 Rev.1.10
Oct.03.22

Page 1 of 7

Renesas RA Family
7.

Secure Crypto Engine Operational Modes

Website and Support ...............................................................................................................6

Revision History ..............................................................................................................................7

1. Overview of RA Family MCU Secure Crypto Engine
The Renesas RA Family RA4 and RA6 MCU Series include a Secure Crypto Engine (SCE), which consistsof an access management circuit, encryption engine, and random number generator. There are three type of
Secure Crypto Engines (SCE) that reside on the different MCU Groups.
••••

SCE9: RA4M2, RA4M3, RA6M4, RA6M5
SCE7: RA6M1, RA6M2, RA6M3, RA6T1
SCE5: RA4M1, RA4W1
SCE5_B: RA6T2

This section introduces the general structure and cryptographic capabilities of the Secure Crypto Engines.

1.1

General Structure of the Secure Crypto Engine

The Secure Crypto Engines are isolated subsystems on the MCU. The internal cryptographic operations are
isolated from a CPU-accessible bus. Renesas’s unique secure key handling capabilities enable the creationof solutions that have no plaintext key exposure outside the crypto engine.
Figure 1 is the SCE9 structural feature representation. Different versions of the SCE offer different security
feature sets, but the structural features are common. See section 1.2 for details on the differences.

Figure 1. SCE9 Structural Features

R11AN0498EU0110 Rev.1.10
Oct.03.22

Page 2 of 7

Renesas RA Family
1.2

Secure Crypto Engine Operational Modes

Cryptographic Capabilities of the Secure Crypto Engine

The following table provides a summary of the cryptographic capabilities of the Secure Crypto Engines foundin the RA Family MCUs, as supported by the Flexible Software Package (FSP).
Table 1. SCE Cryptographic Capabilities
Functions
RSA

Key Generation,
Sign/Verify

SCE9

SCE7

SCE5, SCE5_B

Up to 4K

Up to 2K-

(RSA 3K/4K - Verify only)ECC

Key Generation,
ECDSA, ECDH

Up to 512 bit

Up to 384 bit-

AES

ECB, CBC, CTR

128/192/256

128/192/256

128/256

GCTR

128/192/256

128/192/256-

XTS

128/256

128/256-

128/192/256

128/192/256

128/256

GHASH

Y

Y

Y

HMAC

SHA224/256

SHA224/256-

SHA2 (224/256)

Y

Y

-

TRNG

HW Entropy,
DRBG-AES-128

Y

Y

Y

WrappedKey
confidentiality,
authenticity

Y

Y

Y

Plaintext

Legacycompatibility

Y

Y

Y

Modes

Operational
Modes

Compatibility Mode,
Protected Mode

Compatibility Mode

Compatibility Mode

CCM, GCM,
CMAC
Hash

Following are some highlights of the features of each of the SCE modules:• SCE5 and SCE5_B provide hardware-accelerated symmetric encryption for confidentiality.
• SCE7 adds hardware-accelerated asymmetric encryption and advanced hash functions for integrity andauthentication. SCE7 AES, SHA, and random number generation DRBG are NIST CAVP certified.
• SCE9 extends asymmetric encryption support for RSA up to 4K and enhanced key storage capability witha Hardware Unique Key (HUK). The full complement of algorithms is NIST CAVP certified.

1.3

Key Handling Capabilities of the Secure Crypto Engine

1.3.1

Support for Wrapped Keys

Renesas RA Family MCUs have the unique ability to store and use cryptographic keys in wrapped format.
Wrapping involves encrypting and signing the key with either the MCU’s Hardware Unique Key (HUK) or aderived key based on the MCU’s Hardware Root Key and MCU’s Unique ID. Since these encryption keys are
unique for each individual MCU, even if an attacker were able to extract the wrapped key, another MCU will
not be able to use it.
In Compatibility Mode, plaintext keys can be wrapped by application software. Wrapped keys can also be
generated by the Secure Crypto Engine. The application software can then use the wrapped keys via the
PSA Crypto APIs. Support for secure key injection for Compatibility Mode is being added in FSP v4.x.x.
In Protected Mode, only wrapped keys can be used by application software. Wrapped keys can begenerated by the Secure Crypto Engine and known keys can be securely injected via a device programmer.
Application software can update the application with new keys by using a previously injected Key-Update
Key, which must be injected via a device programmer. Refer to the Renesas RA Family Installing andUpdating Secure Keys Application Project for more information about this process.
R11AN0498EU0110 Rev.1.10
Oct.03.22

Page 3 of 7

Renesas RA Family
1.3.2

Secure Crypto Engine Operational Modes

Support for Plaintext Keys

Plaintext keys are often required to provide legacy system support or to integrate with various software
stacks and libraries. SCE Compatibility Mode supports plaintext key usage.
SCE Protected Mode does not support plaintext keys. Having plaintext keys present in the application isinherently a security risk, because it is possible that malicious code could exploit system weaknesses andobtain the plaintext key data. This risk may be determined to be low enough to be acceptable, but the risk
does exist. Protected Mode protects against this risk by not supporting plaintext key usage.

2. Compatibility Mode of the Secure Crypto Engine
Compatibility Mode provides straight-forward integration with legacy systems and third-party software andsolutions, while offering optimised performance and unlimited secure key storage.

2.1

Advantages of Compatibility Mode

Following are some advantages when using Compatibility Mode.
• Plaintext keys are allowed. This provides compatibility with legacy systems and simplifies softwaredevelopment. It can also be necessary to integrate with existing software and infrastructure. Many
existing programming systems support plaintext key installation, often using application code to securely
store the key on chip.
• Wrapped keys for secure key storage are supported but not required. Generation of wrapped keys is also
supported. Support for secure key injection for Compatibility Mode is being added in FSP v4.x.x.

2.2

Disadvantages of Compatibility Mode

Following are some disadvantages when using Compatibility mode.
• No Simple Power Analysis (SPA) and Differential Power Analysis (DPA) protections.
• Potential user key exposure if plaintext keys are used. The user must evaluate the potential threats andrisk of this exposure and implement their design accordingly.
• Secure key injection is more complicated than for Protected Mode, as it involves application-level code.
• Secure key update is limited, as there will be plaintext exposure outside SCE. For more information about
this process, refer to the Renesas RA Family MCU Installing and Utilizing Cryptographic User Keys using
SCE9 Application Project.

2.3

Compatibility Mode Support with Renesas RA Family FSPThe SCE Compatibility Mode is supported by all Renesas RA Family RA6 and RA4 MCUs which have a
Secure Crypto Engine. This mode can be accessed using FSP MbedCrypto module, the PSA Crypto APIs,or the Network connection stacks in FSP v2.0.0 or later. There are several application projects that
demonstrate the SCE operating in Compatibility mode. Refer to the Reference section items 3 to 5.

3. The Protected Mode of the Secure Crypto Engine
Protected Mode provides optimum protection against security attacks by providing SPA/DPA resistance andsecure key injection and update, with a usage model that enforces secure best practices key handling.

3.1

Advantages of Protected Mode

Protected Mode has many security advantages listed as follows:••••

No plaintext key exposure on any CPU- or externally accessible bus.
Secure key injection using the serial programming interface simplifies secure key provisioning.
Secure key update via user-installed Key-Update Key enables secure key update in the field.
SPA/DPA side-channel attack resistance is included. Side-channel attack using power analysis is one of
the most frequent attacks used to extract sensitive information from a chip. Renesas RA Family SCE
Protected Mode implements countermeasures against such attacks.
• Countermeasures for timing attacks are implemented. The ECC and RSA implementation on SCE9 areconstant time when dealing with sensitive key material.
• The implemented API is designed to be compatible with the RX Family TSIP Library, facilitating the
porting of software between Renesas MCU families.

R11AN0498EU0110 Rev.1.10
Oct.03.22

Page 4 of 7

Renesas RA Family
3.2

Secure Crypto Engine Operational Modes

Disadvantages of Protected Mode

Following are the potential disadvantages of using Protected Mode:• Plaintext keys are not allowed, which can introduce difficulties integrating with legacy systems andsoftware.
• For cryptographic protocols that needs key calculation, for example ECDH and ECIES, key calculationmust be done within the SCE. Depending on the specific protocol, this functionality may or may not be
supported by the FSP.

3.3

Protected Mode Support with Renesas RA Family FSP and Renesas Flash
Programmer

The SCE Protected Mode can be accessed using the FSP Crypto module (r_sce_protected) in astandalone format with FSP v3.0.0 or later versions. Support for other libraries (for example, TLS) will be
integrated in later FSP releases.
Protected Mode supports wrapped user key generation via FSP Crypto API calls and key injection via theserial programming interface using RFP.
Field update of user keys can be achieved by injecting one or more Key-Update Keys via the serial
programming interface. New keys are then injected using one of the previously injected Key-Update Keys
and the FSP Crypto APIs.
To get hands-on experience using the SCE Protected Mode with FSP Crypto APIs, user can reference
Renesas RA Family MCU Installing and Updating Secure Keys Application Project. This Application Project
includes an Application Note that provides step-by-step instructions on how to perform application key and
Key-Update Key injection. In addition, a reference example software project is provided in this Application
Project that implements key update via the previously injected Key-Update Key and FSP Crypto APIs. See
the Reference section for information on this Application Project.

4. Secure Crypto Engine Operational Modes Summary
The PSA Crypto API implementation uses SCE Compatibility Mode. The FSP Crypto API
implementation uses SCE Protected Mode. The following table provides a side-by-side comparison of thetwo modes regarding the key formats, key injection in terms of FSP support and inoperability between thetwo different operation modes. Note that keys injected via a device programmer (that is, the factorybootloader) cannot be used in Compatibility Mode with the SCE9. SCE5_B key injection via thefactory bootloader is performed in Compatibility mode.

R11AN0498EU0110 Rev.1.10
Oct.03.22

Page 5 of 7

Renesas RA Family

Secure Crypto Engine Operational Modes

5. Mode Selection based on Application Use Cases
This section introduces some of the common cryptographic application use cases. Information on the SCE
operational modes support status for these uses cases are provided for user’s reference.

5.1

Trusted Firmware M (TF-M)

Trusted Firmware-M (TF-M) implements the Secure Processing Environment (SPE) for Armv8-M, Armv8.1-M
architectures (for example, the Arm® Cortex®-M33, Cortex-M23, Cortex-M55 processors) or dual-core
platforms. Renesas RA Family FSP integrated TF-M support starting with FSP v2.0.0 for use on TrustZoneenabled MCUs.
TF-M uses PSA Crypto APIs and SCE Compatibility Mode for cryptographic operations. This support allows
the customer to benefit from the Arm PSA Ecosystem software.

5.2

Internet Connectivity

The FSP has integrated Amazon FreeRTOS and MbedTLS support. Compatibility mode is used when
integrating with this software combination.
The FSP also integrates Azure RTOS and NetX Duo support from FSP v3.0.0. Compatibility mode is used
for this software combination.
Internet connectivity solutions using Protected mode are currently available from Renesas Partner wolfSSL
Inc., providing optimum secure key storage.

5.3

Private Infrastructure Connectivity

For private infrastructure in industry or networking applications, it is recommended, if possible, to use
Protected Mode with FSP Crypto APIs for increased security considerations.
If plaintext keys must be used, for example, to interface with existing infrastructure, then Compatibility Modewith PSA Crypto APIs must be used.

5.4

Production Support and Supply Chain Considerations

Protected Mode provides the following benefits for customers who are concerned with protecting their supply
chain:• Secure key injection can be conveniently performed in production for all MCUs.
• With RA Family MCUs, OEMs can further lock down the secure key storage and IP region for enhanced
security control prior to hardware delivery downstream.

6. References
1. Renesas RA Family MCU RA6M4 Group User’s Manual: Hardware
2. Renesas RA Family MCU RA6M3 Group User’s Manual: Hardware
3. Renesas RA Family MCU Establishing and Protecting the Device Identity using SCE7 and Security MPU
4. Renesas RA Family MCU Establishing and Protecting the Device Identity using SCE9 and TrustZone
5. Renesas RA Family MCU Injecting Plaintext User Keys (Using Trusted Firmware M (TF-M) with FSP
v2.03)
6. Renesas RA Family Injecting and Updating Secure User Keys (Document number: R11AN0496)

7. Website and Support
Visit the following URLs to learn about the RA family of microcontrollers, download tools and documentation,and get support.
RA Family Product Information
Flexible Software Package (FSP)RA Family Product Support Forum
Renesas Support
Renesas Secure – IoT

R11AN0498EU0110 Rev.1.10
Oct.03.22

renesas.com/rarenesas.com/ra/fsp
renesas.com/ra/forum
renesas.com/support
renesas.com/iot-security

Page 6 of 7

Renesas RA Family

Secure Crypto Engine Operational Modes

Revision History
Rev.
1.00
1.10

Date
May.18.21
Oct.03.22

R11AN0498EU0110 Rev.1.10
Oct.03.22

Description
Page
SummaryFirst release
Multiple
Minor updates

Page 7 of 7

Notice1.

Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products
and application examples. You are fully responsible for the incorporation or any other use of the circuits, software, and information in the design of yourproduct or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by you or third parties arising from the useof these circuits, software, or information.
2. Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other claims involving patents, copyrights,
or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical information described in thisdocument, including but not limited to, the product data, drawings, charts, programs, algorithms, and application examples.
3. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics
or others.
4. You shall be responsible for determining what licenses are required from any third parties, and obtaining such licenses for the lawful import, export,
manufacture, sales, utilization, distribution or other disposal of any products incorporating Renesas Electronics products, if required.
5. You shall not alter, modify, copy, or reverse engineer any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any
and all liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copying or reverse engineering.
6. Renesas Electronics products are classified according to the following two quality grades: “Standard” and “High Quality”. The intended applications foreach Renesas Electronics product depends on the product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; homeelectronic appliances; machine tools; personal electronic equipment; industrial robots; etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication equipment; key
financial terminal systems; safety control equipment; etc.
Unless expressly designated as a high reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas
Electronics document, Renesas Electronics products are not intended or authorized for use in products or systems that may pose a direct threat tohuman life or bodily injury (artificial life support devices or systems; surgical implantations; etc.), or may cause serious property damage (spacesystem; undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics
disclaims any and all liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics productthat is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.
7. No semiconductor product is absolutely secure. Notwithstanding any security measures or features that may be implemented in Renesas Electronics
hardware or software products, Renesas Electronics shall have absolutely no liability arising out of any vulnerability or security breach, including but
not limited to any unauthorized access to or use of a Renesas Electronics product or a system that uses a Renesas Electronics product. RENESASELECTRONICS DOES NOT WARRANT OR GUARANTEE THAT RENESAS ELECTRONICS PRODUCTS, OR ANY SYSTEMS CREATED USINGRENESAS ELECTRONICS PRODUCTS WILL BE INVULNERABLE OR FREE FROM CORRUPTION, ATTACK, VIRUSES, INTERFERENCE,
HACKING, DATA LOSS OR THEFT, OR OTHER SECURITY INTRUSION (“Vulnerability Issues”). RENESAS ELECTRONICS DISCLAIMS ANY AND
ALL RESPONSIBILITY OR LIABILITY ARISING FROM OR RELATED TO ANY VULNERABILITY ISSUES. FURTHERMORE, TO THE EXTENTPERMITTED BY APPLICABLE LAW, RENESAS ELECTRONICS DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, WITHRESPECT TO THIS DOCUMENT AND ANY RELATED OR ACCOMPANYING SOFTWARE OR HARDWARE, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8. When using Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, “General Notes for
Handling and Using Semiconductor Devices” in the reliability handbook, etc.), and ensure that usage conditions are within the ranges specified byRenesas Electronics with respect to maximum ratings, operating power supply voltage range, heat dissipation characteristics, installation, etc. Renesas
Electronics disclaims any and all liability for any malfunctions, failure or accident arising out of the use of Renesas Electronics products outside of suchspecified ranges.
9. Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specificcharacteristics, such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Unless designated as a high reliability
product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas Electronics document, Renesas Electronics
products are not subject to radiation resistance design. You are responsible for implementing safety measures to guard against the possibility of bodily
injury, injury or damage caused by fire, and/or danger to the public in the event of a failure or malfunction of Renesas Electronics products, such as
safety design for hardware and software, including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment foraging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult and impractical, you areresponsible for evaluating the safety of the final products or systems manufactured by you.
10. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas
Electronics product. You are responsible for carefully and sufficiently investigating applicable laws and regulations that regulate the inclusion or use ofcontrolled substances, including without limitation, the EU RoHS Directive, and using Renesas Electronics products in compliance with all theseapplicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliancewith applicable laws and regulations.
11. Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale isprohibited under any applicable domestic or foreign laws or regulations. You shall comply with any applicable export control laws and regulations
promulgated and administered by the governments of any countries asserting jurisdiction over the parties or transactions.
12. It is the responsibility of the buyer or distributor of Renesas Electronics products, or any other party who distributes, disposes of, or otherwise sells ortransfers the product to a third party, to notify such third party in advance of the contents and conditions set forth in this document.
13. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.
14. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note1)(Note2)“Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its directly or indirectly controlledsubsidiaries.
“Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
(Rev.5.0-1 October 2020)

Corporate Headquarters

Contact information

TOYOSU FORESIA, 3-2-24 Toyosu,
Koto-ku, Tokyo 135-0061, JapanFor further information on a product, technology, the most up-to-dateversion of a document, or your nearest sales office, please visit:www.renesas.com/contact/.

www.renesas.com

Trademarks
Renesas and the Renesas logo are trademarks of Renesas Electronics
Corporation. All trademarks and registered trademarks are the propertyof their respective owners.

© 2022 Renesas Electronics Corporation. All rights reserved.