Lines Matching refs:ocb
14 OCB implementation, decrypt data, by Tom St Denis
21 Decrypt a block with OCB.
22 @param ocb The OCB state
27 int ocb_decrypt(ocb_state *ocb, const unsigned char *ct, unsigned char *pt)
32 LTC_ARGCHK(ocb != NULL);
37 if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) {
40 LTC_ARGCHK(cipher_descriptor[ocb->cipher].ecb_decrypt != NULL);
43 if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) {
48 ocb_shift_xor(ocb, Z);
51 for (x = 0; x < ocb->block_len; x++) {
54 if ((err = cipher_descriptor[ocb->cipher].ecb_decrypt(tmp, pt, &ocb->key)) != CRYPT_OK) {
57 for (x = 0; x < ocb->block_len; x++) {
62 for (x = 0; x < ocb->block_len; x++) {
63 ocb->checksum[x] ^= pt[x];
77 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_decrypt.c,v $ */