List of Android smart phones that support Android StrongBox on API 28(Android Pie)

懵懂的女人 提交于 2020-03-18 07:59:18

问题


I need the list of Android phones that support secure element and StrongBox in Android 9. Where or how can I find that?

I tried the code below with Samsung Galaxy S9 and also with AVD Google Pixle XL API 28

KeyPairGenerator kpg = null;
kpg = KeyPairGenerator.getInstance(
KeyProperties.KEY_ALGORITHM_RSA, "AndroidKeyStore");
kpg.initialize(new KeyGenParameterSpec.Builder("keystore1", KeyProperties.PURPOSE_SIGN)
                    .setCertificateSerialNumber(BigInteger.valueOf(1L))
                    .setCertificateSubject(new X500Principal("CN=MyCompany"))
                    .setIsStrongBoxBacked(true) /* Enable StrongBox */
                    .setInvalidatedByBiometricEnrollment(true)
                    .build());
            KeyPair kp = kpg.generateKeyPair();
            KeyFactory factory = KeyFactory.getInstance(KeyProperties.KEY_ALGORITHM_EC, "AndroidKeyStore");
KeyInfo keyInfo = factory.getKeySpec(kp.getPrivate(), KeyInfo.class);
keyInfo.isInsideSecureHardware();

It throws the exception below:

android.security.keystore.StrongBoxUnavailableException: Failed to generate key pair


回答1:


Currently very few devices support StrongBox, and unfortunately the information you can find online is scarce at best.

While you are right, that according to Android devices running Android 9.0 should support Strongbox, Strongbox is a separate hardware component, and I would assume only devices launching with Android 9.0 have the chance of having the hardware.

There is the GrapheneOS/AttestationSamples repository, which collects security information about multiple devices.

Taking a look, only Google's Pixel 3 devices support strongbox. You can see the Strongbox attestation certificates in the folders.



来源:https://stackoverflow.com/questions/55671931/list-of-android-smart-phones-that-support-android-strongbox-on-api-28android-pi

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