Home
last modified time | relevance | path

Searched refs:keyAlgorithm (Results 1 – 8 of 8) sorted by relevance

/cts/tests/security/src/android/keystore/cts/
DCertificateUtils.java59 String keyAlgorithm = keyPair.getPrivate().getAlgorithm(); in createCertificate() local
61 if (keyAlgorithm.equals("RSA")) { in createCertificate()
63 } else if (keyAlgorithm.equals("EC")) { in createCertificate()
66 throw new IllegalArgumentException("Unknown key algorithm " + keyAlgorithm); in createCertificate()
/cts/tests/tests/keystore/src/android/keystore/cts/util/
DTestUtils.java223 String keyAlgorithm = publicKey.getAlgorithm(); in assertKeyPairSelfConsistent() local
224 if ("EC".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent()
234 } else if ("RSA".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent()
243 } else if ("XDH".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent()
266 fail("Unsuported key algorithm: " + keyAlgorithm); in assertKeyPairSelfConsistent()
711 … public static KeyPair getKeyPairForKeyAlgorithm(String keyAlgorithm, Iterable<KeyPair> keyPairs) { in getKeyPairForKeyAlgorithm() argument
713 if (keyAlgorithm.equalsIgnoreCase(keyPair.getPublic().getAlgorithm())) { in getKeyPairForKeyAlgorithm()
717 throw new IllegalArgumentException("No KeyPair for key algorithm " + keyAlgorithm); in getKeyPairForKeyAlgorithm()
720 public static Key getKeyForKeyAlgorithm(String keyAlgorithm, Iterable<? extends Key> keys) { in getKeyForKeyAlgorithm() argument
722 if (keyAlgorithm.equalsIgnoreCase(key.getAlgorithm())) { in getKeyForKeyAlgorithm()
[all …]
/cts/tests/tests/keystore/src/android/keystore/cts/
DDeviceOwnerKeyManagementTest.java80 public final String keyAlgorithm; field in DeviceOwnerKeyManagementTest.SupportedKeyAlgorithm
85 String keyAlgorithm, String signatureAlgorithm, in SupportedKeyAlgorithm() argument
87 this.keyAlgorithm = keyAlgorithm; in SupportedKeyAlgorithm()
305 String keyAlgorithm, String signatureAlgorithm, in generateKeyAndCheckAttestation() argument
309 String.format("com.android.test.attested-%s", keyAlgorithm.toLowerCase()); in generateKeyAndCheckAttestation()
324 DEVICE_ADMIN_COMPONENT_NAME, keyAlgorithm, spec, deviceIdAttestationFlags); in generateKeyAndCheckAttestation()
335 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
346 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
358 keyAlgorithm)) in generateKeyAndCheckAttestation()
376 keyAlgorithm, deviceIdAttestationFlags, ex)) in generateKeyAndCheckAttestation()
[all …]
DMacTest.java616 String macAlgorithm, String keyAlgorithm, KeyProtection keyProtection) in assertInitSucceeds() argument
618 SecretKey key = importDefaultKatKey(keyAlgorithm, keyProtection); in assertInitSucceeds()
629 String macAlgorithm, String keyAlgorithm, KeyProtection keyProtection) in assertInitThrowsInvalidKeyException() argument
631 SecretKey key = importDefaultKatKey(keyAlgorithm, keyProtection); in assertInitThrowsInvalidKeyException()
636 + ", key algorithm: " + keyAlgorithm); in assertInitThrowsInvalidKeyException()
640 private SecretKey getDefaultKatKey(String keyAlgorithm) { in getDefaultKatKey() argument
641 return new SecretKeySpec(KAT_KEY, keyAlgorithm); in getDefaultKatKey()
644 private SecretKey importDefaultKatKey(String keyAlgorithm) throws Exception { in importDefaultKatKey() argument
646 keyAlgorithm, in importDefaultKatKey()
651 String keyAlgorithm, KeyProtection keyProtection) throws Exception { in importDefaultKatKey() argument
[all …]
DSignatureTest.java764 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(algorithm); in testLongMsgKat() local
766 && (!KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm))) { in testLongMsgKat()
1200 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(signatureAlgorithm); in getDefaultKeyAndCertResIds() local
1201 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in getDefaultKeyAndCertResIds()
1203 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getDefaultKeyAndCertResIds()
1206 throw new IllegalArgumentException("Unknown key algorithm: " + keyAlgorithm); in getDefaultKeyAndCertResIds()
1211 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(signatureAlgorithm); in importDefaultKatKeyPair() local
1214 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKeyPair()
1221 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKeyPair()
1229 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in importDefaultKatKeyPair()
[all …]
DCipherTest.java1779 String keyAlgorithm = TestUtils.getCipherKeyAlgorithm(transformation); in getWorkingDecryptionParameterSpec() local
1780 if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec()
1782 } else if (KeyProperties.KEY_ALGORITHM_AES.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec()
1797 } else if (KeyProperties.KEY_ALGORITHM_3DES.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec()
1808 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in getWorkingDecryptionParameterSpec()
1855 String keyAlgorithm = TestUtils.getCipherKeyAlgorithm(transformation); in importDefaultKatKey() local
1856 if (KeyProperties.KEY_ALGORITHM_AES.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKey()
1861 } else if (KeyProperties.KEY_ALGORITHM_3DES.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKey()
1866 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKey()
1874 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in importDefaultKatKey()
[all …]
DRSASignatureTest.java58 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(algorithm);
59 if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) {
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java93 public final String keyAlgorithm; field in KeyManagementTest.SupportedKeyAlgorithm
98 String keyAlgorithm, String signatureAlgorithm, in SupportedKeyAlgorithm() argument
100 this.keyAlgorithm = keyAlgorithm; in SupportedKeyAlgorithm()
348 String keyAlgorithm, String signatureAlgorithm, in generateKeyAndCheckAttestation() argument
352 String.format("com.android.test.attested-%s", keyAlgorithm.toLowerCase()); in generateKeyAndCheckAttestation()
367 getWho(), keyAlgorithm, spec, deviceIdAttestationFlags); in generateKeyAndCheckAttestation()
376 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
385 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
394 keyAlgorithm)) in generateKeyAndCheckAttestation()
408 keyAlgorithm, deviceIdAttestationFlags, ex)) in generateKeyAndCheckAttestation()
[all …]