eclipsesource / tabris-js

Create native mobile apps in JavaScript or TypeScript.
https://tabrisjs.com
BSD 3-Clause "New" or "Revised" License
1.4k stars 170 forks source link

Support generating ECDH keys in TEE with access control #2282

Closed cpetrov closed 9 months ago

cpetrov commented 9 months ago

Previously, the options inTee and usageRequiresAuth of generateKey() were only supported for ECDSA keys. This commit extends the support for those options to ECDH keys as well.

It also provides an example for deriving AES keys from ECDH keys and encrypting/decrypting data with them, using the new options.

Boyscouting: reduce code duplication in the crypto-sign.ts snippet.