Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 1107) sorted by relevance

12345678910>>...45

/external/rust/android-crates-io/crates/quiche/deps/boringssl/src/crypto/fipsmodule/cipher/
Dcipher.c84 if (c->cipher != NULL && c->cipher->cleanup) { in EVP_CIPHER_CTX_cleanup()
85 c->cipher->cleanup(c); in EVP_CIPHER_CTX_cleanup()
101 if (in == NULL || in->cipher == NULL) { in EVP_CIPHER_CTX_copy()
109 if (in->cipher_data && in->cipher->ctx_size) { in EVP_CIPHER_CTX_copy()
110 out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); in EVP_CIPHER_CTX_copy()
112 out->cipher = NULL; in EVP_CIPHER_CTX_copy()
116 OPENSSL_memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size); in EVP_CIPHER_CTX_copy()
119 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) { in EVP_CIPHER_CTX_copy()
120 if (!in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY, 0, out)) { in EVP_CIPHER_CTX_copy()
121 out->cipher = NULL; in EVP_CIPHER_CTX_copy()
[all …]
/external/wycheproof/java/com/google/security/wycheproof/testcases/
DAesGcmTest.java136 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in getTestVectors() local
137 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); in getTestVectors()
150 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in testVectors() local
151 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); in testVectors()
152 cipher.updateAAD(test.aad); in testVectors()
153 byte[] ct = cipher.doFinal(test.pt); in testVectors()
171 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in testLateUpdateAAD() local
172 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); in testLateUpdateAAD()
173 byte[] c0 = cipher.update(test.pt); in testLateUpdateAAD()
175 cipher.updateAAD(test.aad); in testLateUpdateAAD()
[all …]
/external/wycheproof/keystore-cts/java/com/google/security/wycheproof/testcases/
DAesGcmTest.java111 Cipher cipher = Cipher.getInstance(algorithm, in getInitializedCipherInstance() local
113 cipher.init(operationMode, getKey(isStrongBox ? testVector.alias_sb : testVector.alias), in getInitializedCipherInstance()
115 return cipher; in getInitializedCipherInstance()
267 Cipher cipher = getInitializedCipherInstance("AES/GCM/NoPadding", Cipher.ENCRYPT_MODE, in testVectors() local
269 cipher.updateAAD(test.aad); in testVectors()
270 byte[] ct = cipher.doFinal(test.pt); in testVectors()
289 Cipher cipher = getInitializedCipherInstance("AES/GCM/NoPadding", Cipher.ENCRYPT_MODE, in testEncryptWithEmptyArrays() local
291 int outputSize = cipher.getOutputSize(test.pt.length); in testEncryptWithEmptyArrays()
293 cipher.updateAAD(empty); in testEncryptWithEmptyArrays()
294 cipher.updateAAD(test.aad); in testEncryptWithEmptyArrays()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/macs/
DCBCBlockCipherMac.java20 private BlockCipher cipher; field in CBCBlockCipherMac
32 BlockCipher cipher) in CBCBlockCipherMac() argument
34 this(cipher, (cipher.getBlockSize() * 8) / 2, null); in CBCBlockCipherMac()
45 BlockCipher cipher, in CBCBlockCipherMac() argument
48 this(cipher, (cipher.getBlockSize() * 8) / 2, padding); in CBCBlockCipherMac()
65 BlockCipher cipher, in CBCBlockCipherMac() argument
68 this(cipher, macSizeInBits, null); in CBCBlockCipherMac()
86 BlockCipher cipher, in CBCBlockCipherMac() argument
95 this.cipher = CBCBlockCipher.newInstance(cipher); in CBCBlockCipherMac()
99 mac = new byte[cipher.getBlockSize()]; in CBCBlockCipherMac()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/macs/
DCBCBlockCipherMac.java22 private BlockCipher cipher; field in CBCBlockCipherMac
34 BlockCipher cipher) in CBCBlockCipherMac() argument
36 this(cipher, (cipher.getBlockSize() * 8) / 2, null); in CBCBlockCipherMac()
47 BlockCipher cipher, in CBCBlockCipherMac() argument
50 this(cipher, (cipher.getBlockSize() * 8) / 2, padding); in CBCBlockCipherMac()
67 BlockCipher cipher, in CBCBlockCipherMac() argument
70 this(cipher, macSizeInBits, null); in CBCBlockCipherMac()
88 BlockCipher cipher, in CBCBlockCipherMac() argument
97 this.cipher = CBCBlockCipher.newInstance(cipher); in CBCBlockCipherMac()
101 mac = new byte[cipher.getBlockSize()]; in CBCBlockCipherMac()
[all …]
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/crypto/macs/
DCBCBlockCipherMac.java22 private BlockCipher cipher; field in CBCBlockCipherMac
34 BlockCipher cipher) in CBCBlockCipherMac() argument
36 this(cipher, (cipher.getBlockSize() * 8) / 2, null); in CBCBlockCipherMac()
47 BlockCipher cipher, in CBCBlockCipherMac() argument
50 this(cipher, (cipher.getBlockSize() * 8) / 2, padding); in CBCBlockCipherMac()
67 BlockCipher cipher, in CBCBlockCipherMac() argument
70 this(cipher, macSizeInBits, null); in CBCBlockCipherMac()
88 BlockCipher cipher, in CBCBlockCipherMac() argument
97 this.cipher = CBCBlockCipher.newInstance(cipher); in CBCBlockCipherMac()
101 mac = new byte[cipher.getBlockSize()]; in CBCBlockCipherMac()
[all …]
/external/boringssl/src/crypto/fipsmodule/cipher/
Dcipher.cc.inc10 #include <openssl/cipher.h>
39 if (c->cipher != NULL && c->cipher->cleanup) {
40 c->cipher->cleanup(c);
56 if (in == NULL || in->cipher == NULL) {
69 if (in->cipher_data && in->cipher->ctx_size) {
70 out->cipher_data = OPENSSL_memdup(in->cipher_data, in->cipher->ctx_size);
72 out->cipher = NULL;
77 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) {
78 if (!in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY, 0, out)) {
79 out->cipher = NULL;
[all …]
/external/cronet/tot/third_party/boringssl/src/ssl/
Dssl_cipher.cc472 for (const auto &cipher : kCiphers) { in NumTLS13Ciphers() local
473 if (cipher.algorithm_mkey == SSL_kGENERIC) { in NumTLS13Ciphers()
487 const SSL_CIPHER *cipher; member
578 size_t *out_fixed_iv_len, const SSL_CIPHER *cipher, in ssl_cipher_get_evp_aead() argument
584 if (cipher->algorithm_mac == SSL_AEAD) { in ssl_cipher_get_evp_aead()
585 if (cipher->algorithm_enc == SSL_AES128GCM) { in ssl_cipher_get_evp_aead()
592 } else if (cipher->algorithm_enc == SSL_AES256GCM) { in ssl_cipher_get_evp_aead()
599 } else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) { in ssl_cipher_get_evp_aead()
611 } else if (cipher->algorithm_mac == SSL_SHA1) { in ssl_cipher_get_evp_aead()
612 if (cipher->algorithm_enc == SSL_3DES) { in ssl_cipher_get_evp_aead()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/
DBaseBlockCipher.java121 private GenericBlockCipher cipher; field in BaseBlockCipher
143 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
160 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
169 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher()
184 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
195 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
206 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
224 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
242 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
275 return cipher.getOutputSize(inputLen); in engineGetOutputSize()
[all …]
/external/cronet/stable/third_party/boringssl/src/ssl/
Dssl_cipher.cc472 for (const auto &cipher : kCiphers) { in NumTLS13Ciphers() local
473 if (cipher.algorithm_mkey == SSL_kGENERIC) { in NumTLS13Ciphers()
487 const SSL_CIPHER *cipher; member
578 size_t *out_fixed_iv_len, const SSL_CIPHER *cipher, in ssl_cipher_get_evp_aead() argument
584 if (cipher->algorithm_mac == SSL_AEAD) { in ssl_cipher_get_evp_aead()
585 if (cipher->algorithm_enc == SSL_AES128GCM) { in ssl_cipher_get_evp_aead()
592 } else if (cipher->algorithm_enc == SSL_AES256GCM) { in ssl_cipher_get_evp_aead()
599 } else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) { in ssl_cipher_get_evp_aead()
611 } else if (cipher->algorithm_mac == SSL_SHA1) { in ssl_cipher_get_evp_aead()
612 if (cipher->algorithm_enc == SSL_3DES) { in ssl_cipher_get_evp_aead()
[all …]
/external/boringssl/src/ssl/
Dssl_cipher.cc341 for (const auto &cipher : kCiphers) { in NumTLS13Ciphers() local
342 if (cipher.algorithm_mkey == SSL_kGENERIC) { in NumTLS13Ciphers()
356 const SSL_CIPHER *cipher; member
447 size_t *out_fixed_iv_len, const SSL_CIPHER *cipher, in ssl_cipher_get_evp_aead() argument
453 if (cipher->algorithm_mac == SSL_AEAD) { in ssl_cipher_get_evp_aead()
454 if (cipher->algorithm_enc == SSL_AES128GCM) { in ssl_cipher_get_evp_aead()
461 } else if (cipher->algorithm_enc == SSL_AES256GCM) { in ssl_cipher_get_evp_aead()
468 } else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) { in ssl_cipher_get_evp_aead()
480 } else if (cipher->algorithm_mac == SSL_SHA1) { in ssl_cipher_get_evp_aead()
481 if (cipher->algorithm_enc == SSL_3DES) { in ssl_cipher_get_evp_aead()
[all …]
/external/conscrypt/common/src/test/java/org/conscrypt/javax/crypto/
DCipherBasicsTest.java124 Cipher cipher, byte[] input, int expectedOutputLength, CallPattern callPattern) in callCipher() argument
128 return cipher.doFinal(input); in callCipher()
134 return cipher.doFinal(inputCopy, inputOffset, input.length); in callCipher()
137 byte[] output1 = cipher.update(input); in callCipher()
138 byte[] output2 = cipher.doFinal(); in callCipher()
144 byte[] output1 = cipher.update(input, /*inputOffset= */ 0, input1Length); in callCipher()
146 byte[] output2 = cipher.update(input, input2Offset, input2Length); in callCipher()
147 byte[] output3 = cipher.update(new byte[0]); in callCipher()
148 byte[] output4 = cipher.doFinal(); in callCipher()
152 byte[] output1 = cipher.update(input); in callCipher()
[all …]
/external/conscrypt/repackaged/common/src/test/java/com/android/org/conscrypt/javax/crypto/
DCipherBasicsTest.java128 private byte[] callCipher(Cipher cipher, byte[] input, int expectedOutputLength, in callCipher() argument
132 return cipher.doFinal(input); in callCipher()
138 return cipher.doFinal(inputCopy, inputOffset, input.length); in callCipher()
141 byte[] output1 = cipher.update(input); in callCipher()
142 byte[] output2 = cipher.doFinal(); in callCipher()
148 byte[] output1 = cipher.update(input, /*inputOffset= */ 0, input1Length); in callCipher()
150 byte[] output2 = cipher.update(input, input2Offset, input2Length); in callCipher()
151 byte[] output3 = cipher.update(new byte[0]); in callCipher()
152 byte[] output4 = cipher.doFinal(); in callCipher()
156 byte[] output1 = cipher.update(input); in callCipher()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/symmetric/util/
DBaseBlockCipher.java125 private GenericBlockCipher cipher; field in BaseBlockCipher
147 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
164 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
173 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher()
188 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
199 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
210 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
228 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
246 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
279 return cipher.getOutputSize(inputLen); in engineGetOutputSize()
[all …]
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/jcajce/provider/symmetric/util/
DBaseBlockCipher.java125 private GenericBlockCipher cipher; field in BaseBlockCipher
147 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
164 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
173 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher()
188 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
199 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
210 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
228 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
246 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
279 return cipher.getOutputSize(inputLen); in engineGetOutputSize()
[all …]
/external/rust/android-crates-io/crates/quiche/deps/boringssl/src/ssl/
Dssl_cipher.cc476 const SSL_CIPHER *cipher; member
561 size_t *out_fixed_iv_len, const SSL_CIPHER *cipher, in ssl_cipher_get_evp_aead() argument
570 if (cipher->algorithm_mac == SSL_AEAD) { in ssl_cipher_get_evp_aead()
571 if (cipher->algorithm_enc == SSL_AES128GCM) { in ssl_cipher_get_evp_aead()
580 } else if (cipher->algorithm_enc == SSL_AES256GCM) { in ssl_cipher_get_evp_aead()
589 } else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) { in ssl_cipher_get_evp_aead()
601 } else if (cipher->algorithm_mac == SSL_SHA1) { in ssl_cipher_get_evp_aead()
602 if (cipher->algorithm_enc == SSL_eNULL) { in ssl_cipher_get_evp_aead()
604 } else if (cipher->algorithm_enc == SSL_3DES) { in ssl_cipher_get_evp_aead()
611 } else if (cipher->algorithm_enc == SSL_AES128) { in ssl_cipher_get_evp_aead()
[all …]
/external/cronet/stable/third_party/boringssl/src/util/fipstools/acvp/acvptool/test/vectors/
DACVP-AES-KW.bz2 ... encrypt", 16 "keyLen": 128, 17 "kwCipher": "cipher", 18 "payloadLen": 192, 19 "testType": "AFT ...
/external/cronet/tot/third_party/boringssl/src/util/fipstools/acvp/acvptool/test/vectors/
DACVP-AES-KW.bz2 ... encrypt", 16 "keyLen": 128, 17 "kwCipher": "cipher", 18 "payloadLen": 192, 19 "testType": "AFT ...
/external/libwebsockets/lib/tls/openssl/
Dlws-genaes.c62 ctx->cipher = EVP_aes_128_wrap(); in lws_genaes_create()
70 ctx->cipher = EVP_aes_128_cbc(); in lws_genaes_create()
74 ctx->cipher = EVP_aes_128_cfb128(); in lws_genaes_create()
79 ctx->cipher = EVP_aes_128_cfb8(); in lws_genaes_create()
84 ctx->cipher = EVP_aes_128_ctr(); in lws_genaes_create()
89 ctx->cipher = EVP_aes_128_ecb(); in lws_genaes_create()
94 ctx->cipher = EVP_aes_128_ofb(); in lws_genaes_create()
104 ctx->cipher = EVP_aes_128_gcm(); in lws_genaes_create()
117 ctx->cipher = EVP_aes_192_wrap(); in lws_genaes_create()
125 ctx->cipher = EVP_aes_192_cbc(); in lws_genaes_create()
[all …]
/external/boringssl/src/util/fipstools/acvp/acvptool/test/vectors/
DACVP-AES-KW.bz2 ... encrypt", 16 "keyLen": 128, 17 "kwCipher": "cipher", 18 "payloadLen": 192, 19 "testType": "AFT ...
/external/cronet/tot/third_party/boringssl/src/crypto/fipsmodule/cipher/
Dcipher.cc.inc57 #include <openssl/cipher.h>
86 if (c->cipher != NULL && c->cipher->cleanup) {
87 c->cipher->cleanup(c);
103 if (in == NULL || in->cipher == NULL) {
116 if (in->cipher_data && in->cipher->ctx_size) {
117 out->cipher_data = OPENSSL_memdup(in->cipher_data, in->cipher->ctx_size);
119 out->cipher = NULL;
124 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) {
125 if (!in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY, 0, out)) {
126 out->cipher = NULL;
[all …]
/external/cronet/stable/third_party/boringssl/src/crypto/fipsmodule/cipher/
Dcipher.cc.inc57 #include <openssl/cipher.h>
86 if (c->cipher != NULL && c->cipher->cleanup) {
87 c->cipher->cleanup(c);
103 if (in == NULL || in->cipher == NULL) {
116 if (in->cipher_data && in->cipher->ctx_size) {
117 out->cipher_data = OPENSSL_memdup(in->cipher_data, in->cipher->ctx_size);
119 out->cipher = NULL;
124 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) {
125 if (!in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY, 0, out)) {
126 out->cipher = NULL;
[all …]
/external/cronet/tot/third_party/boringssl/src/rust/bssl-crypto/src/cipher/
Daes_ctr.rs16 use crate::cipher::{
67 let mut cipher = Aes128Ctr::new(&key, &iv); in aes_128_ctr_test_encrypt() localVariable
71 cipher in aes_128_ctr_test_encrypt()
79 cipher in aes_128_ctr_test_encrypt()
86 cipher in aes_128_ctr_test_encrypt()
93 cipher in aes_128_ctr_test_encrypt()
105 let mut cipher = Aes128Ctr::new(&key, &iv); in aes_128_ctr_test_decrypt() localVariable
109 cipher in aes_128_ctr_test_decrypt()
116 cipher in aes_128_ctr_test_decrypt()
123 cipher in aes_128_ctr_test_decrypt()
[all …]
/external/cronet/stable/third_party/boringssl/src/rust/bssl-crypto/src/cipher/
Daes_ctr.rs16 use crate::cipher::{
67 let mut cipher = Aes128Ctr::new(&key, &iv); in aes_128_ctr_test_encrypt() localVariable
71 cipher in aes_128_ctr_test_encrypt()
79 cipher in aes_128_ctr_test_encrypt()
86 cipher in aes_128_ctr_test_encrypt()
93 cipher in aes_128_ctr_test_encrypt()
105 let mut cipher = Aes128Ctr::new(&key, &iv); in aes_128_ctr_test_decrypt() localVariable
109 cipher in aes_128_ctr_test_decrypt()
116 cipher in aes_128_ctr_test_decrypt()
123 cipher in aes_128_ctr_test_decrypt()
[all …]
/external/boringssl/src/rust/bssl-crypto/src/cipher/
Daes_ctr.rs16 use crate::cipher::{
67 let mut cipher = Aes128Ctr::new(&key, &iv); in aes_128_ctr_test_encrypt() localVariable
71 cipher in aes_128_ctr_test_encrypt()
79 cipher in aes_128_ctr_test_encrypt()
86 cipher in aes_128_ctr_test_encrypt()
93 cipher in aes_128_ctr_test_encrypt()
105 let mut cipher = Aes128Ctr::new(&key, &iv); in aes_128_ctr_test_decrypt() localVariable
109 cipher in aes_128_ctr_test_decrypt()
116 cipher in aes_128_ctr_test_decrypt()
123 cipher in aes_128_ctr_test_decrypt()
[all …]

12345678910>>...45