Home
last modified time | relevance | path

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

12345678910>>...15

/external/boringssl/src/crypto/fipsmodule/cipher/
Dcipher.c83 if (c->cipher != NULL && c->cipher->cleanup) { in EVP_CIPHER_CTX_cleanup()
84 c->cipher->cleanup(c); in EVP_CIPHER_CTX_cleanup()
100 if (in == NULL || in->cipher == NULL) { in EVP_CIPHER_CTX_copy()
108 if (in->cipher_data && in->cipher->ctx_size) { in EVP_CIPHER_CTX_copy()
109 out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); in EVP_CIPHER_CTX_copy()
111 out->cipher = NULL; in EVP_CIPHER_CTX_copy()
115 OPENSSL_memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size); in EVP_CIPHER_CTX_copy()
118 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) { in EVP_CIPHER_CTX_copy()
119 if (!in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY, 0, out)) { in EVP_CIPHER_CTX_copy()
120 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 …]
DCipherOutputStreamTest.java72 Cipher cipher = Cipher.getInstance(algorithm); in TestVector() local
73 cipher.init(Cipher.ENCRYPT_MODE, this.key, this.params); in TestVector()
74 cipher.updateAAD(aad); in TestVector()
75 this.ct = cipher.doFinal(pt); in TestVector()
105 Cipher cipher = Cipher.getInstance(t.algorithm); in testEncrypt() local
106 cipher.init(Cipher.ENCRYPT_MODE, t.key, t.params); in testEncrypt()
107 cipher.updateAAD(t.aad); in testEncrypt()
109 CipherOutputStream cos = new CipherOutputStream(os, cipher); in testEncrypt()
119 Cipher cipher = Cipher.getInstance(t.algorithm); in testDecrypt() local
120 cipher.init(Cipher.DECRYPT_MODE, t.key, t.params); in testDecrypt()
[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 = new CBCBlockCipher(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 = new CBCBlockCipher(cipher); in CBCBlockCipherMac()
101 mac = new byte[cipher.getBlockSize()]; in CBCBlockCipherMac()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/symmetric/util/
DBaseBlockCipher.java114 private GenericBlockCipher cipher; field in BaseBlockCipher
136 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
153 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
162 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher()
170 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
181 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
199 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
217 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
246 return cipher.getOutputSize(inputLen); in engineGetOutputSize()
279 String name = cipher.getUnderlyingCipher().getAlgorithmName(); in engineGetParameters()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/
DBaseBlockCipher.java110 private GenericBlockCipher cipher; field in BaseBlockCipher
132 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
149 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
158 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher()
166 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
177 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher()
195 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
213 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher()
242 return cipher.getOutputSize(inputLen); in engineGetOutputSize()
275 String name = cipher.getUnderlyingCipher().getAlgorithmName(); in engineGetParameters()
[all …]
/external/boringssl/src/ssl/
Dssl_cipher.cc477 const SSL_CIPHER *cipher; member
562 size_t *out_fixed_iv_len, const SSL_CIPHER *cipher, in ssl_cipher_get_evp_aead() argument
571 if (cipher->algorithm_mac == SSL_AEAD) { in ssl_cipher_get_evp_aead()
572 if (cipher->algorithm_enc == SSL_AES128GCM) { in ssl_cipher_get_evp_aead()
581 } else if (cipher->algorithm_enc == SSL_AES256GCM) { in ssl_cipher_get_evp_aead()
590 } else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) { in ssl_cipher_get_evp_aead()
602 } else if (cipher->algorithm_mac == SSL_SHA1) { in ssl_cipher_get_evp_aead()
603 if (cipher->algorithm_enc == SSL_eNULL) { in ssl_cipher_get_evp_aead()
605 } else if (cipher->algorithm_enc == SSL_3DES) { in ssl_cipher_get_evp_aead()
612 } else if (cipher->algorithm_enc == SSL_AES128) { in ssl_cipher_get_evp_aead()
[all …]
/external/ppp/pppd/
Dpppcrypt.c148 DesEncrypt(clear, cipher) in DesEncrypt() argument
150 u_char *cipher; /* OUT 8 octets */
159 Collapse(des_input, cipher);
164 DesDecrypt(cipher, clear) in DesDecrypt() argument
165 u_char *cipher; /* IN 8 octets */ in DesDecrypt()
170 Expand(cipher, des_input);
193 DesEncrypt(clear, cipher) in DesEncrypt() argument
195 u_char *cipher; /* OUT 8 octets */
197 DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
203 DesDecrypt(cipher, clear) in DesDecrypt() argument
[all …]
/external/openssh/
Dcipher.c66 const struct sshcipher *cipher; member
230 return cc->cipher->number; in cipher_ctx_get_number()
316 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message()
318 if (cc->cipher->number == SSH_CIPHER_DES) in cipher_warning_message()
325 cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, in cipher_init() argument
341 if (cipher->number == SSH_CIPHER_DES) { in cipher_init()
346 cc->plaintext = (cipher->number == SSH_CIPHER_NONE); in cipher_init()
349 if (keylen < cipher->key_len || in cipher_init()
350 (iv != NULL && ivlen < cipher_ivlen(cipher))) { in cipher_init()
355 cc->cipher = cipher; in cipher_init()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/
DBufferedBlockCipher.java18 protected BlockCipher cipher; field in BufferedBlockCipher
36 BlockCipher cipher) in BufferedBlockCipher() argument
38 this.cipher = cipher; in BufferedBlockCipher()
40 buf = new byte[cipher.getBlockSize()]; in BufferedBlockCipher()
46 String name = cipher.getAlgorithmName(); in BufferedBlockCipher()
51 if (pgpCFB || cipher instanceof StreamCipher) in BufferedBlockCipher()
68 return cipher; in getUnderlyingCipher()
89 cipher.init(forEncryption, params); in init()
99 return cipher.getBlockSize(); in getBlockSize()
120 leftOver = total % buf.length - (cipher.getBlockSize() + 2); in getUpdateOutputSize()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/
DBufferedBlockCipher.java20 protected BlockCipher cipher; field in BufferedBlockCipher
38 BlockCipher cipher) in BufferedBlockCipher() argument
40 this.cipher = cipher; in BufferedBlockCipher()
42 buf = new byte[cipher.getBlockSize()]; in BufferedBlockCipher()
48 String name = cipher.getAlgorithmName(); in BufferedBlockCipher()
53 if (pgpCFB || cipher instanceof StreamCipher) in BufferedBlockCipher()
70 return cipher; in getUnderlyingCipher()
91 cipher.init(forEncryption, params); in init()
101 return cipher.getBlockSize(); in getBlockSize()
122 leftOver = total % buf.length - (cipher.getBlockSize() + 2); in getUpdateOutputSize()
[all …]
/external/ipsec-tools/src/racoon/missing/crypto/rijndael/
Drijndael-api-fst.c79 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) { in rijndael_cipherInit() argument
81 cipher->mode = mode; in rijndael_cipherInit()
86 bcopy(IV, cipher->IV, MAX_IV_SIZE); in rijndael_cipherInit()
88 bzero(cipher->IV, MAX_IV_SIZE); in rijndael_cipherInit()
93 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, in rijndael_blockEncrypt() argument
98 if (cipher == NULL || in rijndael_blockEncrypt()
109 switch (cipher->mode) { in rijndael_blockEncrypt()
120 bcopy(cipher->IV, block, 16); in rijndael_blockEncrypt()
127 ((word32*)block)[0] = ((word32*)cipher->IV)[0] ^ ((word32*)input)[0]; in rijndael_blockEncrypt()
128 ((word32*)block)[1] = ((word32*)cipher->IV)[1] ^ ((word32*)input)[1]; in rijndael_blockEncrypt()
[all …]
/external/fonttools/Lib/fontTools/misc/
Deexec.py8 def _decryptChar(cipher, R): argument
9 cipher = byteord(cipher)
10 plain = ( (cipher ^ (R>>8)) ) & 0xFF
11 R = ( (cipher + R) * 52845 + 22719 ) & 0xFFFF
16 cipher = ( (plain ^ (R>>8)) ) & 0xFF
17 R = ( (cipher + R) * 52845 + 22719 ) & 0xFFFF
18 return bytechr(cipher), R
31 for cipher in cipherstring:
32 plain, R = _decryptChar(cipher, R)
48 cipher, R = _encryptChar(plain, R)
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/
DCTSBlockCipher.java25 BlockCipher cipher) in CTSBlockCipher() argument
27 if (cipher instanceof StreamBlockCipher) in CTSBlockCipher()
32 this.cipher = cipher; in CTSBlockCipher()
34 blockSize = cipher.getBlockSize(); in CTSBlockCipher()
96 resultLen = cipher.processBlock(buf, 0, out, outOff); in processByte()
150 resultLen += cipher.processBlock(buf, 0, out, outOff); in processBytes()
161 resultLen += cipher.processBlock(buf, 0, out, outOff + resultLen); in processBytes()
199 int blockSize = cipher.getBlockSize(); in doFinal()
210 cipher.processBlock(buf, 0, block, 0); in doFinal()
224 if (cipher instanceof CBCBlockCipher) in doFinal()
[all …]
DOFBBlockCipher.java21 private final BlockCipher cipher; field in OFBBlockCipher
31 BlockCipher cipher, in OFBBlockCipher() argument
34 super(cipher); in OFBBlockCipher()
36 this.cipher = cipher; in OFBBlockCipher()
39 this.IV = new byte[cipher.getBlockSize()]; in OFBBlockCipher()
40 this.ofbV = new byte[cipher.getBlockSize()]; in OFBBlockCipher()
41 this.ofbOutV = new byte[cipher.getBlockSize()]; in OFBBlockCipher()
84 cipher.init(true, ivParam.getParameters()); in init()
94 cipher.init(true, params); in init()
107 return cipher.getAlgorithmName() + "/OFB" + (blockSize * 8); in getAlgorithmName()
[all …]
DCFBBlockCipher.java22 private BlockCipher cipher = null; field in CFBBlockCipher
34 BlockCipher cipher, in CFBBlockCipher() argument
37 super(cipher); in CFBBlockCipher()
39 this.cipher = cipher; in CFBBlockCipher()
42 this.IV = new byte[cipher.getBlockSize()]; in CFBBlockCipher()
43 this.cfbV = new byte[cipher.getBlockSize()]; in CFBBlockCipher()
44 this.cfbOutV = new byte[cipher.getBlockSize()]; in CFBBlockCipher()
90 cipher.init(true, ivParam.getParameters()); in init()
100 cipher.init(true, params); in init()
113 return cipher.getAlgorithmName() + "/CFB" + (blockSize * 8); in getAlgorithmName()
[all …]
DCBCBlockCipher.java20 private BlockCipher cipher = null; field in CBCBlockCipher
29 BlockCipher cipher) in CBCBlockCipher() argument
31 this.cipher = cipher; in CBCBlockCipher()
32 this.blockSize = cipher.getBlockSize(); in CBCBlockCipher()
46 return cipher; in getUnderlyingCipher()
85 cipher.init(encrypting, ivParam.getParameters()); in init()
99 cipher.init(encrypting, params); in init()
115 return cipher.getAlgorithmName() + "/CBC"; in getAlgorithmName()
125 return cipher.getBlockSize(); in getBlockSize()
160 cipher.reset(); in reset()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/modes/
DCTSBlockCipher.java27 BlockCipher cipher) in CTSBlockCipher() argument
29 if (cipher instanceof StreamBlockCipher) in CTSBlockCipher()
34 this.cipher = cipher; in CTSBlockCipher()
36 blockSize = cipher.getBlockSize(); in CTSBlockCipher()
98 resultLen = cipher.processBlock(buf, 0, out, outOff); in processByte()
152 resultLen += cipher.processBlock(buf, 0, out, outOff); in processBytes()
163 resultLen += cipher.processBlock(buf, 0, out, outOff + resultLen); in processBytes()
201 int blockSize = cipher.getBlockSize(); in doFinal()
212 cipher.processBlock(buf, 0, block, 0); in doFinal()
226 if (cipher instanceof CBCBlockCipher) in doFinal()
[all …]
DOFBBlockCipher.java23 private final BlockCipher cipher; field in OFBBlockCipher
33 BlockCipher cipher, in OFBBlockCipher() argument
36 super(cipher); in OFBBlockCipher()
38 this.cipher = cipher; in OFBBlockCipher()
41 this.IV = new byte[cipher.getBlockSize()]; in OFBBlockCipher()
42 this.ofbV = new byte[cipher.getBlockSize()]; in OFBBlockCipher()
43 this.ofbOutV = new byte[cipher.getBlockSize()]; in OFBBlockCipher()
86 cipher.init(true, ivParam.getParameters()); in init()
96 cipher.init(true, params); in init()
109 return cipher.getAlgorithmName() + "/OFB" + (blockSize * 8); in getAlgorithmName()
[all …]
DCBCBlockCipher.java22 private BlockCipher cipher = null; field in CBCBlockCipher
31 BlockCipher cipher) in CBCBlockCipher() argument
33 this.cipher = cipher; in CBCBlockCipher()
34 this.blockSize = cipher.getBlockSize(); in CBCBlockCipher()
48 return cipher; in getUnderlyingCipher()
87 cipher.init(encrypting, ivParam.getParameters()); in init()
101 cipher.init(encrypting, params); in init()
117 return cipher.getAlgorithmName() + "/CBC"; in getAlgorithmName()
127 return cipher.getBlockSize(); in getBlockSize()
162 cipher.reset(); in reset()
[all …]
/external/conscrypt/benchmark-jmh/src/jmh/java/org/conscrypt/
DOpenJdkEngineFactory.java59 public SSLEngine newClientEngine(String cipher, boolean useAlpn) { in newClientEngine() argument
63 return initEngine(clientContext.createSSLEngine(), cipher, true); in newClientEngine()
67 public SSLEngine newServerEngine(String cipher, boolean useAlpn) { in newServerEngine() argument
71 return initEngine(serverContext.createSSLEngine(), cipher, false); in newServerEngine()
87 public SSLEngine newClientEngine(String cipher, boolean useAlpn) { in newClientEngine() argument
88 SSLEngine engine = initEngine(clientContext.createSSLEngine(), cipher, true); in newClientEngine()
96 public SSLEngine newServerEngine(String cipher, boolean useAlpn) { in newServerEngine() argument
97 SSLEngine engine = initEngine(serverContext.createSSLEngine(), cipher, false); in newServerEngine()
118 public SSLEngine newClientEngine(String cipher, boolean useAlpn) { in newClientEngine() argument
119 SSLEngine engine = initEngine(clientContext.createSSLEngine(), cipher, true); in newClientEngine()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/paddings/
DPaddedBufferedBlockCipher.java30 BlockCipher cipher, in PaddedBufferedBlockCipher() argument
33 this.cipher = cipher; in PaddedBufferedBlockCipher()
36 buf = new byte[cipher.getBlockSize()]; in PaddedBufferedBlockCipher()
46 BlockCipher cipher) in PaddedBufferedBlockCipher() argument
48 this(cipher, new PKCS7Padding()); in PaddedBufferedBlockCipher()
75 cipher.init(forEncryption, p.getParameters()); in init()
81 cipher.init(forEncryption, params); in init()
154 resultLen = cipher.processBlock(buf, 0, out, outOff); in processByte()
206 resultLen += cipher.processBlock(buf, 0, out, outOff); in processBytes()
214 resultLen += cipher.processBlock(in, inOff, out, outOff + resultLen); in processBytes()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/paddings/
DPaddedBufferedBlockCipher.java32 BlockCipher cipher, in PaddedBufferedBlockCipher() argument
35 this.cipher = cipher; in PaddedBufferedBlockCipher()
38 buf = new byte[cipher.getBlockSize()]; in PaddedBufferedBlockCipher()
48 BlockCipher cipher) in PaddedBufferedBlockCipher() argument
50 this(cipher, new PKCS7Padding()); in PaddedBufferedBlockCipher()
77 cipher.init(forEncryption, p.getParameters()); in init()
83 cipher.init(forEncryption, params); in init()
156 resultLen = cipher.processBlock(buf, 0, out, outOff); in processByte()
208 resultLen += cipher.processBlock(buf, 0, out, outOff); in processBytes()
216 resultLen += cipher.processBlock(in, inOff, out, outOff + resultLen); in processBytes()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/
DCipherSpi.java52 private AsymmetricBlockCipher cipher; field in CipherSpi
62 cipher = engine; in CipherSpi()
85 cipher = engine; in CipherSpi()
100cipher = new OAEPEncoding(new RSABlindedEngine(), digest, ((PSource.PSpecified)pSpec.getPSource())… in initFromSpec()
108 return cipher.getInputBlockSize(); in engineGetBlockSize()
140 return cipher.getOutputBlockSize(); in engineGetOutputSize()
204 cipher = new RSABlindedEngine(); in engineSetPadding()
208 cipher = new PKCS1Encoding(new RSABlindedEngine()); in engineSetPadding()
337cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.get… in engineInit()
345 if (!(cipher instanceof RSABlindedEngine)) in engineInit()
[all …]

12345678910>>...15