Home | History | Annotate | Download | only in ocb

Lines Matching refs:ocb

14    OCB implementation, encrypt data, by Tom St Denis
21 Encrypt a block of data with OCB.
22 @param ocb The OCB state
27 int ocb_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned char *ct)
32 LTC_ARGCHK(ocb != NULL);
35 if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) {
38 if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) {
43 for (x = 0; x < ocb->block_len; x++) {
44 ocb->checksum[x] ^= pt[x];
48 ocb_shift_xor(ocb, Z);
51 for (x = 0; x < ocb->block_len; x++) {
54 if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(tmp, ct, &ocb->key)) != CRYPT_OK) {
57 for (x = 0; x < ocb->block_len; x++) {
70 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_encrypt.c,v $ */