/external/chromium_org/third_party/boringssl/src/crypto/cipher/ |
D | cipher.c | 96 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit() argument 98 if (cipher) { in EVP_CipherInit() 101 return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); in EVP_CipherInit() 105 if (c->cipher != NULL && c->cipher->cleanup && !c->cipher->cleanup(c)) { in EVP_CIPHER_CTX_cleanup() 110 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); in EVP_CIPHER_CTX_cleanup() 126 if (in == NULL || in->cipher == NULL) { in EVP_CIPHER_CTX_copy() 134 if (in->cipher_data && in->cipher->ctx_size) { in EVP_CIPHER_CTX_copy() 135 out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 140 memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size); in EVP_CIPHER_CTX_copy() 143 if (in->cipher->flags & EVP_CIPH_CUSTOM_COPY) { in EVP_CIPHER_CTX_copy() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
D | BaseBlockCipher.java | 102 private GenericBlockCipher cipher; field in BaseBlockCipher 134 cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 143 cipher = new BufferedGenericBlockCipher(provider.get()); in BaseBlockCipher() 151 cipher = new AEADGenericBlockCipher(engine); in BaseBlockCipher() 160 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 170 this.cipher = new BufferedGenericBlockCipher(engine); in BaseBlockCipher() 198 return cipher.getOutputSize(inputLen); in engineGetOutputSize() 219 String name = cipher.getUnderlyingCipher().getAlgorithmName(); in engineGetParameters() 262 cipher = new BufferedGenericBlockCipher(baseEngine); in engineSetMode() 267 cipher = new BufferedGenericBlockCipher( in engineSetMode() [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/openssl/crypto/evp/ |
D | evp_enc.c | 76 #define M_do_cipher(ctx, out, in, inl) ctx->cipher->do_cipher(ctx, out, in, inl) 96 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, in EVP_CipherInit() argument 99 if (cipher) in EVP_CipherInit() 101 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); in EVP_CipherInit() 104 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, in EVP_CipherInit_ex() argument 120 if (ctx->engine && ctx->cipher && (!cipher || in EVP_CipherInit_ex() 121 (cipher && (cipher->nid == ctx->cipher->nid)))) in EVP_CipherInit_ex() 124 if (cipher) in EVP_CipherInit_ex() 129 if (ctx->cipher) in EVP_CipherInit_ex() 148 impl = ENGINE_get_cipher_engine(cipher->nid); in EVP_CipherInit_ex() [all …]
|
D | evp_lib.c | 68 if (c->cipher->set_asn1_parameters != NULL) in EVP_CIPHER_param_to_asn1() 69 ret=c->cipher->set_asn1_parameters(c,type); in EVP_CIPHER_param_to_asn1() 70 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) in EVP_CIPHER_param_to_asn1() 81 if (c->cipher->get_asn1_parameters != NULL) in EVP_CIPHER_asn1_to_param() 82 ret=c->cipher->get_asn1_parameters(c,type); in EVP_CIPHER_asn1_to_param() 83 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) in EVP_CIPHER_asn1_to_param() 188 return ctx->cipher->block_size; in EVP_CIPHER_CTX_block_size() 193 return ctx->cipher->do_cipher(ctx,out,in,inl); in EVP_Cipher() 198 return ctx->cipher; in EVP_CIPHER_CTX_cipher() 201 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher) in EVP_CIPHER_flags() argument [all …]
|
D | evp_test.c | 244 static int test_cipher(const char *cipher,const unsigned char *key,int kn, in test_cipher() argument 252 c=EVP_get_cipherbyname(cipher); in test_cipher() 368 char *cipher; in main() local 378 cipher=sstrsep(&p,":"); in main() 396 if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec) in main() 397 && !test_digest(cipher,plaintext,pn,ciphertext,cn)) in main() 400 if (strstr(cipher, "AES") == cipher) in main() 402 fprintf(stdout, "Cipher disabled, skipping %s\n", cipher); in main() 407 if (strstr(cipher, "DES") == cipher) in main() 409 fprintf(stdout, "Cipher disabled, skipping %s\n", cipher); in main() [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/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/modes/ |
D | CTSBlockCipher.java | 23 BlockCipher cipher) in CTSBlockCipher() argument 25 …if ((cipher instanceof OFBBlockCipher) || (cipher instanceof CFBBlockCipher) || (cipher instanceof… 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 | 19 private final BlockCipher cipher; field in OFBBlockCipher 29 BlockCipher cipher, in OFBBlockCipher() argument 32 this.cipher = cipher; in OFBBlockCipher() 35 this.IV = new byte[cipher.getBlockSize()]; in OFBBlockCipher() 36 this.ofbV = new byte[cipher.getBlockSize()]; in OFBBlockCipher() 37 this.ofbOutV = new byte[cipher.getBlockSize()]; in OFBBlockCipher() 47 return cipher; in getUnderlyingCipher() 90 cipher.init(true, ivParam.getParameters()); in init() 100 cipher.init(true, params); in init() 113 return cipher.getAlgorithmName() + "/OFB" + (blockSize * 8); in getAlgorithmName() [all …]
|
D | CFBBlockCipher.java | 20 private BlockCipher cipher = null; field in CFBBlockCipher 31 BlockCipher cipher, in CFBBlockCipher() argument 34 this.cipher = cipher; in CFBBlockCipher() 37 this.IV = new byte[cipher.getBlockSize()]; in CFBBlockCipher() 38 this.cfbV = new byte[cipher.getBlockSize()]; in CFBBlockCipher() 39 this.cfbOutV = new byte[cipher.getBlockSize()]; in CFBBlockCipher() 49 return cipher; in getUnderlyingCipher() 94 cipher.init(true, ivParam.getParameters()); in init() 104 cipher.init(true, params); in init() 117 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 …]
|
D | SICBlockCipher.java | 15 private final BlockCipher cipher; field in SICBlockCipher 30 this.cipher = c; in SICBlockCipher() 31 this.blockSize = cipher.getBlockSize(); in SICBlockCipher() 45 return cipher; in getUnderlyingCipher() 65 cipher.init(true, ivParam.getParameters()); in init() 76 return cipher.getAlgorithmName() + "/SIC"; in getAlgorithmName() 81 return cipher.getBlockSize(); in getBlockSize() 88 cipher.processBlock(counter, 0, counterOut, 0); in processBlock() 111 cipher.reset(); in reset()
|
/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/chromium_org/third_party/libsrtp/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/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/ |
D | StreamBlockCipher.java | 10 private BlockCipher cipher; field in StreamBlockCipher 22 BlockCipher cipher) in StreamBlockCipher() argument 24 if (cipher.getBlockSize() != 1) in StreamBlockCipher() 29 this.cipher = cipher; in StreamBlockCipher() 42 cipher.init(forEncryption, params); in init() 52 return cipher.getAlgorithmName(); in getAlgorithmName() 66 cipher.processBlock(oneByte, 0, oneByte, 0); in returnByte() 96 cipher.processBlock(in, inOff + i, out, outOff + i); in processBytes() 106 cipher.reset(); in reset()
|
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() 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() 165 resultLen = cipher.processBlock(buf, 0, out, outOff); in processByte() [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/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/ppp/pppd/ |
D | pppcrypt.c | 129 DesEncrypt(clear, cipher) in DesEncrypt() argument 131 u_char *cipher; /* OUT 8 octets */ 140 Collapse(des_input, cipher); 145 DesDecrypt(cipher, clear) in DesDecrypt() argument 146 u_char *cipher; /* IN 8 octets */ in DesDecrypt() 151 Expand(cipher, des_input); 174 DesEncrypt(clear, cipher) in DesEncrypt() argument 176 u_char *cipher; /* OUT 8 octets */ 178 des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, 184 DesDecrypt(cipher, clear) in DesDecrypt() argument [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/ |
D | CipherSpi.java | 44 private AsymmetricBlockCipher cipher; field in CipherSpi 54 cipher = engine; in CipherSpi() 77 cipher = engine; in CipherSpi() 92 …cipher = new OAEPEncoding(new RSABlindedEngine(), digest, ((PSource.PSpecified)pSpec.getPSource())… in initFromSpec() 100 return cipher.getInputBlockSize(); in engineGetBlockSize() 132 return cipher.getOutputBlockSize(); in engineGetOutputSize() 196 cipher = new RSABlindedEngine(); in engineSetPadding() 200 cipher = new PKCS1Encoding(new RSABlindedEngine()); in engineSetPadding() 309 …cipher = new OAEPEncoding(new RSABlindedEngine(), digest, mgfDigest, ((PSource.PSpecified)spec.get… in engineInit() 317 if (!(cipher instanceof RSABlindedEngine)) in engineInit() [all …]
|
/external/openssl/crypto/asn1/ |
D | x_pkey.c | 82 ret->cipher.cipher=EVP_get_cipherbyname( in d2i_X509_PKEY() 84 if (ret->cipher.cipher == NULL) in d2i_X509_PKEY() 99 memcpy(ret->cipher.iv, in d2i_X509_PKEY() 103 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); in d2i_X509_PKEY() 120 ret->cipher.cipher=NULL; in X509_PKEY_new() 121 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); in X509_PKEY_new()
|
/external/chromium_org/third_party/boringssl/src/crypto/x509/ |
D | x_pkey.c | 84 ret->cipher.cipher=NULL; in d2i_X509_PKEY() 90 if (ret->cipher.cipher == NULL) in d2i_X509_PKEY() 105 memcpy(ret->cipher.iv, in d2i_X509_PKEY() 109 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); in d2i_X509_PKEY() 126 ret->cipher.cipher=NULL; in X509_PKEY_new() 127 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); in X509_PKEY_new()
|
/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()
|