Home
last modified time | relevance | path

Searched refs:encType (Results 1 – 3 of 3) sorted by relevance

/external/ukey2/src/main/java/com/google/security/cryptauth/lib/securemessage/
DSecureMessageParser.java131 EncType encType) in parseSignCryptedMessage() argument
133 return parseSignCryptedMessage(secmsg, verificationKey, sigType, decryptionKey, encType, null); in parseSignCryptedMessage()
150 EncType encType, in parseSignCryptedMessage() argument
157 || (encType == null)) { in parseSignCryptedMessage()
160 if (encType == EncType.NONE) { in parseSignCryptedMessage()
171 encType, in parseSignCryptedMessage()
182 decryptionKey, encType, header.getIv().toByteArray(), in parseSignCryptedMessage()
231 EncType encType, in verifyHeaderAndBody() argument
252 verified &= (result.getHeader().getEncryptionScheme() == encType.getEncScheme()); in verifyHeaderAndBody()
254 verified &= (encType != EncType.NONE) || !result.getHeader().hasDecryptionKeyId(); in verifyHeaderAndBody()
[all …]
DSecureMessageBuilder.java176 Key signingKey, SigType sigType, Key encryptionKey, EncType encType, byte[] body) in buildSignCryptedMessage() argument
181 || (encType == null) in buildSignCryptedMessage()
185 if (encType == EncType.NONE) { in buildSignCryptedMessage()
186 throw new IllegalArgumentException(encType + " not supported for encrypted messages"); in buildSignCryptedMessage()
193 byte[] iv = CryptoOps.generateIv(encType, rng); in buildSignCryptedMessage()
194 byte[] header = buildHeader(sigType, encType, iv).toByteArray(); in buildSignCryptedMessage()
213 byte[] encryptedBody = CryptoOps.encrypt(encryptionKey, encType, rng, iv, taggedBody); in buildSignCryptedMessage()
232 private Header buildHeader(SigType sigType, EncType encType, byte[] iv) { in buildHeader() argument
235 .setEncryptionScheme(encType.getEncScheme()); in buildHeader()
DCryptoOps.java219 static byte[] generateIv(EncType encType, SecureRandom rng) throws NoSuchAlgorithmException { in generateIv() argument
224 Cipher encrypter = Cipher.getInstance(encType.getJcaName()); in generateIv()
245 Key encryptionKey, EncType encType, @Nullable SecureRandom rng, byte[] iv, byte[] plaintext) in encrypt() argument
250 if (encType == EncType.NONE) { in encrypt()
254 Cipher encrypter = Cipher.getInstance(encType.getJcaName()); in encrypt()
256 deriveAes256KeyFor(getSecretKey(encryptionKey), getPurpose(encType)); in encrypt()
284 static byte[] decrypt(Key decryptionKey, EncType encType, byte[] iv, byte[] ciphertext) in decrypt() argument
290 if (encType == EncType.NONE) { in decrypt()
294 Cipher decrypter = Cipher.getInstance(encType.getJcaName()); in decrypt()
296 deriveAes256KeyFor(getSecretKey(decryptionKey), getPurpose(encType)); in decrypt()
[all …]