/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/ |
StreamBlockCipher.java | 10 private BlockCipher cipher; field in class:StreamBlockCipher 17 * @param cipher the block cipher to be wrapped. 18 * @exception IllegalArgumentException if the cipher has a block size other than 22 BlockCipher cipher) 24 if (cipher.getBlockSize() != 1) 26 throw new IllegalArgumentException("block cipher block size != 1."); 29 this.cipher = cipher; 33 * initialise the underlying cipher [all...] |
BufferedBlockCipher.java | 9 * Note: in the case where the underlying cipher is either a CFB cipher or an 18 protected BlockCipher cipher; field in class:BufferedBlockCipher 31 * Create a buffered block cipher without padding. 33 * @param cipher the underlying block cipher this buffering object wraps. 36 BlockCipher cipher) 38 this.cipher = cipher; 40 buf = new byte[cipher.getBlockSize()] [all...] |
/external/chromium_org/third_party/libsrtp/srtp/doc/ |
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) [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/macs/ |
CBCBlockCipherMac.java | 10 * standard CBC Block Cipher MAC - if no padding is specified the default of 20 private BlockCipher cipher; field in class:CBCBlockCipherMac 26 * create a standard MAC based on a CBC block cipher. This will produce an 27 * authentication code half the length of the block size of the cipher. 29 * @param cipher the cipher to be used as the basis of the MAC generation. 32 BlockCipher cipher) 34 this(cipher, (cipher.getBlockSize() * 8) / 2, null); 38 * create a standard MAC based on a CBC block cipher. This will produce a [all...] |
/external/fonttools/Lib/fontTools/misc/ |
eexec.py | 8 def _decryptChar(cipher, R): 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 [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/ |
SICBlockCipher.java | 10 * block cipher. This mode is also known as CTR mode. 15 private final BlockCipher cipher; field in class:SICBlockCipher 26 * @param c the block cipher to be used. 30 this.cipher = c; 31 this.blockSize = cipher.getBlockSize(); 39 * return the underlying block cipher that we are wrapping. 41 * @return the underlying block cipher that we are wrapping. 45 return cipher; 65 cipher.init(true, ivParam.getParameters()); 76 return cipher.getAlgorithmName() + "/SIC" [all...] |
CTSBlockCipher.java | 9 * A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to 10 * be used to produce cipher text which is the same length as the plain text. 18 * Create a buffered block cipher that uses Cipher Text Stealing 20 * @param cipher the underlying block cipher this buffering object wraps. 23 BlockCipher cipher) 25 if ((cipher instanceof OFBBlockCipher) || (cipher instanceof CFBBlockCipher) || (cipher instanceof SICBlockCipher) [all...] |
CBCBlockCipher.java | 10 * implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher. 20 private BlockCipher cipher = null; field in class:CBCBlockCipher 26 * @param cipher the block cipher to be used as the basis of chaining. 29 BlockCipher cipher) 31 this.cipher = cipher; 32 this.blockSize = cipher.getBlockSize(); 40 * return the underlying block cipher that we are wrapping [all...] |
OFBBlockCipher.java | 9 * implements a Output-FeedBack (OFB) mode on top of a simple cipher. 19 private final BlockCipher cipher; field in class:OFBBlockCipher 24 * @param cipher the block cipher to be used as the basis of the 29 BlockCipher cipher, 32 this.cipher = cipher; 35 this.IV = new byte[cipher.getBlockSize()]; 36 this.ofbV = new byte[cipher.getBlockSize()]; 37 this.ofbOutV = new byte[cipher.getBlockSize()] [all...] |
CFBBlockCipher.java | 10 * implements a Cipher-FeedBack (CFB) mode on top of a simple cipher. 20 private BlockCipher cipher = null; field in class:CFBBlockCipher 26 * @param cipher the block cipher to be used as the basis of the 31 BlockCipher cipher, 34 this.cipher = cipher; 37 this.IV = new byte[cipher.getBlockSize()]; 38 this.cfbV = new byte[cipher.getBlockSize()] [all...] |
/external/chromium_org/third_party/boringssl/src/crypto/cipher/ |
cipher.c | 57 #include <openssl/cipher.h> 96 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, 98 if (cipher) { 101 return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); 105 if (c->cipher != NULL && c->cipher->cleanup && !c->cipher->cleanup(c)) { 110 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); 126 if (in == NULL || in->cipher == NULL) { 127 OPENSSL_PUT_ERROR(CIPHER, EVP_CIPHER_CTX_copy, CIPHER_R_INPUT_NOT_INITIALIZED) [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
BaseBlockCipher.java | 15 import javax.crypto.Cipher; 102 private GenericBlockCipher cipher; field in class:BaseBlockCipher 134 cipher = new BufferedGenericBlockCipher(engine); 143 cipher = new BufferedGenericBlockCipher(provider.get()); 151 cipher = new AEADGenericBlockCipher(engine); 160 this.cipher = new BufferedGenericBlockCipher(engine); 170 this.cipher = new BufferedGenericBlockCipher(engine); 198 return cipher.getOutputSize(inputLen); 219 String name = cipher.getUnderlyingCipher().getAlgorithmName(); 262 cipher = new BufferedGenericBlockCipher(baseEngine) 944 private BufferedBlockCipher cipher; field in class:BaseBlockCipher.BufferedGenericBlockCipher 1016 private AEADBlockCipher cipher; field in class:BaseBlockCipher.AEADGenericBlockCipher [all...] |
/external/apache-harmony/crypto/src/test/api/java.injected/javax/crypto/ |
SealedObjectTest.java | 31 import javax.crypto.Cipher; 71 * SealedObject(Serializable object, Cipher c) method testing. Tests if the 72 * NullPointerException is thrown in the case of null cipher. 79 + "of null cipher."); 97 Cipher cipher = new NullCipher(); local 98 SealedObject so1 = new SealedObject(secret, cipher); 103 .getObject(cipher)); 111 * corresponding value of Cipher object. 119 Cipher cipher = Cipher.getInstance(algorithm) local 139 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local 174 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local 212 Cipher cipher = Cipher.getInstance("DES"); local [all...] |
/external/openssl/crypto/evp/ |
evp_lib.c | 68 if (c->cipher->set_asn1_parameters != NULL) 69 ret=c->cipher->set_asn1_parameters(c,type); 70 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) 81 if (c->cipher->get_asn1_parameters != NULL) 82 ret=c->cipher->get_asn1_parameters(c,type); 83 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) 122 /* Convert the various cipher NIDs and dummies to a proper OID NID */ 188 return ctx->cipher->block_size; 193 return ctx->cipher->do_cipher(ctx,out,in,inl); 198 return ctx->cipher; [all...] |
evp_enc.c | 76 #define M_do_cipher(ctx, out, in, inl) ctx->cipher->do_cipher(ctx, out, in, inl) 85 /* ctx->cipher=NULL; */ 96 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, 99 if (cipher) 101 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); 104 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, 120 if (ctx->engine && ctx->cipher && (!cipher || 121 (cipher && (cipher->nid == ctx->cipher->nid))) [all...] |
evp_test.c | 146 printf("Testing cipher %s%s\n",EVP_CIPHER_name(c), 244 static int test_cipher(const char *cipher,const unsigned char *key,int kn, 252 c=EVP_get_cipherbyname(cipher); 359 * It'll prevent ENGINEs being ENGINE_init()ialised for cipher/digest use if 368 char *cipher; local 378 cipher=sstrsep(&p,":"); 396 if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec) 397 && !test_digest(cipher,plaintext,pn,ciphertext,cn)) 400 if (strstr(cipher, "AES") == cipher) [all...] |
/external/chromium_org/net/ssl/ |
ssl_cipher_suite_names_unittest.cc | 15 const char *key_exchange, *cipher, *mac; local 18 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0xc001); 20 EXPECT_STREQ("NULL", cipher); 24 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0x009f); 26 EXPECT_STREQ("AES_256_GCM", cipher); 30 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0xff31); 32 EXPECT_STREQ("???", cipher); 60 // Picked some random cipher suites. 67 // Non-existent cipher suite.
|
/external/apache-harmony/crypto/src/test/impl/java/org/apache/harmony/crypto/tests/javax/crypto/ |
Cipher_Impl1Test.java | 25 import javax.crypto.Cipher; 46 * @tests javax.crypto.Cipher#getIV() 47 * @tests javax.crypto.Cipher#init(int, java.security.Key, 57 Cipher cipher = null; local 64 cipher = Cipher.getInstance(algorithm + "/CBC/PKCS5Padding"); 65 cipher.init(Cipher.ENCRYPT_MODE, cipherKey, ap); 67 byte[] cipherIV = cipher.getIV() 85 Cipher cipher = null; local [all...] |
/external/ipsec-tools/src/racoon/missing/crypto/rijndael/ |
rijndael-api-fst.h | 29 #define BITSPERBLOCK 128 /* Default number of bits in a cipher block */ 36 #define BAD_CIPHER_STATE -5 /* Cipher in wrong state (e.g., not initialized) */ 67 /* The structure for cipher information */ 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,
|
rijndael-api-fst.c | 79 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) { 81 cipher->mode = mode; 86 bcopy(IV, cipher->IV, MAX_IV_SIZE); 88 bzero(cipher->IV, MAX_IV_SIZE); 93 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, 98 if (cipher == NULL || 109 switch (cipher->mode) { 120 bcopy(cipher->IV, block, 16); 127 ((word32*)block)[0] = ((word32*)cipher->IV)[0] ^ ((word32*)input)[0]; 128 ((word32*)block)[1] = ((word32*)cipher->IV)[1] ^ ((word32*)input)[1] [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/paddings/ |
PaddedBufferedBlockCipher.java | 24 * Create a buffered block cipher with the desired padding. 26 * @param cipher the underlying block cipher this buffering object wraps. 30 BlockCipher cipher, 33 this.cipher = cipher; 36 buf = new byte[cipher.getBlockSize()]; 41 * Create a buffered block cipher PKCS7 padding 43 * @param cipher the underlying block cipher this buffering object wraps [all...] |
/external/chromium_org/third_party/boringssl/src/crypto/x509/ |
x_pkey.c | 84 ret->cipher.cipher=NULL; 87 /*ret->cipher.cipher=EVP_get_cipherbyname( 90 if (ret->cipher.cipher == NULL) 105 memcpy(ret->cipher.iv, 109 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); 126 ret->cipher.cipher=NULL [all...] |
/external/openssl/crypto/asn1/ |
x_pkey.c | 82 ret->cipher.cipher=EVP_get_cipherbyname( 84 if (ret->cipher.cipher == NULL) 99 memcpy(ret->cipher.iv, 103 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH); 120 ret->cipher.cipher=NULL; 121 memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH);
|
/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/ |
CipherTest.java | 33 import javax.crypto.Cipher; 62 * @tests javax.crypto.Cipher#getInstance(java.lang.String) 65 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); local 66 assertNotNull("Received a null Cipher instance", cipher); 70 * @tests javax.crypto.Cipher#getInstance(java.lang.String, 76 Provider[] providers = Security.getProviders("Cipher.DES"); 78 assertNotNull("No installed providers support Cipher.DES", providers) 81 Cipher cipher = Cipher.getInstance("DES", providers[i].getName()); local 122 Cipher cipher = Cipher.getInstance("DES", providers[i]); local 138 Cipher cipher = Cipher.getInstance("AES", provider.getName()); local 152 Cipher cipher = Cipher.getInstance(algorithm); local 163 Cipher cipher = Cipher.getInstance(algorithm); local 173 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 189 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 200 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 211 Cipher cipher = null; local 237 Cipher cipher = null; local [all...] |
/external/openssl/crypto/pkcs12/ |
p12_crpt.c | 70 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de) 96 iter, EVP_CIPHER_key_length(cipher), key, md)) { 102 iter, EVP_CIPHER_iv_length(cipher), iv, md)) { 108 ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de);
|