我需要 Android 9 中支持安全元件和 StrongBox 的 Android 手机列表。在哪里或如何找到该列表?
我在 Samsung Galaxy S9 和 AVD Google Pixel 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:无法生成密钥对
目前支持 StrongBox 的设备很少,不幸的是,您可以在网上找到的信息充其量也很少。
虽然你是对的,但根据安卓 https://developer.android.com/about/versions/pie/android-9.0运行 Android 9.0 的设备应该支持 Strongbox,Strongbox 是一个单独的硬件组件,我假设只有使用 Android 9.0 启动的设备才有机会拥有该硬件。
有的是GrapheneOS/证明样本 https://github.com/GrapheneOS/AttestationSamples存储库,收集有关多个设备的安全信息。
看了一下,只有 Google 的 Pixel 3 设备支持保险箱。您可以在文件夹中看到 Strongbox 认证证书。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)