Home
last modified time | relevance | path

Searched refs:keySizeBits (Results 1 – 4 of 4) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DECDSASignatureTest.java45 int keySizeBits = TestUtils.getKeySizeBits(keyPair.getPublic()); in assertNONEwithECDSATruncatesInputToFieldSize() local
46 byte[] message = new byte[(keySizeBits * 3) / 8]; in assertNONEwithECDSATruncatesInputToFieldSize()
66 signature.update(message, 0, (keySizeBits + 7) / 8); in assertNONEwithECDSATruncatesInputToFieldSize()
70 signature.update(message, 0, (keySizeBits / 8) - 1); in assertNONEwithECDSATruncatesInputToFieldSize()
87 int keySizeBits = TestUtils.getKeySizeBits(keyPair.getPublic()); in assertNONEwithECDSASupportsMessagesShorterThanFieldSize() local
88 byte[] message = new byte[(keySizeBits * 3 / 4) / 8]; in assertNONEwithECDSASupportsMessagesShorterThanFieldSize()
108 byte[] fullLengthMessage = TestUtils.leftPadWithZeroBytes(message, keySizeBits / 8); in assertNONEwithECDSASupportsMessagesShorterThanFieldSize()
DKeyPairGeneratorTest.java1031 for (int keySizeBits = 0; keySizeBits <= 1024; keySizeBits++) { in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1032 if ((keySizeBits == 224) || (keySizeBits == 256) || (keySizeBits == 384) in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1033 || (keySizeBits == 521)) { in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1043 .setKeySize(keySizeBits) in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1046 + keySizeBits + " bits"); in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1186 int keySizeBits, ECParameterSpec expectedParams) throws Exception { in assertKeyGenUsingECSizeOnlyUsesCorrectCurve() argument
1191 .setKeySize(keySizeBits) in assertKeyGenUsingECSizeOnlyUsesCorrectCurve()
1212 assertEquals(((keySizeBits + 7) / 8) * 8, consumedEntropyAmountBytes * 8); in assertKeyGenUsingECSizeOnlyUsesCorrectCurve()
1245 private void assertKeyGenUsingRSASizeOnlySupported(int keySizeBits) throws Exception { in assertKeyGenUsingRSASizeOnlySupported() argument
1250 .setKeySize(keySizeBits) in assertKeyGenUsingRSASizeOnlySupported()
[all …]
DKeyGeneratorTest.java121 int keySizeBits = DEFAULT_KEY_SIZES.get(algorithm); in testInitWithKeySizeThrowsUnsupportedOperationException() local
123 keyGenerator.init(keySizeBits); in testInitWithKeySizeThrowsUnsupportedOperationException()
138 int keySizeBits = DEFAULT_KEY_SIZES.get(algorithm); in testInitWithKeySizeAndSecureRandomThrowsUnsupportedOperationException() local
140 keyGenerator.init(keySizeBits, rng); in testInitWithKeySizeAndSecureRandomThrowsUnsupportedOperationException()
DAndroidKeyStoreTest.java2495 int keySizeBits = keySizeBytes * 8; in testKeyStore_ImportSupportedSizes_AES() local
2499 if (TestUtils.contains(KeyGeneratorTest.AES_SUPPORTED_KEY_SIZES, keySizeBits)) { in testKeyStore_ImportSupportedSizes_AES()
2503 assertEquals(keySizeBits, TestUtils.getKeyInfo(key).getKeySize()); in testKeyStore_ImportSupportedSizes_AES()
2514 throw new RuntimeException("Failed for key size " + keySizeBits, e); in testKeyStore_ImportSupportedSizes_AES()