CAAM Black Blob Implementation on i.MX6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAAM Black Blob Implementation on i.MX6

Jump to solution
2,078 Views
a_1359
Contributor II

Hello,

I have followed this doc:

https://www.nxp.com/docs/en/application-note/AN12714.pdf

But facing the following problem:

 

:~# caam-keygen create randomkey ecb -s 16
Unable to open device /dev/caam-keygen

 

Running the following kernel version from boundaydevices:

 

:/# uname -r
4.14.98-2.0.0_ga+yocto+gde875982909f

 

And having the following kernel configs:

 

root@marsboard:~# zcat /proc/config.gz | grep -i caam                                                                                        
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM_TK_API=y
# CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE=7
# CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST is not set
# CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO is not set
# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y

 

Just noticed that the node /dev/caam-keygen is missing and this is all that I have on the target:

 

:/# find -name "caam-keygen"  
./usr/bin/caam-keygen

 

 

Your support is appreciated!

Regards,

a_1359

0 Kudos
Reply
1 Solution
2,067 Views
a_1359
Contributor II

Due to the following reasons:


I have got it working by updating my kernel to version 5.4.x!

 

:/# find -name "caam-keygen"
./usr/bin/caam-keygen
./sys/devices/virtual/misc/caam-keygen
./sys/class/misc/caam-keygen
./dev/caam-keygen

 

 

 

:~# caam-keygen create randomkeyCCM ccm -s 24

:~# ls -al /data/caam/randomkeyCCM*
-rw-r--r-- 1 root root  56 Dec 10 20:11 /data/caam/randomkeyCCM
-rw-r--r-- 1 root root 104 Dec 10 20:11 /data/caam/randomkeyCCM.bb

:~# hexdump /data/caam/randomkeyCCM
0000000 674f 5461 0000 0000 0009 0000 0018 0000
0000010 0024 0000 0000 0000 0000 2676 c743 613c
0000020 ad0c f7f7 0cab 5feb 23f9 6523 82ed 55ac
0000030 7700 bddc 6a66 cd02                    
0000038

:~# hexdump /data/caam/randomkeyCCM.bb 
0000000 674f 5461 0000 0000 0009 0000 0018 0000
0000010 0054 0000 8a74 43ca a8c3 7533 f456 9428
0000020 edfc 026f 6d15 314b 7508 c2b0 dae8 fa5f
0000030 02bc e313 1462 470b c627 6c4a 7ef1 f290
0000040 3a2b a78f 362a 364d af7b 0839 91cf 2c93
0000050 c86d 632b 29ed 1b5e 6de2 cbeb 0001 0000
0000060 09c0 0000 0034 0000                    
0000068

 

 

 

 

 

 

 

View solution in original post

1 Reply
2,068 Views
a_1359
Contributor II

Due to the following reasons:


I have got it working by updating my kernel to version 5.4.x!

 

:/# find -name "caam-keygen"
./usr/bin/caam-keygen
./sys/devices/virtual/misc/caam-keygen
./sys/class/misc/caam-keygen
./dev/caam-keygen

 

 

 

:~# caam-keygen create randomkeyCCM ccm -s 24

:~# ls -al /data/caam/randomkeyCCM*
-rw-r--r-- 1 root root  56 Dec 10 20:11 /data/caam/randomkeyCCM
-rw-r--r-- 1 root root 104 Dec 10 20:11 /data/caam/randomkeyCCM.bb

:~# hexdump /data/caam/randomkeyCCM
0000000 674f 5461 0000 0000 0009 0000 0018 0000
0000010 0024 0000 0000 0000 0000 2676 c743 613c
0000020 ad0c f7f7 0cab 5feb 23f9 6523 82ed 55ac
0000030 7700 bddc 6a66 cd02                    
0000038

:~# hexdump /data/caam/randomkeyCCM.bb 
0000000 674f 5461 0000 0000 0009 0000 0018 0000
0000010 0054 0000 8a74 43ca a8c3 7533 f456 9428
0000020 edfc 026f 6d15 314b 7508 c2b0 dae8 fa5f
0000030 02bc e313 1462 470b c627 6c4a 7ef1 f290
0000040 3a2b a78f 362a 364d af7b 0839 91cf 2c93
0000050 c86d 632b 29ed 1b5e 6de2 cbeb 0001 0000
0000060 09c0 0000 0034 0000                    
0000068