* Erik Lotspeich | 2009-06-16 11:47:15 [-0500]: >Hi, Hi, > >I have a question about the meaning of the error codes returned by the >Linux kernel crypto API. In particular, I am interested in the codes >returned by crypto_ablkcipher_encrypt() & crypto_ablkcipher_decrypt(). >I am receiving a return value of 22 from crypto_ablkcipher_encrypt. I I thing you mean -22 and that one means | #define EINVAL 22 /* Invalid argument */ You can look them up in include/asm-generic/errno-base.h _or_ strerror() in userland. >would like to find what this means. I don't get this error code >consistently, so I'm trying to find out if I am using the API >incorrectly; I'm using the test code, tcrypt.c, as a guide. So you are using an older kernel. Starting with v2.6.28 that part of tcrypt moved to test_skcipher() in crypto/testmgr.c. Hoewever, the logic as it did not change. >I looked through the source, but it was not obvious in the code where >these error codes were coming from; I did not see them enumerated in a >header file either. It besically depends on the algorithm you are using. So in case of cbc(aes) you go through crypto_ablkcipher_encrypt -> crypto_cbc_encrypt -> aes_encrypt plus a little API in between tof those calls. >Any help would be greatly appreciated. I guess the number of bytes to decrypt/encrypt ist not always a modulos of the blockmode. >Regards, > >Erik Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html