/external/boringssl/src/crypto/cipher/ |
D | cipher.c | 103 if (c->cipher != NULL) { in EVP_CIPHER_CTX_cleanup() 104 if (c->cipher->cleanup) { in EVP_CIPHER_CTX_cleanup() 105 c->cipher->cleanup(c); in EVP_CIPHER_CTX_cleanup() 107 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); in EVP_CIPHER_CTX_cleanup() 123 if (in == NULL || in->cipher == NULL) { in EVP_CIPHER_CTX_copy() 131 if (in->cipher_data && in->cipher->ctx_size) { in EVP_CIPHER_CTX_copy() 132 out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 137 memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 140 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) { in EVP_CIPHER_CTX_copy() 141 return in->cipher->ctrl((EVP_CIPHER_CTX *)in, EVP_CTRL_COPY, 0, out); in EVP_CIPHER_CTX_copy() [all …]
|
D | cipher_test.cc | 110 const EVP_CIPHER *cipher, in TestOperation() argument 128 bool is_aead = EVP_CIPHER_mode(cipher) == EVP_CIPH_GCM_MODE; in TestOperation() 131 if (!EVP_CipherInit_ex(ctx.get(), cipher, nullptr, nullptr, nullptr, in TestOperation() 221 const EVP_CIPHER *cipher = GetCipher(cipher_str); in TestCipher() local 222 if (cipher == nullptr) { in TestCipher() 233 if (EVP_CIPHER_iv_length(cipher) > 0 && in TestCipher() 237 if (EVP_CIPHER_mode(cipher) == EVP_CIPH_GCM_MODE) { in TestCipher() 263 if (!TestOperation(t, cipher, true /* encrypt */, false /* single-shot */, in TestCipher() 265 !TestOperation(t, cipher, true /* encrypt */, true /* streaming */, key, in TestCipher() 271 if (!TestOperation(t, cipher, false /* decrypt */, false /* single-shot */, in TestCipher() [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 | 109 private GenericBlockCipher cipher; field in BaseBlockCipher 145 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 162 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 171 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher() 179 cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher() 190 this.cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher() 199 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 209 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 237 return cipher.getOutputSize(inputLen); in engineGetOutputSize() 258 String name = cipher.getUnderlyingCipher().getAlgorithmName(); in engineGetParameters() [all …]
|
/external/boringssl/src/ssl/ |
D | ssl_cipher.c | 630 const SSL_CIPHER *cipher; member 750 const SSL_CIPHER *cipher, uint16_t version) { in ssl_cipher_get_evp_aead() argument 755 switch (cipher->algorithm_enc) { in ssl_cipher_get_evp_aead() 779 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 801 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 823 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 849 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 867 switch (cipher->algorithm_mac) { in ssl_cipher_get_evp_aead() 957 const SSL_CIPHER *cipher = &kCiphers[i]; in ssl_cipher_collect_ciphers() local 958 if (ssl_method->supports_cipher(cipher)) { in ssl_cipher_collect_ciphers() [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/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/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/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/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 | 47 private AsymmetricBlockCipher cipher; field in CipherSpi 57 cipher = engine; in CipherSpi() 80 cipher = engine; in CipherSpi() 95 …cipher = new OAEPEncoding(new RSABlindedEngine(), digest, ((PSource.PSpecified)pSpec.getPSource())… in initFromSpec() 103 return cipher.getInputBlockSize(); in engineGetBlockSize() 135 return cipher.getOutputBlockSize(); in engineGetOutputSize() 199 cipher = new RSABlindedEngine(); in engineSetPadding() 203 cipher = new PKCS1Encoding(new RSABlindedEngine()); in engineSetPadding() 312 …cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.get… in engineInit() 320 if (!(cipher instanceof RSABlindedEngine)) in engineInit() [all …]
|
D | DigestSignatureSpi.java | 54 private AsymmetricBlockCipher cipher; field in DigestSignatureSpi 60 AsymmetricBlockCipher cipher) in DigestSignatureSpi() argument 63 this.cipher = cipher; in DigestSignatureSpi() 71 AsymmetricBlockCipher cipher) in DigestSignatureSpi() argument 74 this.cipher = cipher; in DigestSignatureSpi() 90 cipher.init(false, param); in engineInitVerify() 106 cipher.init(true, param); in engineInitSign() 147 return cipher.processBlock(bytes, 0, bytes.length); in engineSign() 172 sig = cipher.processBlock(sigBytes, 0, sigBytes.length); in engineVerify()
|
/external/boringssl/src/include/openssl/ |
D | cipher.h | 148 const EVP_CIPHER *cipher, ENGINE *engine, 154 const EVP_CIPHER *cipher, ENGINE *impl, 159 const EVP_CIPHER *cipher, ENGINE *impl, 292 OPENSSL_EXPORT int EVP_CIPHER_nid(const EVP_CIPHER *cipher); 296 OPENSSL_EXPORT unsigned EVP_CIPHER_block_size(const EVP_CIPHER *cipher); 302 OPENSSL_EXPORT unsigned EVP_CIPHER_key_length(const EVP_CIPHER *cipher); 306 OPENSSL_EXPORT unsigned EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); 310 OPENSSL_EXPORT uint32_t EVP_CIPHER_flags(const EVP_CIPHER *cipher); 313 OPENSSL_EXPORT uint32_t EVP_CIPHER_mode(const EVP_CIPHER *cipher); 378 OPENSSL_EXPORT int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, [all …]
|
/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/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 | 559 char *cipher; in tlsv1_client_get_cipher() local 563 cipher = "RC4-MD5"; in tlsv1_client_get_cipher() 566 cipher = "RC4-SHA"; in tlsv1_client_get_cipher() 569 cipher = "DES-CBC-SHA"; in tlsv1_client_get_cipher() 572 cipher = "DES-CBC3-SHA"; in tlsv1_client_get_cipher() 575 cipher = "DHE-RSA-DES-CBC-SHA"; in tlsv1_client_get_cipher() 578 cipher = "DHE-RSA-DES-CBC3-SHA"; in tlsv1_client_get_cipher() 581 cipher = "ADH-RC4-MD5"; in tlsv1_client_get_cipher() 584 cipher = "ADH-DES-SHA"; in tlsv1_client_get_cipher() 587 cipher = "ADH-DES-CBC3-SHA"; in tlsv1_client_get_cipher() [all …]
|