/external/boringssl/src/crypto/fipsmodule/cipher/ |
D | cipher.c | 83 if (c->cipher != NULL) { in EVP_CIPHER_CTX_cleanup() 84 if (c->cipher->cleanup) { in EVP_CIPHER_CTX_cleanup() 85 c->cipher->cleanup(c); in EVP_CIPHER_CTX_cleanup() 87 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); in EVP_CIPHER_CTX_cleanup() 103 if (in == NULL || in->cipher == NULL) { in EVP_CIPHER_CTX_copy() 111 if (in->cipher_data && in->cipher->ctx_size) { in EVP_CIPHER_CTX_copy() 112 out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 114 out->cipher = NULL; in EVP_CIPHER_CTX_copy() 118 OPENSSL_memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 121 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) { in EVP_CIPHER_CTX_copy() [all …]
|
/external/wycheproof/java/com/google/security/wycheproof/testcases/ |
D | AesGcmTest.java | 136 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 …]
|
D | CipherOutputStreamTest.java | 72 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 …]
|
D | CipherInputStreamTest.java | 73 Cipher cipher = Cipher.getInstance(algorithm); in TestVector() local 74 cipher.init(Cipher.ENCRYPT_MODE, this.key, this.params); in TestVector() 75 cipher.updateAAD(aad); in TestVector() 76 this.ct = cipher.doFinal(pt); in TestVector() 106 Cipher cipher = Cipher.getInstance(t.algorithm); in testEncrypt() local 107 cipher.init(Cipher.ENCRYPT_MODE, t.key, t.params); in testEncrypt() 108 cipher.updateAAD(t.aad); in testEncrypt() 110 CipherInputStream cis = new CipherInputStream(is, cipher); in testEncrypt() 130 Cipher cipher = Cipher.getInstance(t.algorithm); in testDecrypt() local 131 cipher.init(Cipher.DECRYPT_MODE, t.key, t.params); in testDecrypt() [all …]
|
D | AesEaxTest.java | 259 Cipher cipher = Cipher.getInstance("AES/EAX/NoPadding"); in testEax() local 260 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); in testEax() 261 cipher.updateAAD(test.aad); in testEax() 262 byte[] ct = cipher.doFinal(test.pt); in testEax() 269 Cipher cipher = Cipher.getInstance("AES/EAX/NoPadding"); in testLateUpdateAAD() local 270 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); in testLateUpdateAAD() 271 byte[] c0 = cipher.update(test.pt); in testLateUpdateAAD() 273 cipher.updateAAD(test.aad); in testLateUpdateAAD() 280 byte[] c1 = cipher.doFinal(); in testLateUpdateAAD()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/macs/ |
D | CBCBlockCipherMac.java | 20 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/boringssl/src/ssl/ |
D | ssl_cipher.cc | 553 const SSL_CIPHER *cipher; member 657 const SSL_CIPHER *cipher, uint16_t version, int is_dtls) { in ssl_cipher_get_evp_aead() argument 664 if (cipher->algorithm_mac == SSL_AEAD) { in ssl_cipher_get_evp_aead() 665 if (cipher->algorithm_enc == SSL_AES128GCM) { in ssl_cipher_get_evp_aead() 669 } else if (cipher->algorithm_enc == SSL_AES256GCM) { in ssl_cipher_get_evp_aead() 673 } else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) { in ssl_cipher_get_evp_aead() 685 } else if (cipher->algorithm_mac == SSL_SHA1) { in ssl_cipher_get_evp_aead() 686 if (cipher->algorithm_enc == SSL_eNULL) { in ssl_cipher_get_evp_aead() 692 } else if (cipher->algorithm_enc == SSL_3DES) { in ssl_cipher_get_evp_aead() 702 } else if (cipher->algorithm_enc == SSL_AES128) { in ssl_cipher_get_evp_aead() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
D | BaseBlockCipher.java | 113 private GenericBlockCipher cipher; field in BaseBlockCipher 149 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 166 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 175 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher() 183 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher() 194 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher() 203 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 213 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 241 return cipher.getOutputSize(inputLen); in engineGetOutputSize() 274 String name = cipher.getUnderlyingCipher().getAlgorithmName(); in engineGetParameters() [all …]
|
/external/syslinux/gpxe/src/include/gpxe/ |
D | crypto.h | 116 static inline int cipher_setkey ( struct cipher_algorithm *cipher, in cipher_setkey() argument 118 return cipher->setkey ( ctx, key, keylen ); in cipher_setkey() 121 static inline void cipher_setiv ( struct cipher_algorithm *cipher, in cipher_setiv() argument 123 cipher->setiv ( ctx, iv ); in cipher_setiv() 126 static inline void cipher_encrypt ( struct cipher_algorithm *cipher, in cipher_encrypt() argument 129 cipher->encrypt ( ctx, src, dst, len ); in cipher_encrypt() 131 #define cipher_encrypt( cipher, ctx, src, dst, len ) do { \ argument 132 assert ( ( (len) & ( (cipher)->blocksize - 1 ) ) == 0 ); \ 133 cipher_encrypt ( (cipher), (ctx), (src), (dst), (len) ); \ 136 static inline void cipher_decrypt ( struct cipher_algorithm *cipher, in cipher_decrypt() argument [all …]
|
/external/ppp/pppd/ |
D | pppcrypt.c | 148 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/conscrypt/benchmark-base/src/main/java/org/conscrypt/ |
D | EngineType.java | 45 SSLEngine newClientEngine(String cipher) { in newClientEngine() argument 46 return initEngine(clientContext.createSSLEngine(), cipher, true); in newClientEngine() 50 SSLEngine newServerEngine(String cipher) { in newServerEngine() argument 51 return initEngine(serverContext.createSSLEngine(), cipher, false); in newServerEngine() 67 SSLEngine newClientEngine(String cipher) { in newClientEngine() argument 68 return initEngine(clientContext.createSSLEngine(), cipher, true); in newClientEngine() 72 SSLEngine newServerEngine(String cipher) { in newServerEngine() argument 73 return initEngine(serverContext.createSSLEngine(), cipher, false); in newServerEngine() 89 SSLEngine newClientEngine(String cipher) { in newClientEngine() argument 90 SSLEngine engine = initEngine(clientContext.createSSLEngine(), cipher, true); in newClientEngine() [all …]
|
D | EngineHandshakeBenchmark.java | 51 String cipher(); in cipher() method 55 private final String cipher; field in EngineHandshakeBenchmark 64 cipher = config.cipher(); in EngineHandshakeBenchmark() 67 SSLEngine clientEngine = engineType.newClientEngine(cipher); in EngineHandshakeBenchmark() 68 SSLEngine serverEngine = engineType.newServerEngine(cipher); in EngineHandshakeBenchmark() 81 SSLEngine client = engineType.newClientEngine(cipher); in handshake() 82 SSLEngine server = engineType.newServerEngine(cipher); in handshake() 110 public String cipher() { in main()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/ |
D | BufferedBlockCipher.java | 18 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/openssh/ |
D | cipher.c | 66 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/fonttools/Lib/fontTools/misc/ |
D | eexec.py | 8 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 23 for cipher in cipherstring: 24 plain, R = _decryptChar(cipher, R) 32 cipher, R = _encryptChar(plain, R) [all …]
|
/external/ipsec-tools/src/racoon/missing/crypto/rijndael/ |
D | rijndael-api-fst.c | 79 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/boringssl/src/crypto/cipher_extra/test/ |
D | make_all_legacy_aead_tests.sh | 5 go run make_legacy_aead_tests.go -cipher aes128 -mac sha1 > aes_128_cbc_sha1_tls_tests.txt 6 go run make_legacy_aead_tests.go -cipher aes128 -mac sha1 -implicit-iv > aes_128_cbc_sha1_tls_impli… 7 go run make_legacy_aead_tests.go -cipher aes128 -mac sha256 > aes_128_cbc_sha256_tls_tests.txt 9 go run make_legacy_aead_tests.go -cipher aes256 -mac sha1 > aes_256_cbc_sha1_tls_tests.txt 10 go run make_legacy_aead_tests.go -cipher aes256 -mac sha1 -implicit-iv > aes_256_cbc_sha1_tls_impli… 11 go run make_legacy_aead_tests.go -cipher aes256 -mac sha256 > aes_256_cbc_sha256_tls_tests.txt 12 go run make_legacy_aead_tests.go -cipher aes256 -mac sha384 > aes_256_cbc_sha384_tls_tests.txt 14 go run make_legacy_aead_tests.go -cipher 3des -mac sha1 > des_ede3_cbc_sha1_tls_tests.txt 15 go run make_legacy_aead_tests.go -cipher 3des -mac sha1 -implicit-iv > des_ede3_cbc_sha1_tls_implic… 17 go run make_legacy_aead_tests.go -cipher aes128 -mac sha1 -ssl3 > aes_128_cbc_sha1_ssl3_tests.txt [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/ |
D | CTSBlockCipher.java | 24 BlockCipher cipher) in CTSBlockCipher() argument 26 if (cipher instanceof StreamBlockCipher) in CTSBlockCipher() 31 this.cipher = cipher; in CTSBlockCipher() 33 blockSize = cipher.getBlockSize(); in CTSBlockCipher() 95 resultLen = cipher.processBlock(buf, 0, out, outOff); in processByte() 149 resultLen += cipher.processBlock(buf, 0, out, outOff); in processBytes() 160 resultLen += cipher.processBlock(buf, 0, out, outOff + resultLen); in processBytes() 198 int blockSize = cipher.getBlockSize(); in doFinal() 209 cipher.processBlock(buf, 0, block, 0); in doFinal() 223 if (cipher instanceof CBCBlockCipher) in doFinal() [all …]
|
D | OFBBlockCipher.java | 21 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 …]
|
D | CFBBlockCipher.java | 22 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 …]
|
D | CBCBlockCipher.java | 20 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/syslinux/core/lwip/src/netif/ppp/ |
D | chpms.c | 170 u_char *cipher /* OUT 8 octets */) in DesEncrypt() argument 188 Collapse(des_input, cipher); in DesEncrypt() 192 … cipher[0], cipher[1], cipher[2], cipher[3], cipher[4], cipher[5], cipher[6], cipher[7])); in DesEncrypt() 201 u_char *cipher /* OUT 8 octets */) in DesEncrypt() argument 215 des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1); in DesEncrypt() 219 … cipher[0], cipher[1], cipher[2], cipher[3], cipher[4], cipher[5], cipher[6], cipher[7])); in DesEncrypt()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/paddings/ |
D | PaddedBufferedBlockCipher.java | 30 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/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/ |
D | CipherSpi.java | 48 private AsymmetricBlockCipher cipher; field in CipherSpi 58 cipher = engine; in CipherSpi() 81 cipher = engine; in CipherSpi() 96 …cipher = new OAEPEncoding(new RSABlindedEngine(), digest, ((PSource.PSpecified)pSpec.getPSource())… in initFromSpec() 104 return cipher.getInputBlockSize(); in engineGetBlockSize() 136 return cipher.getOutputBlockSize(); in engineGetOutputSize() 200 cipher = new RSABlindedEngine(); in engineSetPadding() 204 cipher = new PKCS1Encoding(new RSABlindedEngine()); in engineSetPadding() 331 …cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.get… in engineInit() 339 if (!(cipher instanceof RSABlindedEngine)) in engineInit() [all …]
|
/external/boringssl/src/crypto/pkcs8/ |
D | p5_pbev2.c | 142 static int pkcs5_pbe2_cipher_init(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in pkcs5_pbe2_cipher_init() argument 147 if (iv_len != EVP_CIPHER_iv_length(cipher)) { in pkcs5_pbe2_cipher_init() 154 EVP_CIPHER_key_length(cipher), key) && in pkcs5_pbe2_cipher_init() 155 EVP_CipherInit_ex(ctx, cipher, NULL /* engine */, key, iv, enc); in pkcs5_pbe2_cipher_init() 161 const EVP_CIPHER *cipher, unsigned iterations, in PKCS5_pbe2_encrypt_init() argument 164 int cipher_nid = EVP_CIPHER_nid(cipher); in PKCS5_pbe2_encrypt_init() 172 if (!RAND_bytes(iv, EVP_CIPHER_iv_length(cipher))) { in PKCS5_pbe2_encrypt_init() 192 !CBB_add_asn1_uint64(&kdf_param, EVP_CIPHER_key_length(cipher))) || in PKCS5_pbe2_encrypt_init() 199 !CBB_add_bytes(&iv_cbb, iv, EVP_CIPHER_iv_length(cipher)) || in PKCS5_pbe2_encrypt_init() 204 return pkcs5_pbe2_cipher_init(ctx, cipher, iterations, pass, pass_len, salt, in PKCS5_pbe2_encrypt_init() [all …]
|