HomeSort by relevance Sort by last modified time
    Searched full:cipher (Results 1 - 25 of 538) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/
BufferedAsymmetricBlockCipher.java 4 * a buffer wrapper for an asymmetric block cipher, allowing input
12 private final AsymmetricBlockCipher cipher; field in class:BufferedAsymmetricBlockCipher
17 * @param cipher the cipher this buffering object wraps.
20 AsymmetricBlockCipher cipher)
22 this.cipher = cipher;
26 * return the underlying cipher for the buffer.
28 * @return the underlying cipher for the buffer.
32 return cipher;
    [all...]
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...]
BlockCipher.java 5 * Block cipher engines are expected to conform to this interface.
10 * Initialise the cipher.
12 * @param forEncryption if true the cipher is initialised for
14 * @param params the key and other data required by the cipher.
22 * Return the name of the algorithm the cipher implements.
24 * @return the name of the algorithm the cipher implements.
29 * Return the block size for this cipher (in bytes).
31 * @return the block size for this cipher in bytes.
45 * @exception IllegalStateException if the cipher isn't initialised.
52 * Reset the cipher. After resetting the cipher is in the same stat
    [all...]
AsymmetricBlockCipher.java 5 * base interface that a public/private key block cipher needs
11 * initialise the cipher.
13 * @param forEncryption if true the cipher is initialised for
15 * @param param the key and other data required by the cipher.
27 * returns the maximum size of the block produced by this cipher.
29 * @return maximum size of the output block produced by the cipher.
41 * @exception DataLengthException the input data is too large for the cipher.
  /dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/macs/
BlockCipherMac.java 15 private BlockCipher cipher; field in class:BlockCipherMac
20 * create a standard MAC based on a block cipher. This will produce an
21 * authentication code half the length of the block size of the cipher.
23 * @param cipher the cipher to be used as the basis of the MAC generation.
27 BlockCipher cipher)
29 this(cipher, (cipher.getBlockSize() * 8) / 2);
33 * create a standard MAC based on a block cipher with the size of the
37 * and in general should be less than the size of the block cipher as it reduce
    [all...]
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...]
CFBBlockCipherMac.java 11 * implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
20 private BlockCipher cipher = null; field in class:MacCFBBlockCipher
25 * @param cipher the block cipher to be used as the basis of the
30 BlockCipher cipher,
33 this.cipher = cipher;
36 this.IV = new byte[cipher.getBlockSize()];
37 this.cfbV = new byte[cipher.getBlockSize()]
175 private MacCFBBlockCipher cipher; field in class:CFBBlockCipherMac
    [all...]
ISO9797Alg3Mac.java 12 * DES based CBC Block Cipher MAC according to ISO9797, algorithm 3 (ANSI X9.19 Retail MAC)
25 private BlockCipher cipher; field in class:ISO9797Alg3Mac
33 * create a Retail-MAC based on a CBC block cipher. This will produce an
34 * authentication code of the length of the block size of the cipher.
36 * @param cipher the cipher to be used as the basis of the MAC generation. This must
40 BlockCipher cipher)
42 this(cipher, cipher.getBlockSize() * 8, null);
46 * create a Retail-MAC based on a CBC block cipher. This will produce a
    [all...]
  /dalvik/libcore/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
CipherTest.java 56 import javax.crypto.Cipher;
66 @TestTargetClass(Cipher.class)
97 * @tests javax.crypto.Cipher#getInstance(java.lang.String)
122 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); local
123 assertNotNull("Received a null Cipher instance", cipher);
126 Cipher.getInstance("WrongAlgorithmName");
135 * @tests javax.crypto.Cipher#getInstance(java.lang.String
168 Cipher cipher = Cipher.getInstance("DES", providers[i].getName()); local
232 Cipher cipher = Cipher.getInstance("DES", providers[i]); local
271 Cipher cipher = Cipher.getInstance("AES", provider.getName()); local
291 Cipher cipher = Cipher.getInstance(algorithm); local
317 Cipher cipher = Cipher.getInstance(algorithm); local
342 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local
372 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local
407 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local
432 Cipher cipher = null; local
491 Cipher cipher = null; local
591 Cipher cipher = Cipher.getInstance("DESEDE\/CBC\/PKCS5Padding"); local
1643 Cipher cipher = Cipher.getInstance("DESEDE\/CBC\/PKCS5Padding"); local
    [all...]
SealedObjectTest.java 42 import javax.crypto.Cipher;
55 public Mock_SealedObject(Serializable object, Cipher c)
99 * SealedObject(Serializable object, Cipher c) method testing. Tests if the
100 * NullPointerException is thrown in the case of null cipher.
105 args = {java.io.Serializable.class, javax.crypto.Cipher.class}
112 + "of null cipher.");
122 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); local
123 cipher.init(Cipher.ENCRYPT_MODE, key, ips)
157 Cipher cipher = new NullCipher(); local
185 Cipher cipher = Cipher.getInstance(algorithm); local
211 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local
261 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local
311 Cipher cipher = Cipher.getInstance("DES"); local
    [all...]
  /external/dropbear/libtomcrypt/src/modes/ecb/
ecb_start.c 23 @param cipher The index of the cipher desired
26 @param num_rounds Number of rounds in the cipher desired (0 for default)
30 int ecb_start(int cipher, const unsigned char *key, int keylen, int num_rounds, symmetric_ECB *ecb)
36 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) {
39 ecb->cipher = cipher;
40 ecb->blocklen = cipher_descriptor[cipher].block_length;
41 return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ecb->key);
ecb_decrypt.c 24 @param len The number of octets to process (must be multiple of the cipher block size)
34 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) {
37 if (len % cipher_descriptor[ecb->cipher].block_length) {
42 if (cipher_descriptor[ecb->cipher].accel_ecb_decrypt != NULL) {
43 return cipher_descriptor[ecb->cipher].accel_ecb_decrypt(ct, pt, len / cipher_descriptor[ecb->cipher].block_length, &ecb->key);
46 if ((err = cipher_descriptor[ecb->cipher].ecb_decrypt(ct, pt, &ecb->key)) != CRYPT_OK) {
49 pt += cipher_descriptor[ecb->cipher].block_length;
50 ct += cipher_descriptor[ecb->cipher].block_length;
51 len -= cipher_descriptor[ecb->cipher].block_length
    [all...]
ecb_encrypt.c 24 @param len The number of octets to process (must be multiple of the cipher block size)
34 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) {
37 if (len % cipher_descriptor[ecb->cipher].block_length) {
42 if (cipher_descriptor[ecb->cipher].accel_ecb_encrypt != NULL) {
43 return cipher_descriptor[ecb->cipher].accel_ecb_encrypt(pt, ct, len / cipher_descriptor[ecb->cipher].block_length, &ecb->key);
46 if ((err = cipher_descriptor[ecb->cipher].ecb_encrypt(pt, ct, &ecb->key)) != CRYPT_OK) {
49 pt += cipher_descriptor[ecb->cipher].block_length;
50 ct += cipher_descriptor[ecb->cipher].block_length;
51 len -= cipher_descriptor[ecb->cipher].block_length
    [all...]
  /external/dropbear/libtomcrypt/src/mac/xcbc/
xcbc_init.c 22 @param cipher Index of cipher to use
27 int xcbc_init(xcbc_state *xcbc, int cipher, const unsigned char *key, unsigned long keylen)
36 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) {
41 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) {
52 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) {
58 for (x = 0; x < cipher_descriptor[cipher].block_length; x++) {
61 cipher_descriptor[cipher].ecb_encrypt(xcbc->K[y], xcbc->K[y], skey);
65 err = cipher_descriptor[cipher].setup(xcbc->K[0], cipher_descriptor[cipher].block_length, 0, &xcbc->key)
    [all...]
  /external/dropbear/libtomcrypt/src/mac/f9/
f9_init.c 22 @param cipher Index of cipher to use
27 int f9_init(f9_state *f9, int cipher, const unsigned char *key, unsigned long keylen)
35 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) {
40 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) {
45 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &f9->key)) != CRYPT_OK) {
55 zeromem(f9->IV, cipher_descriptor[cipher].block_length);
56 zeromem(f9->ACC, cipher_descriptor[cipher].block_length);
57 f9->blocksize = cipher_descriptor[cipher].block_length;
58 f9->cipher = cipher
    [all...]
  /external/dropbear/libtomcrypt/src/modes/cfb/
cfb_start.c 23 @param cipher The index of the cipher desired
27 @param num_rounds Number of rounds in the cipher desired (0 for default)
31 int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key,
40 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) {
46 cfb->cipher = cipher;
47 cfb->blocklen = cipher_descriptor[cipher].block_length;
51 /* init the cipher */
52 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &cfb->key)) != CRYPT_OK)
    [all...]
  /external/dropbear/libtomcrypt/src/misc/crypt/
crypt_register_cipher.c 15 Register a cipher, Tom St Denis
19 Register a cipher with the descriptor table
20 @param cipher The cipher you wish to register
23 int register_cipher(const struct ltc_cipher_descriptor *cipher)
27 LTC_ARGCHK(cipher != NULL);
32 if (cipher_descriptor[x].name != NULL && cipher_descriptor[x].ID == cipher->ID) {
41 XMEMCPY(&cipher_descriptor[x], cipher, sizeof(struct ltc_cipher_descriptor));
crypt_unregister_cipher.c 15 Unregister a cipher, Tom St Denis
19 Unregister a cipher from the descriptor table
20 @param cipher The cipher descriptor to remove
23 int unregister_cipher(const struct ltc_cipher_descriptor *cipher)
27 LTC_ARGCHK(cipher != NULL);
32 if (XMEMCMP(&cipher_descriptor[x], cipher, sizeof(struct ltc_cipher_descriptor)) == 0) {
  /dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/modes/
SICBlockCipher.java 10 * block cipher. This mode is also known as CTR mode.
14 private final BlockCipher cipher; field in class:SICBlockCipher
25 * @param c the block cipher to be used.
29 this.cipher = c;
30 this.blockSize = cipher.getBlockSize();
38 * return the underlying block cipher that we are wrapping.
40 * @return the underlying block cipher that we are wrapping.
44 return cipher;
60 cipher.init(true, ivParam.getParameters());
66 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)
    [all...]
CBCBlockCipher.java 9 * implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher.
19 private BlockCipher cipher = null; field in class:CBCBlockCipher
25 * @param cipher the block cipher to be used as the basis of chaining.
28 BlockCipher cipher)
30 this.cipher = cipher;
31 this.blockSize = cipher.getBlockSize();
39 * return the underlying block cipher that we are wrapping
    [all...]
CFBBlockCipher.java 9 * implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
19 private BlockCipher cipher = null; field in class:CFBBlockCipher
25 * @param cipher the block cipher to be used as the basis of the
30 BlockCipher cipher,
33 this.cipher = cipher;
36 this.IV = new byte[cipher.getBlockSize()];
37 this.cfbV = new byte[cipher.getBlockSize()]
    [all...]
  /external/dropbear/libtomcrypt/src/modes/cbc/
cbc_start.c 22 @param cipher The index of the cipher desired
26 @param num_rounds Number of rounds in the cipher desired (0 for default)
30 int cbc_start(int cipher, const unsigned char *IV, const unsigned char *key,
40 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) {
44 /* setup cipher */
45 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &cbc->key)) != CRYPT_OK) {
50 cbc->blocklen = cipher_descriptor[cipher].block_length;
51 cbc->cipher = cipher;
    [all...]
  /external/dropbear/libtomcrypt/src/modes/ofb/
ofb_start.c 23 @param cipher The index of the cipher desired
27 @param num_rounds Number of rounds in the cipher desired (0 for default)
31 int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key,
40 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) {
45 ofb->cipher = cipher;
46 ofb->blocklen = cipher_descriptor[cipher].block_length;
51 /* init the cipher */
53 return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ofb->key)
    [all...]
  /dalvik/libcore/security/src/main/java/org/bouncycastle/jce/provider/
BrokenJCEBlockCipher.java 17 import javax.crypto.Cipher;
61 private BufferedBlockCipher cipher; field in class:BrokenJCEBlockCipher
76 cipher = new PaddedBufferedBlockCipher(engine);
86 cipher = new PaddedBufferedBlockCipher(engine);
96 return cipher.getBlockSize();
113 return cipher.getOutputSize(inputLen);
122 String name = cipher.getUnderlyingCipher().getAlgorithmName();
152 cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher());
156 ivLength = cipher.getUnderlyingCipher().getBlockSize()
    [all...]

Completed in 392 milliseconds

1 2 3 4 5 6 7 8 91011>>