ECDH with key in Android Key Store

安稳与你 提交于 2020-01-02 10:18:29

问题


I'm developping an Android App that generates an EC Asymetric key. When my app gets connected to a device, they exchange their public key. They then use ECDH to establish a shared secret. This shared secret is then used to derive an AES session key. All this is working fine.

I'm now working on the storage of the asymetric key. I wanted to put it in the Android KeyStore but I don't see how I can then do the ECDH operation. The key in the key store can be used to sign, decrypt or encrypt but I don't see the possibility to do ECDH operation. Is it possible?

While browsing SO, I have seen this discussion which says that it is not possible. If that's the case, how can I "secure" my asymetric key?

Thanks


回答1:


ECDH is not currently supported by AndroidKeyStore as you can see here https://developer.android.com/training/articles/keystore

The alternative to store securely the key pair into the device is to use an encryption key managed by AndroidKeyStore to encrypt the EC private key.

You can use a RSA or AES key depending on your target version. See how to securely store encryption keys in android?



来源:https://stackoverflow.com/questions/51950587/ecdh-with-key-in-android-key-store

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!