HomeSort by relevance Sort by last modified time
    Searched refs:IV (Results 1 - 25 of 110) sorted by null

1 2 3 4 5

  /external/dropbear/libtomcrypt/src/modes/cbc/
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)
29 LTC_ARGCHK(IV != NULL);
36 XMEMCPY(IV, cbc->IV, cbc->blocklen);
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)
30 LTC_ARGCHK(IV != NULL);
35 XMEMCPY(cbc->IV, IV, len);
cbc_start.c 23 @param IV The initial vector
30 int cbc_start(int cipher, const unsigned char *IV, const unsigned char *key,
35 LTC_ARGCHK(IV != NULL);
49 /* copy IV */
53 cbc->IV[x] = IV[x];
cbc_encrypt.c 42 if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV)) {
56 return cipher_descriptor[cbc->cipher].accel_cbc_encrypt(pt, ct, len / cbc->blocklen, cbc->IV, &cbc->key);
59 /* xor IV against plaintext */
62 *((LTC_FAST_TYPE*)((unsigned char *)cbc->IV + x)) ^= *((LTC_FAST_TYPE*)((unsigned char *)pt + x));
66 cbc->IV[x] ^= pt[x];
71 if ((err = cipher_descriptor[cbc->cipher].ecb_encrypt(cbc->IV, ct, &cbc->key)) != CRYPT_OK) {
75 /* store IV [ciphertext] for a future block */
78 *((LTC_FAST_TYPE*)((unsigned char *)cbc->IV + x)) = *((LTC_FAST_TYPE*)((unsigned char *)ct + x));
82 cbc->IV[x] = ct[x];
  /external/dropbear/libtomcrypt/src/modes/cfb/
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)
29 LTC_ARGCHK(IV != NULL);
36 XMEMCPY(IV, cfb->IV, cfb->blocklen);
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)
31 LTC_ARGCHK(IV != NULL);
44 return cipher_descriptor[cfb->cipher].ecb_encrypt(IV, cfb->IV, &cfb->key);
cfb_start.c 24 @param IV The initial vector
31 int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key,
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);
cfb_decrypt.c 41 if (cfb->blocklen < 0 || cfb->blocklen > (int)sizeof(cfb->IV) ||
48 if ((err = cipher_descriptor[cfb->cipher].ecb_encrypt(cfb->pad, cfb->IV, &cfb->key)) != CRYPT_OK) {
54 *pt = *ct ^ cfb->IV[cfb->padlen];
  /external/dropbear/libtomcrypt/src/modes/f8/
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)
29 LTC_ARGCHK(IV != NULL);
36 XMEMCPY(IV, f8->IV, f8->blocklen);
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)
31 LTC_ARGCHK(IV != NULL);
44 return cipher_descriptor[f8->cipher].ecb_encrypt(IV, f8->IV, &f8->key);
f8_encrypt.c 40 if (f8->blocklen < 0 || f8->blocklen > (int)sizeof(f8->IV) ||
41 f8->padlen < 0 || f8->padlen > (int)sizeof(f8->IV)) {
49 /* xor of IV, MIV and blockcnt == what goes into cipher */
53 f8->IV[x] ^= f8->MIV[x] ^ buf[x];
55 if ((err = cipher_descriptor[f8->cipher].ecb_encrypt(f8->IV, f8->IV, &f8->key)) != CRYPT_OK) {
67 *((LTC_FAST_TYPE*)(&ct[x])) = *((LTC_FAST_TYPE*)(&pt[x])) ^ *((LTC_FAST_TYPE*)(&f8->IV[x]));
68 *((LTC_FAST_TYPE*)(&f8->IV[x])) ^= *((LTC_FAST_TYPE*)(&f8->MIV[x])) ^ *((LTC_FAST_TYPE*)(&buf[x]));
70 if ((err = cipher_descriptor[f8->cipher].ecb_encrypt(f8->IV, f8->IV, &f8->key)) != CRYPT_OK)
    [all...]
  /external/dropbear/libtomcrypt/src/modes/lrw/
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)
29 LTC_ARGCHK(IV != NULL);
37 XMEMCPY(IV, lrw->IV, 16);
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)
34 LTC_ARGCHK(IV != NULL);
45 /* copy the IV */
46 XMEMCPY(lrw->IV, IV, 16);
55 XMEMCPY(T, &lrw->PC[0][IV[0]][0], 16)
    [all...]
  /external/dropbear/libtomcrypt/src/modes/ofb/
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)
29 LTC_ARGCHK(IV != NULL);
36 XMEMCPY(IV, ofb->IV, ofb->blocklen);
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)
31 LTC_ARGCHK(IV != NULL);
44 return cipher_descriptor[ofb->cipher].ecb_encrypt(IV, ofb->IV, &ofb->key);
ofb_start.c 24 @param IV The initial vector
31 int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key,
36 LTC_ARGCHK(IV != NULL);
48 ofb->IV[x] = IV[x];
ofb_encrypt.c 39 if (ofb->blocklen < 0 || ofb->blocklen > (int)sizeof(ofb->IV) ||
40 ofb->padlen < 0 || ofb->padlen > (int)sizeof(ofb->IV)) {
46 if ((err = cipher_descriptor[ofb->cipher].ecb_encrypt(ofb->IV, ofb->IV, &ofb->key)) != CRYPT_OK) {
51 *ct++ = *pt++ ^ ofb->IV[(ofb->padlen)++];
  /external/dropbear/libtomcrypt/src/modes/ctr/
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)
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);
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)
29 LTC_ARGCHK(IV != NULL);
36 XMEMCPY(IV, ctr->ctr, ctr->blocklen);
  /external/dropbear/libtomcrypt/src/mac/f9/
f9_process.c 47 *((LTC_FAST_TYPE*)&(f9->IV[x])) ^= *((LTC_FAST_TYPE*)&(in[x]));
49 cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key);
51 *((LTC_FAST_TYPE*)&(f9->ACC[x])) ^= *((LTC_FAST_TYPE*)&(f9->IV[x]));
61 cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key);
63 f9->ACC[x] ^= f9->IV[x];
67 f9->IV[f9->buflen++] ^= *in++;
  /external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/
OFBBlockCipher.java 14 private byte[] IV;
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.
69 byte[] iv = ivParam.getIV();
71 if (iv.length < IV.length)
73 // prepend the supplied IV with zeros (per FIPS PUB 81
    [all...]
SICBlockCipher.java 18 private byte[] IV;
32 this.IV = new byte[blockSize];
57 byte[] iv = ivParam.getIV();
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/src/mac/xcbc/
xcbc_done.c 46 xcbc->IV[x] ^= xcbc->K[1][x];
49 xcbc->IV[xcbc->buflen] ^= 0x80;
52 xcbc->IV[x] ^= xcbc->K[2][x];
57 cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key);
62 out[x] = xcbc->IV[x];
xcbc_process.c 50 *((LTC_FAST_TYPE*)&(xcbc->IV[x])) ^= *((LTC_FAST_TYPE*)&(in[x]));
52 cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key);
61 cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key);
64 xcbc->IV[xcbc->buflen++] ^= *in++;
  /external/dropbear/libtomcrypt/src/encauth/gcm/
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 data to the state *
    [all...]

Completed in 348 milliseconds

1 2 3 4 5