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.java108 private final byte[] ciphertext; field in CipherTest.KatVector
120 private KatVector(byte[] plaintext, byte[] ciphertext) { in KatVector() argument
121 this(plaintext, null, ciphertext); in KatVector()
124 private KatVector(byte[] plaintext, AlgorithmParameterSpec params, byte[] ciphertext) { in KatVector() argument
126 this.ciphertext = ciphertext; in KatVector()
415 byte[] ciphertext = cipher.doFinal(plaintext); in testEmptyPlaintextEncryptsAndDecrypts()
428 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testEmptyPlaintextEncryptsAndDecrypts()
466 byte[] ciphertext = cipher.doFinal(plaintext); in testEncryptsAndDecryptsInterrupted()
479 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testEncryptsAndDecryptsInterrupted()
492 private boolean isDecryptValid(byte[] expectedPlaintext, byte[] ciphertext, Cipher cipher, in isDecryptValid() argument
[all …]
DBlockCipherTestBase.java362 byte[] ciphertext = doFinal(new byte[getBlockSize()]); in testGetIV()
369 doFinal(ciphertext); in testGetIV()
394 byte[] ciphertext = doFinal(plaintext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv()
397 byte[] decryptedPlaintext = mCipher.doFinal(ciphertext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv()
411 byte[] ciphertext = mCipher.doFinal(getKatPlaintext()); in testGeneratedIvSurvivesReset()
422 assertEquals(ciphertext, mCipher.doFinal(getKatPlaintext())); in testGeneratedIvSurvivesReset()
430 assertEquals(ciphertext, mCipher.doFinal(getKatPlaintext())); in testGeneratedIvSurvivesReset()
776 byte[] ciphertext = getKatCiphertext(); in testKatDecryptOneByteAtATime()
783 for (int ciphertextIndex = 0; ciphertextIndex < ciphertext.length; ciphertextIndex++) { in testKatDecryptOneByteAtATime()
784 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.java2271 byte[] ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES()
2275 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()
2279 ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES()
2283 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()