The inTee option and the teeKeyHandle format provided a way to create keys in the TEE and export them as opaque handles. While this API made it transparent when a key is really stored in the TEE, it was not convenient in practice, as it required the application to conduct specific checks for hardware support on Android in order to decide whether to store the key in TEE or not.
This commit removes the inTee option. ECDSA and ECDH keys with extractable set to false are now generated in the TEE by the platform when the device supports it. When the device does not support it, the key is generated in software. In practice, this means that non-extractable EC* keys are always generated in TEE on iOS, and on Android only when the device supports it.
The "teeKeyHandle" format has also been removed. The exportKey method called for EC* keys with extractable set to false and the format "raw" now returns an opaque handle to the key in the TEE instead of throwing.
The
inTee
option and theteeKeyHandle
format provided a way to create keys in the TEE and export them as opaque handles. While this API made it transparent when a key is really stored in the TEE, it was not convenient in practice, as it required the application to conduct specific checks for hardware support on Android in order to decide whether to store the key in TEE or not.This commit removes the
inTee
option. ECDSA and ECDH keys withextractable
set tofalse
are now generated in the TEE by the platform when the device supports it. When the device does not support it, the key is generated in software. In practice, this means that non-extractable EC* keys are always generated in TEE on iOS, and on Android only when the device supports it.The
"teeKeyHandle"
format has also been removed. TheexportKey
method called for EC* keys withextractable
set tofalse
and the format"raw"
now returns an opaque handle to the key in the TEE instead of throwing.