android - API 28(Android Pie) 上支持 Android StrongBox 的 Android 智能手机列表

标签 android security keystore secure-element

我需要在 Android 9 中支持安全元素和 StrongBox 的 Android 手机列表。我在哪里或如何找到它?

我在 Samsung Galaxy S9 和 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: 生成 key 对失败

最佳答案

目前很少有设备支持 StrongBox,不幸的是,您可以在网上找到的信息充其量也很少。

虽然你是对的,但according to Android运行 Android 9.0 的设备应该支持 Strongbox,Strongbox 是一个单独的硬件组件,我认为只有运行 Android 9.0 的设备才有可能拥有该硬件。

GrapheneOS/AttestationSamples存储库,收集有关多个设备的安全信息。

看了一下,只有谷歌的 Pixel 3 设备支持 strongbox。您可以在文件夹中看到 Strongbox 认证证书。

关于android - API 28(Android Pie) 上支持 Android StrongBox 的 Android 智能手机列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55671931/

相关文章:

jsp - XSS HTTP参数污染和getQueryString()

java - 如何在 Linux 中以编程方式列出所有 SSL/TLS 证书?

android - 使用 .cer 而不是 .p12 对 android 上的服务器进行身份验证

java - 无法在 Eclipse 的 keystore 中找到调试 key

android - 我需要 Firebase 推送 ID 的整数表示

java - ARCore – 禁用 ModelRenderable 的移动

security - CakePHP安全组件黑洞登录(data[_Token][key]字段未生成)

java - android: fragment 未加载 fragment AsyncTask ArrayAdapter

java - Android - 将值从 HTML 或 Javascript 传递到 Java 的最简单方法?

spring - 在 Spring Security 中,如何在密码比较期间正确生成随机盐?