/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/crypto/ |
D | IkeMacPrf.java | 105 public byte[] signBytes(byte[] keyBytes, byte[] dataToSign) { in signBytes() argument 108 keyBytes = modifyAesXCbcKeyIfNeeded(keyBytes); in signBytes() 109 return new AesXCbcImpl().mac(keyBytes, dataToSign, false /*needTruncation*/); in signBytes() 114 keyBytes = modifyAesCmacKeyIfNeeded(keyBytes); in signBytes() 117 return super.signBytes(keyBytes, dataToSign); in signBytes() 120 private byte[] modifyAesXCbcKeyIfNeeded(byte[] keyBytes) throws GeneralSecurityException { in modifyAesXCbcKeyIfNeeded() argument 133 if (keyBytes.length < 16) { in modifyAesXCbcKeyIfNeeded() 134 keyBytes = Arrays.copyOf(keyBytes, 16); in modifyAesXCbcKeyIfNeeded() 135 } else if (keyBytes.length > 16) { in modifyAesXCbcKeyIfNeeded() 136 keyBytes = new AesXCbcImpl().mac(new byte[16], keyBytes, false /*needTruncation*/); in modifyAesXCbcKeyIfNeeded() [all …]
|
D | IkeNormalModeCipher.java | 62 private byte[] doCipherAction(byte[] data, byte[] keyBytes, byte[] ivBytes, int opmode) in doCipherAction() argument 64 if (getKeyLength() != keyBytes.length) { in doCipherAction() 69 + keyBytes.length); in doCipherAction() 72 byte[] secretKeyBytes = Arrays.copyOfRange(keyBytes, 0, keyBytes.length - mSaltLen); in doCipherAction() 73 byte[] salt = Arrays.copyOfRange(keyBytes, secretKeyBytes.length, keyBytes.length); in doCipherAction() 109 public byte[] encrypt(byte[] paddedData, byte[] keyBytes, byte[] ivBytes) { in encrypt() argument 111 return doCipherAction(paddedData, keyBytes, ivBytes, Cipher.ENCRYPT_MODE); in encrypt() 127 public byte[] decrypt(byte[] encryptedData, byte[] keyBytes, byte[] ivBytes) in decrypt() argument 129 return doCipherAction(encryptedData, keyBytes, ivBytes, Cipher.DECRYPT_MODE); in decrypt()
|
D | IkeMacIntegrity.java | 133 public byte[] signBytes(byte[] keyBytes, byte[] dataToSign) { in signBytes() argument 136 return new AesXCbcImpl().mac(keyBytes, dataToSign, true /*needTruncation*/); in signBytes() 141 return super.signBytes(keyBytes, dataToSign); in signBytes() 163 public byte[] generateChecksum(byte[] keyBytes, byte[] dataToAuthenticate) { in generateChecksum() argument 164 if (getKeyLength() != keyBytes.length) { in generateChecksum() 169 + keyBytes.length); in generateChecksum() 172 byte[] signedBytes = signBytes(keyBytes, dataToAuthenticate); in generateChecksum()
|
D | IkeCombinedModeCipher.java | 87 byte[] data, byte[] additionalAuthData, byte[] keyBytes, byte[] ivBytes, int opmode) in doCipherAction() argument 92 ByteBuffer secretKeyAndSaltBuffer = ByteBuffer.wrap(keyBytes); in doCipherAction() 93 byte[] secretKeyBytes = new byte[keyBytes.length - mSaltLen]; in doCipherAction() 157 byte[] paddedData, byte[] additionalAuthData, byte[] keyBytes, byte[] ivBytes) { in encrypt() argument 160 paddedData, additionalAuthData, keyBytes, ivBytes, Cipher.ENCRYPT_MODE); in encrypt() 179 byte[] keyBytes, in decrypt() argument 187 keyBytes, in decrypt()
|
D | AesXCbcImpl.java | 57 public byte[] mac(byte[] keyBytes, byte[] dataToSign, boolean needTruncation) { in mac() argument 71 byte[] key1 = encryptAesBlock(keyBytes, HexDump.hexStringToByteArray(KEY1_SEED_HEX_STRING)); in mac() 72 byte[] key2 = encryptAesBlock(keyBytes, HexDump.hexStringToByteArray(KEY2_SEED_HEX_STRING)); in mac() 73 byte[] key3 = encryptAesBlock(keyBytes, HexDump.hexStringToByteArray(KEY3_SEED_HEX_STRING)); in mac() 139 private byte[] encryptAesBlock(byte[] keyBytes, byte[] dataToEncrypt) { in encryptAesBlock() argument 147 Cipher.ENCRYPT_MODE, new SecretKeySpec(keyBytes, mCipher.getAlgorithm()), iv); in encryptAesBlock()
|
D | IkeMac.java | 66 public byte[] signBytes(byte[] keyBytes, byte[] dataToSign) { in signBytes() argument 69 SecretKeySpec secretKey = new SecretKeySpec(keyBytes, getAlgorithmName()); in signBytes()
|
/packages/modules/IPsec/src/java/com/android/internal/net/crypto/ |
D | KeyGenerationUtils.java | 42 ByteSigner byteSigner, byte[] keyBytes, byte[] dataToSign, int keyMaterialLen) { in prfPlus() argument 54 previousMac = byteSigner.signBytes(keyBytes, dataToSignBuffer.array()); in prfPlus() 79 byte[] signBytes(byte[] keyBytes, byte[] dataToSign); in signBytes() argument
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/utils/ |
D | IkeCertUtilsTest.java | 80 byte[] keyBytes = HexDump.hexStringToByteArray(PRIVATE_KEY_HEX); in testCreatePrivateKeyFromByteArray() 81 PrivateKey key = IkeCertUtils.privateKeyFromByteArray(keyBytes); in testCreatePrivateKeyFromByteArray() 83 assertArrayEquals(keyBytes, key.getEncoded()); in testCreatePrivateKeyFromByteArray()
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/crypto/ |
D | IkeMacIntegrityTest.java | 211 byte[] keyBytes = TestUtils.hexStringToByteArray(AUTH_AES128XCBC_KEY_HEX_STRING); in testBuildIpSecAlgorithmFromAuthAes128XCbcMac() 214 IpSecAlgorithm algo = mAes128XCbcIntgerityMac.buildIpSecAlgorithmWithKey(keyBytes); in testBuildIpSecAlgorithmFromAuthAes128XCbcMac() 216 assertArrayEquals(keyBytes, algo.getKey()); in testBuildIpSecAlgorithmFromAuthAes128XCbcMac() 219 mAes128XCbcIntgerityMac.buildIpSecAlgorithmWithKey(keyBytes); in testBuildIpSecAlgorithmFromAuthAes128XCbcMac()
|
/packages/modules/IPsec/src/java/com/android/internal/net/eap/crypto/ |
D | HmacSha256ByteSigner.java | 47 public byte[] signBytes(byte[] keyBytes, byte[] dataToSign) { in signBytes() argument 50 mac.init(new SecretKeySpec(keyBytes, MAC_ALGORITHM_STRING)); in signBytes()
|
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/ |
D | TestCertActivity.java | 145 byte[] keyBytes = Base64.decode(key.getBytes(), Base64.DEFAULT); in savePublicKey() 160 mnc, type, identifier, keyBytes, new Date()); in savePublicKey()
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/testmode/ |
D | DeterministicSecureRandom.java | 74 public byte[] signBytes(byte[] keyBytes, byte[] dataToSign) { in signBytes() argument
|
/packages/modules/RuntimeI18n/apex/hiddenapi/ |
D | hiddenapi-max-target-o-low-priority.txt | 325 Landroid/icu/impl/ICUResourceBundleReader;->keyBytes:[B
|