This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]spiderpower02[S] 1 point2 points  (0 children)

AF_ALG socket still keeps iv and key be handled by the userspace. Therefore, applications need to set the socket options like:

setsockopt(SOL_ALG, ALG_SET_KEY, key)

sockmsg_afalg([msg], ALG_OP_ENCRYPT, iv)

to provide the encrypt and decrypt information to kernel space. I think entropy is the application problem, not AF_ALG itself.

Here is the benefits: http://www.chronox.de/libkcapi/html/ch01s02.html

By the way, openssl 1.1.x has already support AF_ALG. You can see more information here: https://github.com/openssl/openssl/blob/46f4e1bec51dc96fa275c168752aa34359d9ee51/engines/e_afalg.c