/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/macs/ |
H A D | CBCBlockCipherMac.java | 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 an 39 * authentication code half the length of the block size of the cipher 31 CBCBlockCipherMac( BlockCipher cipher) argument 44 CBCBlockCipherMac( BlockCipher cipher, BlockCipherPadding padding) argument 64 CBCBlockCipherMac( BlockCipher cipher, int macSizeInBits) argument 85 CBCBlockCipherMac( BlockCipher cipher, int macSizeInBits, BlockCipherPadding padding) argument [all...] |
/external/fonttools/Lib/fontTools/misc/ |
H A D | 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, [all...] |
/external/fonttools/Tools/fontTools/misc/ |
H A D | 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, [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/ |
H A D | StreamBlockCipher.java | 4 * A parent class for block cipher modes that do not require block aligned data to be processed, but can function in 10 private final BlockCipher cipher; field in class:StreamBlockCipher 12 protected StreamBlockCipher(BlockCipher cipher) argument 14 this.cipher = cipher; 18 * return the underlying block cipher that we are wrapping. 20 * @return the underlying block cipher that we are wrapping. 24 return cipher;
|
H A D | 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 35 BufferedBlockCipher( BlockCipher cipher) argument [all...] |
/external/boringssl/src/crypto/cipher/test/ |
H A 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_implicit_iv_tests.txt 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_implicit_iv_tests.txt 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_implicit_iv_tests.txt 17 go run make_legacy_aead_tests.go -cipher aes12 [all...] |
/external/syslinux/gpxe/src/include/gpxe/ |
H A D | crypto.h | 47 /** A cipher algorithm */ 116 static inline int cipher_setkey ( struct cipher_algorithm *cipher, argument 118 return cipher->setkey ( ctx, key, keylen ); 121 static inline void cipher_setiv ( struct cipher_algorithm *cipher, argument 123 cipher->setiv ( ctx, iv ); 126 static inline void cipher_encrypt ( struct cipher_algorithm *cipher, argument 129 cipher->encrypt ( ctx, src, dst, len ); 131 #define cipher_encrypt( cipher, ctx, src, dst, len ) do { \ 132 assert ( ( (len) & ( (cipher)->blocksize - 1 ) ) == 0 ); \ 133 cipher_encrypt ( (cipher), (ct 136 cipher_decrypt( struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len ) argument [all...] |
/external/boringssl/src/crypto/cipher/ |
H A D | cipher.c | 57 #include <openssl/cipher.h> 104 if (c->cipher != NULL) { 105 if (c->cipher->cleanup) { 106 c->cipher->cleanup(c); 108 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); 124 if (in == NULL || in->cipher == NULL) { 132 if (in->cipher_data && in->cipher->ctx_size) { 133 out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); 135 out->cipher = NULL; 139 OPENSSL_memcpy(out->cipher_data, in->cipher_data, in->cipher 152 EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, const uint8_t *key, const uint8_t *iv, int enc) argument 249 EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const uint8_t *key, const uint8_t *iv) argument 254 EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const uint8_t *key, const uint8_t *iv) argument 590 EVP_CIPHER_nid(const EVP_CIPHER *cipher) argument 592 EVP_CIPHER_block_size(const EVP_CIPHER *cipher) argument 596 EVP_CIPHER_key_length(const EVP_CIPHER *cipher) argument 600 EVP_CIPHER_iv_length(const EVP_CIPHER *cipher) argument 604 EVP_CIPHER_flags(const EVP_CIPHER *cipher) argument 608 EVP_CIPHER_mode(const EVP_CIPHER *cipher) argument 612 EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv, int enc) argument 620 EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv) argument 625 EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv) argument [all...] |
/external/wycheproof/java/com/google/security/wycheproof/testcases/ |
H A D | AesGcmTest.java | 136 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); 137 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); 150 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); 151 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); 152 cipher.updateAAD(test.aad); 153 byte[] ct = cipher.doFinal(test.pt); 171 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); 172 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); 173 byte[] c0 = cipher.update(test.pt); 175 cipher [all...] |
H A D | AesEaxTest.java | 259 Cipher cipher = Cipher.getInstance("AES/EAX/NoPadding"); 260 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); 261 cipher.updateAAD(test.aad); 262 byte[] ct = cipher.doFinal(test.pt); 269 Cipher cipher = Cipher.getInstance("AES/EAX/NoPadding"); 270 cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); 271 byte[] c0 = cipher.update(test.pt); 273 cipher.updateAAD(test.aad); 280 byte[] c1 = cipher.doFinal();
|
H A D | CipherOutputStreamTest.java | 72 Cipher cipher = Cipher.getInstance(algorithm); 73 cipher.init(Cipher.ENCRYPT_MODE, this.key, this.params); 74 cipher.updateAAD(aad); 75 this.ct = cipher.doFinal(pt); 105 Cipher cipher = Cipher.getInstance(t.algorithm); 106 cipher.init(Cipher.ENCRYPT_MODE, t.key, t.params); 107 cipher.updateAAD(t.aad); 109 CipherOutputStream cos = new CipherOutputStream(os, cipher); 119 Cipher cipher = Cipher.getInstance(t.algorithm); 120 cipher [all...] |
/external/ppp/pppd/ |
H A D | pppcrypt.c | 148 DesEncrypt(clear, cipher) 150 u_char *cipher; /* OUT 8 octets */ 159 Collapse(des_input, cipher); 164 DesDecrypt(cipher, clear) 165 u_char *cipher; /* IN 8 octets */ 170 Expand(cipher, des_input); 193 DesEncrypt(clear, cipher) 195 u_char *cipher; /* OUT 8 octets */ 197 DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, 203 DesDecrypt(cipher, clea [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/ |
H A D | 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. 42 * @return the underlying block cipher tha 28 CBCBlockCipher( BlockCipher cipher) argument [all...] |
H A D | OFBBlockCipher.java | 10 * implements a Output-FeedBack (OFB) mode on top of a simple cipher. 21 private final BlockCipher cipher; field in class:OFBBlockCipher 26 * @param cipher the block cipher to be used as the basis of the 31 BlockCipher cipher, 34 super(cipher); 36 this.cipher = cipher; 39 this.IV = new byte[cipher.getBlockSize()]; 40 this.ofbV = new byte[cipher 30 OFBBlockCipher( BlockCipher cipher, int blockSize) argument [all...] |
H A D | CTSBlockCipher.java | 10 * A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to 11 * be used to produce cipher text which is the same length as the plain text. 19 * Create a buffered block cipher that uses Cipher Text Stealing 21 * @param cipher the underlying block cipher this buffering object wraps. 24 BlockCipher cipher) 26 if (cipher instanceof StreamBlockCipher) 31 this.cipher = cipher; 33 blockSize = cipher 23 CTSBlockCipher( BlockCipher cipher) argument [all...] |
H A D | CFBBlockCipher.java | 11 * implements a Cipher-FeedBack (CFB) mode on top of a simple cipher. 22 private BlockCipher cipher = null; field in class:CFBBlockCipher 29 * @param cipher the block cipher to be used as the basis of the 34 BlockCipher cipher, 37 super(cipher); 39 this.cipher = cipher; 42 this.IV = new byte[cipher.getBlockSize()]; 43 this.cfbV = new byte[cipher 33 CFBBlockCipher( BlockCipher cipher, int bitBlockSize) argument [all...] |
/external/boringssl/src/ssl/ |
H A D | ssl_cipher.c | 112 * ECC cipher suite support in OpenSSL originally developed by 282 /* PSK cipher suites. */ 527 /* ECDHE-PSK cipher suites. */ 551 /* ChaCha20-Poly1305 cipher suites. */ 597 const SSL_CIPHER *cipher; member in struct:cipher_order_st 604 /* name is the name of the cipher alias. */ 608 * |SSL_CIPHER|. A cipher matches a cipher alias iff, for each bitmask, the 609 * bit corresponding to the cipher's value is set to 1. If any bitmask is 712 const SSL_CIPHER *cipher, uint16_ 709 ssl_cipher_get_evp_aead(const EVP_AEAD **out_aead, size_t *out_mac_secret_len, size_t *out_fixed_iv_len, const SSL_CIPHER *cipher, uint16_t version) argument 874 const SSL_CIPHER *cipher = &kCiphers[i]; local 1194 const SSL_CIPHER *cipher = &kCiphers[j]; local 1430 SSL_CIPHER_get_id(const SSL_CIPHER *cipher) argument 1432 ssl_cipher_get_value(const SSL_CIPHER *cipher) argument 1439 SSL_CIPHER_is_AES(const SSL_CIPHER *cipher) argument 1443 SSL_CIPHER_has_SHA1_HMAC(const SSL_CIPHER *cipher) argument 1447 SSL_CIPHER_has_SHA256_HMAC(const SSL_CIPHER *cipher) argument 1451 SSL_CIPHER_is_AEAD(const SSL_CIPHER *cipher) argument 1455 SSL_CIPHER_is_AESGCM(const SSL_CIPHER *cipher) argument 1459 SSL_CIPHER_is_AES128GCM(const SSL_CIPHER *cipher) argument 1463 SSL_CIPHER_is_AES128CBC(const SSL_CIPHER *cipher) argument 1467 SSL_CIPHER_is_AES256CBC(const SSL_CIPHER *cipher) argument 1471 SSL_CIPHER_is_CHACHA20POLY1305(const SSL_CIPHER *cipher) argument 1475 SSL_CIPHER_is_NULL(const SSL_CIPHER *cipher) argument 1479 SSL_CIPHER_is_block_cipher(const SSL_CIPHER *cipher) argument 1484 SSL_CIPHER_is_ECDSA(const SSL_CIPHER *cipher) argument 1488 SSL_CIPHER_is_DHE(const SSL_CIPHER *cipher) argument 1492 SSL_CIPHER_is_ECDHE(const SSL_CIPHER *cipher) argument 1496 SSL_CIPHER_is_static_RSA(const SSL_CIPHER *cipher) argument 1500 SSL_CIPHER_get_min_version(const SSL_CIPHER *cipher) argument 1514 SSL_CIPHER_get_max_version(const SSL_CIPHER *cipher) argument 1523 SSL_CIPHER_get_name(const SSL_CIPHER *cipher) argument 1531 SSL_CIPHER_get_kx_name(const SSL_CIPHER *cipher) argument 1576 ssl_cipher_get_enc_name(const SSL_CIPHER *cipher) argument 1597 ssl_cipher_get_prf_name(const SSL_CIPHER *cipher) argument 1613 SSL_CIPHER_get_rfc_name(const SSL_CIPHER *cipher) argument 1651 SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *out_alg_bits) argument 1693 SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) argument 1821 SSL_CIPHER_get_version(const SSL_CIPHER *cipher) argument 1833 ssl_cipher_get_key_type(const SSL_CIPHER *cipher) argument 1845 ssl_cipher_uses_certificate_auth(const SSL_CIPHER *cipher) argument 1849 ssl_cipher_requires_server_key_exchange(const SSL_CIPHER *cipher) argument 1860 ssl_cipher_get_record_split_len(const SSL_CIPHER *cipher) argument [all...] |
/external/wpa_supplicant_8/hostapd/src/crypto/ |
H A D | aes-wrap.c | 23 * @cipher: Wrapped key, (n + 1) * 64 bits 26 int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher) argument 33 a = cipher; 34 r = cipher + 8; 52 r = cipher + 8; 71 * These are already in @cipher due to the location of temporary
|
/external/wpa_supplicant_8/src/crypto/ |
H A D | aes-wrap.c | 23 * @cipher: Wrapped key, (n + 1) * 64 bits 26 int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher) argument 33 a = cipher; 34 r = cipher + 8; 52 r = cipher + 8; 71 * These are already in @cipher due to the location of temporary
|
/external/wpa_supplicant_8/wpa_supplicant/src/crypto/ |
H A D | aes-wrap.c | 23 * @cipher: Wrapped key, (n + 1) * 64 bits 26 int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher) argument 33 a = cipher; 34 r = cipher + 8; 52 r = cipher + 8; 71 * These are already in @cipher due to the location of temporary
|
/external/ipsec-tools/src/racoon/missing/crypto/rijndael/ |
H A D | rijndael-api-fst.h | 29 #define BITSPERBLOCK 128 /* Default number of bits in a cipher block */ 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,
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/paddings/ |
H A D | 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 thi 29 PaddedBufferedBlockCipher( BlockCipher cipher, BlockCipherPadding padding) argument 45 PaddedBufferedBlockCipher( BlockCipher cipher) argument [all...] |
/external/conscrypt/openjdk-benchmarks/src/jmh/java/org/conscrypt/benchmarks/ |
H A D | SslEngineBenchmark.java | 75 SSLEngine newClientEngine(String cipher) { 76 return initEngine(clientContext.createSSLEngine(), cipher, true); 80 SSLEngine newServerEngine(String cipher) { 81 return initEngine(serverContext.createSSLEngine(), cipher, false); 97 SSLEngine newClientEngine(String cipher) { 98 return initEngine(clientContext.createSSLEngine(), cipher, true); 102 SSLEngine newServerEngine(String cipher) { 103 return initEngine(serverContext.createSSLEngine(), cipher, false); 119 SSLEngine newClientEngine(String cipher) { 121 clientContext.newEngine(UnpooledByteBufAllocator.DEFAULT), cipher, tru 131 newClientEngine(String cipher) argument 132 newServerEngine(String cipher) argument 158 @Param({"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"}) public String cipher; field in class:SslEngineBenchmark 185 newClientContext(String cipher) argument 202 newServerContext(String cipher) argument [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
H A D | BaseBlockCipher.java | 113 private GenericBlockCipher cipher; field in class:BaseBlockCipher 149 cipher = new BufferedGenericBlockCipher(engine); 166 cipher = new BufferedGenericBlockCipher(engine); 175 cipher = new BufferedGenericBlockCipher(provider.get()); 183 this.cipher = new AEADGenericBlockCipher(engine); 194 this.cipher = new AEADGenericBlockCipher(engine); 203 this.cipher = new BufferedGenericBlockCipher(engine); 213 this.cipher = new BufferedGenericBlockCipher(engine); 241 return cipher.getOutputSize(inputLen); 274 String name = cipher 1235 private BufferedBlockCipher cipher; field in class:BaseBlockCipher.BufferedGenericBlockCipher 1237 BufferedGenericBlockCipher(BufferedBlockCipher cipher) argument 1242 BufferedGenericBlockCipher(org.bouncycastle.crypto.BlockCipher cipher) argument 1247 BufferedGenericBlockCipher(org.bouncycastle.crypto.BlockCipher cipher, BlockCipherPadding padding) argument 1340 private AEADBlockCipher cipher; field in class:BaseBlockCipher.AEADGenericBlockCipher 1342 AEADGenericBlockCipher(AEADBlockCipher cipher) argument [all...] |
/external/syslinux/core/lwip/src/netif/ppp/ |
H A D | chpms.c | 170 u_char *cipher /* OUT 8 octets */) 188 Collapse(des_input, cipher); 192 cipher[0], cipher[1], cipher[2], cipher[3], cipher[4], cipher[5], cipher[6], cipher[ [all...] |