Computing GHASH for GCM when IV > 12 Bytes

2018-08-16 Thread Jitendra Lulla
Hi Stephen, I could not spot in the kernel where we are computing GHASH when the IV is bigger than 12 Bytes for GCM encryption. libkcapi and kernel appears to ignore the bytes beyond 12th byte in the IV. SO the o/p is same with iv=12 bytes or iv=128 bytes as can be seen below:

GCM and XTS: kcapi result not matching with NIST vectors

2018-04-22 Thread Jitendra Lulla
Hi, Consider the following 2 invocations from kcapi and the results we get from it. They are not matching with the NIST vectors [links pasted below]. Could somebody please tell why that could be happening? thanks JItendra

RE: RFC: Crypto API User-interface

2014-05-30 Thread Jitendra Lulla
Hi, http://lwn.net/Articles/410848/ The following code is taken from the above page: int main(void) { int opfd; int tfmfd; struct sockaddr_alg sa = { .salg_family = AF_ALG, .salg_type = skcipher, .salg_name = cbc(aes) }; struct msghdr msg = {}; struct cmsghdr *cmsg; char cbuf[CMSG_SPACE(4) +

RE: RFC: Crypto API User-interface

2014-04-23 Thread Jitendra Lulla
Hi, This is regarding the hash computation over a file with AF_ALG from user space. [without OpenSSL] The following link has the mail from Herbert with subject : RFC: Crypto API User-interface http://lwn.net/Articles/410848/ I was trying to take help from the code snippet he has put in his mail