We are writing a device driver with kernel v3.14, and trying to encrypt some 
data using the Linux kernel algorithm “cbc(aes)”. Our /proc/crypto shows the 
following is loaded: driver “cbc-aes-aesni”, module “aesni_intel”, and type 
“ablkcipher”. But crypto_has_alg() gives us an error indicating the algo is not 
loaded. So knowing we have the algo string correct, most likely the problem is 
with the two other input variables: mask or type.
 
Since AESNI is in use, we have a decent guess at the types by looking at the 
.cra_flags field in aensi-Intel_glue.c (which has “CRYPTO_ALG_TYPE_ABLKCIPHER | 
CRYPTO_ALG_ASYNC”). That leaves just a few mask fields to guess at, but 
CRYPTO_ALG_TYPE_BLKCIPHER_MASK and CRYPTO_ALG_TYPE_MASK don’t work (not does 
OR’ing them together). 

What are the correct mask and type values for AESNI, and can you point me to 
any documentation? What else might we be doing wrong? Is /proc/crypto giving us 
relevant information? Thanks,

Michael McKay
mmc...@vmware.com


Reply via email to