/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/crypto/ |
D | IkeMac.java | 73 public byte[] signBytes(byte[] keyBytes, byte[] dataToSign) { in signBytes() argument 80 .signBytes(keyBytes, dataToSign, true /*needTruncation*/); in signBytes() 82 keyBytes = modifyKeyIfNeeded(keyBytes); in signBytes() 84 .signBytes(keyBytes, dataToSign, false /*needTruncation*/); in signBytes() 89 SecretKeySpec secretKey = new SecretKeySpec(keyBytes, getAlgorithmName()); in signBytes() 101 private byte[] modifyKeyIfNeeded(byte[] keyBytes) { in modifyKeyIfNeeded() argument 114 if (keyBytes.length < 16) { in modifyKeyIfNeeded() 115 keyBytes = Arrays.copyOf(keyBytes, 16); in modifyKeyIfNeeded() 116 } else if (keyBytes.length > 16) { in modifyKeyIfNeeded() 117 keyBytes = in modifyKeyIfNeeded() [all …]
|
D | IkeNormalModeCipher.java | 45 private byte[] doCipherAction(byte[] data, byte[] keyBytes, byte[] ivBytes, int opmode) in doCipherAction() argument 47 if (getKeyLength() != keyBytes.length) { in doCipherAction() 52 + keyBytes.length); in doCipherAction() 55 SecretKeySpec key = new SecretKeySpec(keyBytes, getAlgorithmName()); in doCipherAction() 84 public byte[] encrypt(byte[] paddedData, byte[] keyBytes, byte[] ivBytes) { in encrypt() argument 86 return doCipherAction(paddedData, keyBytes, ivBytes, Cipher.ENCRYPT_MODE); in encrypt() 102 public byte[] decrypt(byte[] encryptedData, byte[] keyBytes, byte[] ivBytes) in decrypt() argument 104 return doCipherAction(encryptedData, keyBytes, ivBytes, Cipher.DECRYPT_MODE); in decrypt()
|
D | IkeCombinedModeCipher.java | 77 byte[] data, byte[] additionalAuthData, byte[] keyBytes, byte[] ivBytes, int opmode) in doCipherAction() argument 82 ByteBuffer secretKeyAndSaltBuffer = ByteBuffer.wrap(keyBytes); in doCipherAction() 83 byte[] secretKeyBytes = new byte[keyBytes.length - mSaltLen]; in doCipherAction() 145 byte[] paddedData, byte[] additionalAuthData, byte[] keyBytes, byte[] ivBytes) { in encrypt() argument 148 paddedData, additionalAuthData, keyBytes, ivBytes, Cipher.ENCRYPT_MODE); in encrypt() 167 byte[] keyBytes, in decrypt() argument 175 keyBytes, in decrypt()
|
D | AesXCbcImpl.java | 62 public byte[] signBytes(byte[] keyBytes, byte[] dataToSign, boolean needTruncation) { in signBytes() argument 76 byte[] key1 = encryptAesBlock(keyBytes, HexDump.hexStringToByteArray(KEY1_SEED_HEX_STRING)); in signBytes() 77 byte[] key2 = encryptAesBlock(keyBytes, HexDump.hexStringToByteArray(KEY2_SEED_HEX_STRING)); in signBytes() 78 byte[] key3 = encryptAesBlock(keyBytes, HexDump.hexStringToByteArray(KEY3_SEED_HEX_STRING)); in signBytes() 144 private byte[] encryptAesBlock(byte[] keyBytes, byte[] dataToEncrypt) { in encryptAesBlock() argument 152 Cipher.ENCRYPT_MODE, new SecretKeySpec(keyBytes, mCipher.getAlgorithm()), iv); in encryptAesBlock()
|
D | IkeMacIntegrity.java | 122 public byte[] generateChecksum(byte[] keyBytes, byte[] dataToAuthenticate) { in generateChecksum() argument 123 if (getKeyLength() != keyBytes.length) { in generateChecksum() 128 + keyBytes.length); in generateChecksum() 131 byte[] signedBytes = signBytes(keyBytes, dataToAuthenticate); in generateChecksum()
|
D | IkeMacPrf.java | 154 public byte[] generateKeyMat(byte[] keyBytes, byte[] dataToSign, int keyMaterialLen) { in generateKeyMat() argument 155 return KeyGenerationUtils.prfPlus(this, keyBytes, dataToSign, keyMaterialLen); in generateKeyMat()
|
/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/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
|