cmac-sm4 & xcbc-sm4 issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
   On switching to Linux 6.16-rc1 for my SPAcc driver testing. I see
below failures in CMAC(SM4) & XCBC(SM4).

alg: hash: failed to allocate transform for spacc-xcbc(sm4): -22
alg: hash: failed to allocate transform for spacc-cmac(sm4): -22
alg: self-tests for xcbc(sm4) using spacc-xcbc(sm4) failed (rc=-22)
alg: self-tests for cmac(sm4) using spacc-cmac(sm4) failed (rc=-22)

On cat /proc/crypto, I dont see the CMAC(SM4-generic) &
XCBC(SM4-generic) ciphers listed in spite of me enabling SM4 support
in the kernel config. Am I missing something?

To test, I found a work around by doing a dummy transform alloc (&
freeing it) for CMAC(SM4)/XCBC(SM4) using
    struct crypto_ahash *tfm = crypto_alloc_ahash("cmac(sm4)", 0, 0);
The above call registers cmac(sm4-generic) & xcbc(sm4-generic), which
gets things working for the SM4 ciphers on hardware. That happens
because the generic ciphers get registered after dummy transform
alloc.

Appreciate some help on this.

Warm regards,
PK




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux