The TEE on this page is the trusted execution environment built into the user’s Android device. It is not the server-side TEE that Dynamic uses for embedded wallets, which is a separate component.
Platforms
The SDK creates keys in different hardware depending on the platform, and only Android lets you choose. If a term is unfamiliar, the glossary defines it.Android TEE (default)
The SDK asks Android Keystore for a key backed by the device’s TEE. This is the default from version 1.49.1, and it needs no configuration.Android StrongBox (opt-in)
When you setreactNative.android.strongBox to true, the SDK asks Android Keystore for a key backed by the StrongBox secure element. Devices without StrongBox get a TEE-backed key instead.
iOS Secure Enclave
The SDK creates a P-256 key in the Secure Enclave, and iOS has no StrongBox-style alternative. ThestrongBox option is accepted and ignored on iOS.
What TEE and StrongBox are
Android Keystore can bind a key to secure hardware, so that the key material is never exposed outside that hardware. Android offers two kinds of hardware for this.- TEE (trusted execution environment). An isolated execution environment on the device’s system on a chip, separate from the main Android operating system. Android most often implements its hardware-backed Keystore in a TEE.
- StrongBox. A separate secure element or integrated secure enclave. Android describes it as providing stronger isolation and tamper resistance than the TEE, and it must have its own CPU, secure storage, and a true random-number generator.
The trade-off
The Android documentation describes StrongBox as appropriate for apps that need the highest level of security, particularly apps at risk of physical tampering or side-channel attacks. It also states that StrongBox is slower, more resource-constrained, and supports fewer concurrent operations than the TEE, and that most apps do not need it.
Every signature the SDK makes with one of these keys runs inside the secure hardware that holds it, so the speed difference applies to each signing operation, not only to key creation. The Android documentation gives no figure for the difference, and the size of the gap varies by device.
Before version 1.49.1, the SDK requested StrongBox on Android 9 and later and fell back to the TEE when StrongBox failed. Starting with version 1.49.1, the SDK requests a TEE-backed key unless you opt in. If your app relied on the earlier behavior, set
reactNative.android.strongBox to true to keep requesting StrongBox.Enable StrongBox
SetreactNative.android.strongBox to true when you create the client. The option requires @dynamic-labs-sdk/client version 1.49.1 or later.
How the option behaves
- The SDK reads the option when it creates a key. It does not regenerate keys that already exist, so a key keeps the hardware tier it was created with.
- With
strongBoxset totrue, the SDK asks Android Keystore for a StrongBox-backed key on Android 9 or later. If key generation in StrongBox fails, for example because the device has no StrongBox, the SDK retries with a TEE-backed key, so key creation still succeeds. - With
strongBoxunset orfalse, the SDK requests a TEE-backed key and does not attempt StrongBox. - On iOS, the option has no effect because the SDK always creates keys in the Secure Enclave. On the web, the SDK ignores the option.
Choose a setting
Keep the default for most apps. The TEE already keeps key material inside secure hardware, and it signs faster. Enable StrongBox when your threat model includes physical attacks on the device and you accept slower signing and the possibility that some devices fall back to the TEE.Related pages
- Create a Dynamic client lists every client option, including
reactNative. - React Native setup covers the native configuration your app needs before you create the client.