Home
last modified time | relevance | path

Searched refs:ciphertext (Results 1 – 6 of 6) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DRSACipherTest.java91 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
93 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
118 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
119 fail("Unexpectedly produced ciphertext (" + ciphertext.length + " bytes): " in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
120 + HexEncoding.encode(ciphertext)); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
147 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus()
148 fail("Unexpectedly produced ciphertext (" + ciphertext.length + " bytes): " in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus()
149 + HexEncoding.encode(ciphertext)); in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus()
179 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneByteLongerThanModulus()
180 fail("Unexpectedly produced ciphertext (" + ciphertext.length + " bytes): " in testNoPaddingEncryptionFailsWithPlaintextOneByteLongerThanModulus()
[all …]
DAESGCMCipherTestBase.java182 byte[] ciphertext = getKatCiphertext(); in testCiphertextBitflipDetectedWhenDecrypting()
183 ciphertext[ciphertext.length / 2] ^= 0x40; in testCiphertextBitflipDetectedWhenDecrypting()
186 doFinal(ciphertext); in testCiphertextBitflipDetectedWhenDecrypting()
194 byte[] ciphertext = getKatCiphertextWhenKatAadPresent(); in testAadBitflipDetectedWhenDecrypting()
200 doFinal(ciphertext); in testAadBitflipDetectedWhenDecrypting()
DCipherTest.java81 private final byte[] ciphertext; field in CipherTest.KatVector
93 private KatVector(byte[] plaintext, byte[] ciphertext) { in KatVector() argument
94 this(plaintext, null, ciphertext); in KatVector()
97 private KatVector(byte[] plaintext, AlgorithmParameterSpec params, byte[] ciphertext) { in KatVector() argument
99 this.ciphertext = ciphertext; in KatVector()
331 byte[] ciphertext = cipher.doFinal(plaintext); in testEmptyPlaintextEncryptsAndDecrypts()
344 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testEmptyPlaintextEncryptsAndDecrypts()
376 byte[] ciphertext = cipher.doFinal(plaintext); in testCiphertextGeneratedByAndroidKeyStoreDecryptsByAndroidKeyStore()
389 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testCiphertextGeneratedByAndroidKeyStoreDecryptsByAndroidKeyStore()
453 byte[] ciphertext = cipher.doFinal(plaintext); in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore()
[all …]
DBlockCipherTestBase.java357 byte[] ciphertext = doFinal(new byte[getBlockSize()]); in testGetIV()
364 doFinal(ciphertext); in testGetIV()
389 byte[] ciphertext = doFinal(plaintext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv()
392 byte[] decryptedPlaintext = mCipher.doFinal(ciphertext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv()
406 byte[] ciphertext = mCipher.doFinal(getKatPlaintext()); in testGeneratedIvSurvivesReset()
417 assertEquals(ciphertext, mCipher.doFinal(getKatPlaintext())); in testGeneratedIvSurvivesReset()
425 assertEquals(ciphertext, mCipher.doFinal(getKatPlaintext())); in testGeneratedIvSurvivesReset()
771 byte[] ciphertext = getKatCiphertext(); in testKatDecryptOneByteAtATime()
778 for (int ciphertextIndex = 0; ciphertextIndex < ciphertext.length; ciphertextIndex++) { in testKatDecryptOneByteAtATime()
779 byte[] output = update(new byte[] {ciphertext[ciphertextIndex]}); in testKatDecryptOneByteAtATime()
[all …]
DAESCipherNistCavpKatTest.java250 testVector.ciphertext = HexEncoding.decode(value); in runTestsForKatFile()
293 byte[] input = (encrypt) ? testVector.plaintext : testVector.ciphertext; in runKatTest()
295 byte[] expectedOutput = (encrypt) ? testVector.ciphertext : testVector.plaintext; in runKatTest()
322 public byte[] ciphertext; field in AESCipherNistCavpKatTest.TestVector
DAndroidKeyStoreTest.java2284 byte[] ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES()
2288 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()
2292 ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES()
2296 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()