在API 28(Android Pie)上支持Android StrongBox的Android智能手机列表 [英] List of Android smart phones that support Android StrongBox on API 28(Android Pie)
问题描述
我需要支持Android 9中支持安全元素和StrongBox的Android手机列表.在哪里或如何找到它?
I need the list of Android phones that support secure element and StrongBox in Android 9. Where or how can I find that?
我在三星Galaxy S9和AVD Google Pixle XL API 28上尝试了以下代码
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();
它将引发以下异常:
android.security.keystore.StrongBoxUnavailableException:无法生成密钥对
android.security.keystore.StrongBoxUnavailableException: Failed to generate key pair
推荐答案
当前很少有设备支持StrongBox,不幸的是,您在网上找到的信息充其量是稀缺的.
Currently very few devices support StrongBox, and unfortunately the information you can find online is scarce at best.
您说得对,但根据Android 设备运行Android 9.0应该支持Strongbox,Strongbox是一个单独的硬件组件,我认为只有使用Android 9.0启动的设备才有机会安装硬件.
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.
有一个 GrapheneOS/AttestationSamples 存储库,该存储库收集有关多个设备的安全信息.
There is the GrapheneOS/AttestationSamples repository, which collects security information about multiple devices.
看看,只有Google的Pixel 3设备支持保险箱.您可以在文件夹中看到保险箱认证证书.
Taking a look, only Google's Pixel 3 devices support strongbox. You can see the Strongbox attestation certificates in the folders.
这篇关于在API 28(Android Pie)上支持Android StrongBox的Android智能手机列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!