On Tue, Oct 23, 2007 at 03:26:29PM -0500, Joy Latten wrote: > + unsigned int countersize; It's somewhat nicer to just use size_t in the kernel for these sorts of data types. If you care about the exact number of bytes used by the variable, types like u32 make the code more parsable. > + err = crypto_attr_u32(tb[4], &countersize); > + if (err) > + goto out_put_alg; It's also nice to have printk's along error paths. Syslogs down the road tend to be less cryptic. > - test_cipher("ctr(aes,4,8)", ENCRYPT, aes_ctr_enc_tv_template, > + test_cipher("ctr(aes,4,8,4)", ENCRYPT, aes_ctr_enc_tv_template, > AES_CTR_ENC_TEST_VECTORS); > - test_cipher("ctr(aes,4,8)", DECRYPT, aes_ctr_dec_tv_template, > + test_cipher("ctr(aes,4,8,4)", DECRYPT, aes_ctr_dec_tv_template, > AES_CTR_DEC_TEST_VECTORS); I have never been particularly thrilled about the the string-based method of parameterizing block ciphers for in-kernel API calls. Mike
Attachment:
signature.asc
Description: Digital signature