/external/dropbear/libtomcrypt/src/modes/cbc/ |
H A D | cbc_getiv.c | 15 CBC implementation, get IV, Tom St Denis 22 @param IV [out] The destination of the initial vector 27 int cbc_getiv(unsigned char *IV, unsigned long *len, symmetric_CBC *cbc) argument 29 LTC_ARGCHK(IV != NULL); 36 XMEMCPY(IV, cbc->IV, cbc->blocklen);
|
H A D | cbc_setiv.c | 15 CBC implementation, set IV, Tom St Denis 23 @param IV The initial vector 28 int cbc_setiv(const unsigned char *IV, unsigned long len, symmetric_CBC *cbc) argument 30 LTC_ARGCHK(IV != NULL); 35 XMEMCPY(cbc->IV, IV, len);
|
H A D | cbc_start.c | 23 @param IV The initial vector 30 int cbc_start(int cipher, const unsigned char *IV, const unsigned char *key, argument 35 LTC_ARGCHK(IV != NULL); 49 /* copy IV */ 53 cbc->IV[x] = IV[x];
|
/external/dropbear/libtomcrypt/src/modes/cfb/ |
H A D | cfb_getiv.c | 15 CFB implementation, get IV, Tom St Denis 22 @param IV [out] The destination of the initial vector 27 int cfb_getiv(unsigned char *IV, unsigned long *len, symmetric_CFB *cfb) argument 29 LTC_ARGCHK(IV != NULL); 36 XMEMCPY(IV, cfb->IV, cfb->blocklen);
|
H A D | cfb_setiv.c | 15 CFB implementation, set IV, Tom St Denis 22 @param IV The initial vector 27 int cfb_setiv(const unsigned char *IV, unsigned long len, symmetric_CFB *cfb) argument 31 LTC_ARGCHK(IV != NULL); 44 return cipher_descriptor[cfb->cipher].ecb_encrypt(IV, cfb->IV, &cfb->key);
|
H A D | cfb_start.c | 24 @param IV The initial vector 31 int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key, argument 36 LTC_ARGCHK(IV != NULL); 49 cfb->IV[x] = IV[x]; 56 /* encrypt the IV */ 58 return cipher_descriptor[cfb->cipher].ecb_encrypt(cfb->IV, cfb->IV, &cfb->key);
|
/external/dropbear/libtomcrypt/src/modes/ctr/ |
H A D | ctr_getiv.c | 15 CTR implementation, get IV, Tom St Denis 22 @param IV [out] The destination of the initial vector 27 int ctr_getiv(unsigned char *IV, unsigned long *len, symmetric_CTR *ctr) argument 29 LTC_ARGCHK(IV != NULL); 36 XMEMCPY(IV, ctr->ctr, ctr->blocklen);
|
H A D | ctr_setiv.c | 15 CTR implementation, set IV, Tom St Denis 22 @param IV The initial vector 27 int ctr_setiv(const unsigned char *IV, unsigned long len, symmetric_CTR *ctr) argument 31 LTC_ARGCHK(IV != NULL); 43 /* set IV */ 44 XMEMCPY(ctr->ctr, IV, len); 48 return cipher_descriptor[ctr->cipher].ecb_encrypt(IV, ctr->pad, &ctr->key);
|
H A D | ctr_start.c | 24 @param IV The initial vector 33 const unsigned char *IV, 40 LTC_ARGCHK(IV != NULL); 60 ctr->ctr[x] = IV[x]; 64 /* increment the IV as per RFC 3686 */ 32 ctr_start( int cipher, const unsigned char *IV, const unsigned char *key, int keylen, int num_rounds, int ctr_mode, symmetric_CTR *ctr) argument
|
/external/dropbear/libtomcrypt/src/modes/f8/ |
H A D | f8_getiv.c | 15 F8 implementation, get IV, Tom St Denis 22 @param IV [out] The destination of the initial vector 27 int f8_getiv(unsigned char *IV, unsigned long *len, symmetric_F8 *f8) argument 29 LTC_ARGCHK(IV != NULL); 36 XMEMCPY(IV, f8->IV, f8->blocklen);
|
H A D | f8_setiv.c | 15 F8 implementation, set IV, Tom St Denis 22 @param IV The initial vector 27 int f8_setiv(const unsigned char *IV, unsigned long len, symmetric_F8 *f8) argument 31 LTC_ARGCHK(IV != NULL); 44 return cipher_descriptor[f8->cipher].ecb_encrypt(IV, f8->IV, &f8->key);
|
H A D | f8_start.c | 24 @param IV The initial vector 27 @param salt_key The salting key for the IV 33 int f8_start( int cipher, const unsigned char *IV, argument 41 LTC_ARGCHK(IV != NULL); 74 /* now encrypt with tkey[0..keylen-1] the IV and use that as the IV */ 79 /* encrypt IV */ 80 if ((err = cipher_descriptor[f8->cipher].ecb_encrypt(IV, f8->MIV, &f8->key)) != CRYPT_OK) { 85 zeromem(f8->IV, sizeof(f8->IV)); [all...] |
/external/dropbear/libtomcrypt/src/modes/lrw/ |
H A D | lrw_getiv.c | 15 LRW_MODE implementation, Retrieve the current IV, Tom St Denis 21 Get the IV for LRW 22 @param IV [out] The IV, must be 16 octets 27 int lrw_getiv(unsigned char *IV, unsigned long *len, symmetric_LRW *lrw) argument 29 LTC_ARGCHK(IV != NULL); 37 XMEMCPY(IV, lrw->IV, 16);
|
H A D | lrw_setiv.c | 15 LRW_MODE implementation, Set the current IV, Tom St Denis 21 Set the IV for LRW 22 @param IV The IV, must be 16 octets 27 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw) argument 34 LTC_ARGCHK(IV != NULL); 45 /* copy the IV */ 46 XMEMCPY(lrw->IV, IV, 16); 55 XMEMCPY(T, &lrw->PC[0][IV[ [all...] |
H A D | lrw_start.c | 23 @param IV The index value, must be 128-bits 32 const unsigned char *IV, 44 LTC_ARGCHK(IV != NULL); 69 /* copy the IV and tweak */ 96 return lrw_setiv(IV, 16, lrw); 31 lrw_start( int cipher, const unsigned char *IV, const unsigned char *key, int keylen, const unsigned char *tweak, int num_rounds, symmetric_LRW *lrw) argument
|
/external/dropbear/libtomcrypt/src/modes/ofb/ |
H A D | ofb_getiv.c | 15 OFB implementation, get IV, Tom St Denis 22 @param IV [out] The destination of the initial vector 27 int ofb_getiv(unsigned char *IV, unsigned long *len, symmetric_OFB *ofb) argument 29 LTC_ARGCHK(IV != NULL); 36 XMEMCPY(IV, ofb->IV, ofb->blocklen);
|
H A D | ofb_setiv.c | 15 OFB implementation, set IV, Tom St Denis 22 @param IV The initial vector 27 int ofb_setiv(const unsigned char *IV, unsigned long len, symmetric_OFB *ofb) argument 31 LTC_ARGCHK(IV != NULL); 44 return cipher_descriptor[ofb->cipher].ecb_encrypt(IV, ofb->IV, &ofb->key);
|
H A D | ofb_start.c | 24 @param IV The initial vector 31 int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key, argument 36 LTC_ARGCHK(IV != NULL); 48 ofb->IV[x] = IV[x];
|
/external/dropbear/libtomcrypt/src/encauth/gcm/ |
H A D | gcm_add_iv.c | 14 GCM implementation, add IV data to the state, by Tom St Denis 21 Add IV data to the GCM state 23 @param IV The initial value data to add 24 @param IVlen The length of the IV 28 const unsigned char *IV, unsigned long IVlen) 35 LTC_ARGCHK(IV != NULL); 38 /* must be in IV mode */ 62 *((LTC_FAST_TYPE*)(&gcm->X[y])) ^= *((LTC_FAST_TYPE*)(&IV[x + y])); 67 IV += x; 71 /* start adding IV dat 27 gcm_add_iv(gcm_state *gcm, const unsigned char *IV, unsigned long IVlen) argument [all...] |
H A D | gcm_memory.c | 25 @param IV The initial vector 39 const unsigned char *IV, unsigned long IVlen, 58 IV, IVlen, 90 if ((err = gcm_add_iv(gcm, IV, IVlen)) != CRYPT_OK) { 37 gcm_memory( int cipher, const unsigned char *key, unsigned long keylen, const unsigned char *IV, unsigned long IVlen, const unsigned char *adata, unsigned long adatalen, unsigned char *pt, unsigned long ptlen, unsigned char *ct, unsigned char *tag, unsigned long *taglen, int direction) argument
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/ |
H A D | CBCBlockCipher.java | 15 private byte[] IV; field in class:CBCBlockCipher 34 this.IV = new byte[blockSize]; 50 * Initialise the cipher and, possibly, the initialisation vector (IV). 51 * If an IV isn't passed as part of the parameter, the IV will be all zeros. 78 System.arraycopy(iv, 0, IV, 0, iv.length); 82 // if null it's an IV changed only. 152 * reset the chaining vector back to the IV and reset the underlying 157 System.arraycopy(IV, 0, cbcV, 0, IV [all...] |
H A D | CFBBlockCipher.java | 14 private byte[] IV; field in class:CFBBlockCipher 36 this.IV = new byte[cipher.getBlockSize()]; 52 * Initialise the cipher and, possibly, the initialisation vector (IV). 53 * If an IV isn't passed as part of the parameter, the IV will be all zeros. 54 * An IV which is too short is handled in FIPS compliant fashion. 74 if (iv.length < IV.length) 76 // prepend the supplied IV with zeros (per FIPS PUB 81) 77 System.arraycopy(iv, 0, IV, IV [all...] |
H A D | OFBBlockCipher.java | 14 private byte[] IV; field in class:OFBBlockCipher 35 this.IV = new byte[cipher.getBlockSize()]; 51 * Initialise the cipher and, possibly, the initialisation vector (IV). 52 * If an IV isn't passed as part of the parameter, the IV will be all zeros. 53 * An IV which is too short is handled in FIPS compliant fashion. 71 if (iv.length < IV.length) 73 // prepend the supplied IV with zeros (per FIPS PUB 81) 74 System.arraycopy(iv, 0, IV, IV [all...] |
H A D | SICBlockCipher.java | 18 private byte[] IV; field in class:SICBlockCipher 32 this.IV = new byte[blockSize]; 58 System.arraycopy(iv, 0, IV, 0, IV.length); 62 // if null it's an IV changed only. 110 System.arraycopy(IV, 0, counter, 0, counter.length);
|
/external/dropbear/libtomcrypt/demos/ |
H A D | encrypt.c | 98 unsigned char tmpkey[512], key[MAXBLOCKSIZE], IV[MAXBLOCKSIZE]; local 167 /* Need to read in IV */ 168 if (fread(IV,1,ivsize,fdin) != ivsize) { 169 printf("Error reading IV from input.\n"); 173 if ((errno = ctr_start(cipher_idx,IV,key,ks,0,CTR_COUNTER_LITTLE_ENDIAN,&ctr)) != CRYPT_OK) { 178 /* IV done */ 196 /* Setup yarrow for random bytes for IV */ 203 /* x = rng_get_bytes(IV,ivsize,NULL);*/ 204 x = yarrow_read(IV,ivsize,&prng); 206 printf("Error reading PRNG for IV require [all...] |