Ferenc Rakoczi wrote: > Hi, Mark, > > I have two comments: > > 1. you don't need a loop to set the lower i bits > of a word to 1, you can use > word = (1ULL << bits) - 1 > (works for 0 <= bits <= 63 - you need a special case > for the all-1-bits case)
I like that trick! > > 2. I wouldn't be so eager to save 16 bytes from the > ctr_ctx_t type (unless the length of it is cast in stone > for some reason). My favorite solution would be to pull the > uint64_t cc_lastblock[2]; out of the common part to the > ecb_ctx_t and cbc_ctx_t types > and add uint64_t ctr_lower_mask; and uint64_t ctr_upper_mask; > to the ctr_ctx_t type (outside the common_ctx_t part) I agree - your suggestion will clean things up a bit. Thanks for your comments! > > Thanks, > Ferenc > > > On 09/02/08 21:49, mark powers wrote: >> Folks, >> >> I need a code review for >> >> 6693650 kernel implementation of AES lacks support for >64 bits long >> AES counter >> >> The webrev is at >> http://cr.opensolaris.org/~mcpowers/64_bit_counter >> >> Please comment by Tuesday, September 9. >> >> Thanks. >> >> Mark >> _______________________________________________ >> crypto-discuss mailing list >> crypto-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/crypto-discuss