/external/boringssl/src/crypto/cipher/ |
D | cipher.c | 97 if (c->cipher != NULL) { in EVP_CIPHER_CTX_cleanup() 98 if (c->cipher->cleanup) { in EVP_CIPHER_CTX_cleanup() 99 c->cipher->cleanup(c); in EVP_CIPHER_CTX_cleanup() 101 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); in EVP_CIPHER_CTX_cleanup() 117 if (in == NULL || in->cipher == NULL) { in EVP_CIPHER_CTX_copy() 125 if (in->cipher_data && in->cipher->ctx_size) { in EVP_CIPHER_CTX_copy() 126 out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 131 memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 134 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) { in EVP_CIPHER_CTX_copy() 135 return in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY, 0, out); in EVP_CIPHER_CTX_copy() [all …]
|
/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/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
D | BaseBlockCipher.java | 103 private GenericBlockCipher cipher; field in BaseBlockCipher 135 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 144 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher() 152 cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher() 161 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 171 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 199 return cipher.getOutputSize(inputLen); in engineGetOutputSize() 220 String name = cipher.getUnderlyingCipher().getAlgorithmName(); in engineGetParameters() 263 cipher = new BufferedGenericBlockCipher(baseEngine); in engineSetMode() 268 cipher = new BufferedGenericBlockCipher( in engineSetMode() [all …]
|
/external/boringssl/src/crypto/cipher/test/ |
D | make_all_legacy_aead_tests.sh | 5 go run make_legacy_aead_tests.go -cipher rc4 -mac md5 > rc4_md5_tls_tests.txt 6 go run make_legacy_aead_tests.go -cipher rc4 -mac sha1 > rc4_sha1_tls_tests.txt 8 go run make_legacy_aead_tests.go -cipher aes128 -mac sha1 > aes_128_cbc_sha1_tls_tests.txt 9 go run make_legacy_aead_tests.go -cipher aes128 -mac sha1 -implicit-iv > aes_128_cbc_sha1_tls_impli… 10 go run make_legacy_aead_tests.go -cipher aes128 -mac sha256 > aes_128_cbc_sha256_tls_tests.txt 12 go run make_legacy_aead_tests.go -cipher aes256 -mac sha1 > aes_256_cbc_sha1_tls_tests.txt 13 go run make_legacy_aead_tests.go -cipher aes256 -mac sha1 -implicit-iv > aes_256_cbc_sha1_tls_impli… 14 go run make_legacy_aead_tests.go -cipher aes256 -mac sha256 > aes_256_cbc_sha256_tls_tests.txt 15 go run make_legacy_aead_tests.go -cipher aes256 -mac sha384 > aes_256_cbc_sha384_tls_tests.txt 17 go run make_legacy_aead_tests.go -cipher 3des -mac sha1 > des_ede3_cbc_sha1_tls_tests.txt [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/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() 118 leftOver = total % buf.length - (cipher.getBlockSize() + 2); in getUpdateOutputSize() [all …]
|
/external/openssh/ |
D | cipher.c | 287 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message() 289 if (cc->cipher->number == SSH_CIPHER_DES) in cipher_warning_message() 296 cipher_init(struct sshcipher_ctx *cc, const struct sshcipher *cipher, in cipher_init() argument 306 if (cipher->number == SSH_CIPHER_DES) { in cipher_init() 311 cc->plaintext = (cipher->number == SSH_CIPHER_NONE); in cipher_init() 314 if (keylen < cipher->key_len || in cipher_init() 315 (iv != NULL && ivlen < cipher_ivlen(cipher))) in cipher_init() 318 cc->cipher = cipher; in cipher_init() 319 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_init() 323 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_init() [all …]
|
/external/apache-harmony/crypto/src/test/api/java.injected/javax/crypto/ |
D | SealedObjectTest.java | 97 Cipher cipher = new NullCipher(); in testSealedObject2() local 98 SealedObject so1 = new SealedObject(secret, cipher); in testSealedObject2() 103 .getObject(cipher)); in testSealedObject2() 119 Cipher cipher = Cipher.getInstance(algorithm); in testGetAlgorithm() local 120 cipher.init(Cipher.ENCRYPT_MODE, key); in testGetAlgorithm() 121 SealedObject so = new SealedObject(secret, cipher); in testGetAlgorithm() 139 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); in testGetObject1() local 140 cipher.init(Cipher.ENCRYPT_MODE, key, ips); in testGetObject1() 143 SealedObject so = new SealedObject(secret, cipher); in testGetObject1() 150 .equals(so.encodedParams, cipher.getParameters().getEncoded())); in testGetObject1() [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/srtp/doc/ |
D | crypto_kernel.txt | 14 @brief A generic cipher type enables cipher agility, that is, the 15 ability to write code that runs with multiple cipher types. 24 * @brief Allocates a cipher of a particular type. 28 cipher_type_alloc(cipher_type_t *ctype, cipher_t **cipher, 32 * @brief Initialized a cipher to use a particular key. May 33 * be invoked more than once on the same cipher. 38 cipher_init(cipher_t *cipher, const uint8_t *key); 41 * @brief Sets the initialization vector of a given cipher. 46 cipher_set_iv(cipher_t *cipher, void *iv); 49 * @brief Encrypts a buffer with a given cipher. [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 …]
|
D | rijndael-api-fst.h | 86 int rijndael_cipherInit(cipherInstance *cipher, u_int8_t mode, char *IV); 88 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, 91 int rijndael_padEncrypt(cipherInstance *cipher, keyInstance *key, 94 int rijndael_blockDecrypt(cipherInstance *cipher, keyInstance *key, 97 int rijndael_padDecrypt(cipherInstance *cipher, keyInstance *key, 101 int rijndael_cipherUpdateRounds(cipherInstance *cipher, keyInstance *key,
|
/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/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | CipherTest.java | 65 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); in test_getInstanceLjava_lang_String() local 66 assertNotNull("Received a null Cipher instance", cipher); in test_getInstanceLjava_lang_String() 81 Cipher cipher = Cipher.getInstance("DES", providers[i].getName()); in test_getInstanceLjava_lang_StringLjava_lang_String() local 82 assertNotNull("Cipher.getInstance() returned a null value", cipher); in test_getInstanceLjava_lang_StringLjava_lang_String() 86 cipher = Cipher.getInstance("DoBeDoBeDo", providers[i]); in test_getInstanceLjava_lang_StringLjava_lang_String() 122 Cipher cipher = Cipher.getInstance("DES", providers[i]); in test_getInstanceLjava_lang_StringLjava_security_Provider() local 123 assertNotNull("Cipher.getInstance() returned a null value", cipher); in test_getInstanceLjava_lang_StringLjava_security_Provider() 138 Cipher cipher = Cipher.getInstance("AES", provider.getName()); in test_getProvider() local 139 Provider cipherProvider = cipher.getProvider(); in test_getProvider() 152 Cipher cipher = Cipher.getInstance(algorithm); in test_getAlgorithm() local [all …]
|
/external/boringssl/src/ssl/ |
D | ssl_cipher.c | 501 const SSL_CIPHER *cipher; member 617 const SSL_CIPHER *cipher, uint16_t version) { in ssl_cipher_get_evp_aead() argument 622 switch (cipher->algorithm_enc) { in ssl_cipher_get_evp_aead() 641 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 663 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 685 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 711 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 802 const SSL_CIPHER *cipher = &kCiphers[i]; in ssl_cipher_collect_ciphers() local 803 if (ssl_method->supports_cipher(cipher)) { in ssl_cipher_collect_ciphers() 804 co_list[co_list_num].cipher = cipher; in ssl_cipher_collect_ciphers() [all …]
|
/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() 313 …cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.get… in engineInit() 321 if (!(cipher instanceof RSABlindedEngine)) in engineInit() [all …]
|
D | DigestSignatureSpi.java | 53 private AsymmetricBlockCipher cipher; field in DigestSignatureSpi 59 AsymmetricBlockCipher cipher) in DigestSignatureSpi() argument 62 this.cipher = cipher; in DigestSignatureSpi() 70 AsymmetricBlockCipher cipher) in DigestSignatureSpi() argument 73 this.cipher = cipher; in DigestSignatureSpi() 89 cipher.init(false, param); in engineInitVerify() 105 cipher.init(true, param); in engineInitSign() 146 return cipher.processBlock(bytes, 0, bytes.length); in engineSign() 171 sig = cipher.processBlock(sigBytes, 0, sigBytes.length); in engineVerify()
|
/external/apache-harmony/crypto/src/test/impl/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | Cipher_Impl1Test.java | 57 Cipher cipher = null; in test_getIV() local 64 cipher = Cipher.getInstance(algorithm + "/CBC/PKCS5Padding"); in test_getIV() 65 cipher.init(Cipher.ENCRYPT_MODE, cipherKey, ap); in test_getIV() 67 byte[] cipherIV = cipher.getIV(); in test_getIV() 85 Cipher cipher = null; in test_getParameters() local 96 cipher = Cipher.getInstance(algorithm + "/CBC/PKCS5Padding"); in test_getParameters() 97 cipher.init(Cipher.ENCRYPT_MODE, cipherKey, ap, sr); in test_getParameters() 99 byte[] cipherParmsEnc = cipher.getParameters().getEncoded("ASN.1"); in test_getParameters()
|
/external/boringssl/src/include/openssl/ |
D | cipher.h | 152 const EVP_CIPHER *cipher, ENGINE *engine, 158 const EVP_CIPHER *cipher, ENGINE *impl, 163 const EVP_CIPHER *cipher, ENGINE *impl, 296 OPENSSL_EXPORT int EVP_CIPHER_nid(const EVP_CIPHER *cipher); 300 OPENSSL_EXPORT unsigned EVP_CIPHER_block_size(const EVP_CIPHER *cipher); 306 OPENSSL_EXPORT unsigned EVP_CIPHER_key_length(const EVP_CIPHER *cipher); 310 OPENSSL_EXPORT unsigned EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); 314 OPENSSL_EXPORT uint32_t EVP_CIPHER_flags(const EVP_CIPHER *cipher); 317 OPENSSL_EXPORT uint32_t EVP_CIPHER_mode(const EVP_CIPHER *cipher); 381 OPENSSL_EXPORT int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, [all …]
|
/external/wpa_supplicant_8/src/tls/ |
D | tlsv1_server.c | 504 char *cipher; in tlsv1_server_get_cipher() local 508 cipher = "RC4-MD5"; in tlsv1_server_get_cipher() 511 cipher = "RC4-SHA"; in tlsv1_server_get_cipher() 514 cipher = "DES-CBC-SHA"; in tlsv1_server_get_cipher() 517 cipher = "DES-CBC3-SHA"; in tlsv1_server_get_cipher() 520 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_server_get_cipher() 523 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_server_get_cipher() 526 cipher = "ADH-RC4-MD5"; in tlsv1_server_get_cipher() 529 cipher = "ADH-DES-SHA"; in tlsv1_server_get_cipher() 532 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_server_get_cipher() [all …]
|
D | tlsv1_client.c | 558 char *cipher; in tlsv1_client_get_cipher() local 562 cipher = "RC4-MD5"; in tlsv1_client_get_cipher() 565 cipher = "RC4-SHA"; in tlsv1_client_get_cipher() 568 cipher = "DES-CBC-SHA"; in tlsv1_client_get_cipher() 571 cipher = "DES-CBC3-SHA"; in tlsv1_client_get_cipher() 574 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_client_get_cipher() 577 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_client_get_cipher() 580 cipher = "ADH-RC4-MD5"; in tlsv1_client_get_cipher() 583 cipher = "ADH-DES-SHA"; in tlsv1_client_get_cipher() 586 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_client_get_cipher() [all …]
|