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.java290 String keyAlgorithm = publicKey.getAlgorithm(); in assertKeyPairSelfConsistent() local
291 if ("EC".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent()
301 } else if ("RSA".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent()
310 } else if ("XDH".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent()
333 fail("Unsuported key algorithm: " + keyAlgorithm); in assertKeyPairSelfConsistent()
789 … public static KeyPair getKeyPairForKeyAlgorithm(String keyAlgorithm, Iterable<KeyPair> keyPairs) { in getKeyPairForKeyAlgorithm() argument
791 if (keyAlgorithm.equalsIgnoreCase(keyPair.getPublic().getAlgorithm())) { in getKeyPairForKeyAlgorithm()
795 throw new IllegalArgumentException("No KeyPair for key algorithm " + keyAlgorithm); in getKeyPairForKeyAlgorithm()
798 public static Key getKeyForKeyAlgorithm(String keyAlgorithm, Iterable<? extends Key> keys) { in getKeyForKeyAlgorithm() argument
800 if (keyAlgorithm.equalsIgnoreCase(key.getAlgorithm())) { in getKeyForKeyAlgorithm()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java97 public final String keyAlgorithm; field in KeyManagementTest.SupportedKeyAlgorithm
102 String keyAlgorithm, String signatureAlgorithm, in SupportedKeyAlgorithm() argument
104 this.keyAlgorithm = keyAlgorithm; in SupportedKeyAlgorithm()
340 String keyAlgorithm, String signatureAlgorithm, in generateKeyAndCheckAttestation() argument
344 String.format("com.android.test.attested-%s", keyAlgorithm.toLowerCase()); in generateKeyAndCheckAttestation()
359 getWho(), keyAlgorithm, spec, deviceIdAttestationFlags); in generateKeyAndCheckAttestation()
368 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
377 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
386 keyAlgorithm)) in generateKeyAndCheckAttestation()
400 keyAlgorithm, deviceIdAttestationFlags, ex)) in generateKeyAndCheckAttestation()
[all …]
/cts/tests/tests/keystore/src/android/keystore/cts/
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 …]
DDeviceOwnerKeyManagementTest.java103 public final String keyAlgorithm; field in DeviceOwnerKeyManagementTest.SupportedKeyAlgorithm
108 String keyAlgorithm, String signatureAlgorithm, in SupportedKeyAlgorithm() argument
110 this.keyAlgorithm = keyAlgorithm; in SupportedKeyAlgorithm()
358 String keyAlgorithm, String signatureAlgorithm, in generateKeyAndCheckAttestation() argument
362 String.format("com.android.test.attested-%s", keyAlgorithm.toLowerCase()); in generateKeyAndCheckAttestation()
377 DEVICE_ADMIN_COMPONENT_NAME, keyAlgorithm, spec, deviceIdAttestationFlags); in generateKeyAndCheckAttestation()
388 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
399 keyAlgorithm, deviceIdAttestationFlags)) in generateKeyAndCheckAttestation()
411 keyAlgorithm)) in generateKeyAndCheckAttestation()
429 keyAlgorithm, deviceIdAttestationFlags, ex)) in generateKeyAndCheckAttestation()
[all …]
DSignatureTest.java766 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(algorithm); in testLongMsgKat() local
768 && (!KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm))) { in testLongMsgKat()
1204 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(signatureAlgorithm); in getDefaultKeyAndCertResIds() local
1205 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in getDefaultKeyAndCertResIds()
1207 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getDefaultKeyAndCertResIds()
1210 throw new IllegalArgumentException("Unknown key algorithm: " + keyAlgorithm); in getDefaultKeyAndCertResIds()
1215 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(signatureAlgorithm); in importDefaultKatKeyPair() local
1218 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKeyPair()
1225 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKeyPair()
1233 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in importDefaultKatKeyPair()
[all …]
DRSASignatureTest.java58 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(algorithm);
59 if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) {
DCipherTest.java1915 String keyAlgorithm = TestUtils.getCipherKeyAlgorithm(transformation); in getWorkingDecryptionParameterSpec() local
1916 if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec()
1918 } else if (KeyProperties.KEY_ALGORITHM_AES.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec()
1933 } else if (KeyProperties.KEY_ALGORITHM_3DES.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec()
1944 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in getWorkingDecryptionParameterSpec()
1991 String keyAlgorithm = TestUtils.getCipherKeyAlgorithm(transformation); in importDefaultKatKey() local
1992 if (KeyProperties.KEY_ALGORITHM_AES.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKey()
1997 } else if (KeyProperties.KEY_ALGORITHM_3DES.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKey()
2002 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKey()
2010 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in importDefaultKatKey()
[all …]