Home
last modified time | relevance | path

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

/cts/tests/tests/keystore/src/android/keystore/cts/
DECDSASignatureTest.java45 int keySizeBits = TestUtils.getKeySizeBits(keyPair.getPublic()); in assertNONEwithECDSATruncatesInputToFieldSize() local
46 if (keySizeBits == 521) { in assertNONEwithECDSATruncatesInputToFieldSize()
52 byte[] message = new byte[(keySizeBits * 3) / 8]; in assertNONEwithECDSATruncatesInputToFieldSize()
72 signature.update(message, 0, (keySizeBits + 7) / 8); in assertNONEwithECDSATruncatesInputToFieldSize()
76 signature.update(message, 0, (keySizeBits / 8) - 1); in assertNONEwithECDSATruncatesInputToFieldSize()
93 int keySizeBits = TestUtils.getKeySizeBits(keyPair.getPublic()); in assertNONEwithECDSASupportsMessagesShorterThanFieldSize() local
94 byte[] message = new byte[(keySizeBits * 3 / 4) / 8]; in assertNONEwithECDSASupportsMessagesShorterThanFieldSize()
114 byte[] fullLengthMessage = TestUtils.leftPadWithZeroBytes(message, keySizeBits / 8); in assertNONEwithECDSASupportsMessagesShorterThanFieldSize()
DKeyPairGeneratorTest.java1312 for (int keySizeBits = 0; keySizeBits <= 1024; keySizeBits++) { in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1313 testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper(false, keySizeBits); in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1315 testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper(true, keySizeBits); in testGenerate_EC_ModernSpec_UnsupportedSizesRejected()
1320 …EC_ModernSpec_UnsupportedSizesRejectedHelper(boolean useStrongbox, int keySizeBits) throws Excepti… in testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper() argument
1322 if ((keySizeBits == 224) || (keySizeBits == 256) || (keySizeBits == 384) in testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper()
1323 || (keySizeBits == 521)) { in testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper()
1329 if (keySizeBits == 256) { in testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper()
1339 .setKeySize(keySizeBits) in testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper()
1343 + keySizeBits + " bits. useStrongbox: " + useStrongbox in testGenerate_EC_ModernSpec_UnsupportedSizesRejectedHelper()
1519 int keySizeBits, ECParameterSpec expectedParams) throws Exception { in assertKeyGenUsingECSizeOnlyUsesCorrectCurve() argument
[all …]
DKeyGeneratorTest.java130 int keySizeBits = DEFAULT_KEY_SIZES.get(algorithm); in testInitWithKeySizeThrowsUnsupportedOperationException() local
132 keyGenerator.init(keySizeBits); in testInitWithKeySizeThrowsUnsupportedOperationException()
147 int keySizeBits = DEFAULT_KEY_SIZES.get(algorithm); in testInitWithKeySizeAndSecureRandomThrowsUnsupportedOperationException() local
149 keyGenerator.init(keySizeBits, rng); in testInitWithKeySizeAndSecureRandomThrowsUnsupportedOperationException()
DTestUtils.java850 static boolean isKeyLongEnoughForSignatureAlgorithm(String algorithm, int keySizeBits) { in isKeyLongEnoughForSignatureAlgorithm() argument
874 int keySizeBytes = keySizeBits / 8; in isKeyLongEnoughForSignatureAlgorithm()
885 static int getMaxSupportedPlaintextInputSizeBytes(String transformation, int keySizeBits) { in getMaxSupportedPlaintextInputSizeBytes() argument
887 int modulusSizeBytes = (keySizeBits + 7) / 8; in getMaxSupportedPlaintextInputSizeBytes()
DAndroidKeyStoreTest.java2368 int keySizeBits = keySizeBytes * 8; in testKeyStore_ImportSupportedSizes_AES() local
2372 if (TestUtils.contains(KeyGeneratorTest.AES_SUPPORTED_KEY_SIZES, keySizeBits)) { in testKeyStore_ImportSupportedSizes_AES()
2376 assertEquals(keySizeBits, TestUtils.getKeyInfo(key).getKeySize()); in testKeyStore_ImportSupportedSizes_AES()
2387 throw new RuntimeException("Failed for key size " + keySizeBits, e); in testKeyStore_ImportSupportedSizes_AES()