cancel
Showing results for 
Search instead for 
Did you mean: 

How to use cryp1 and cryp2 hardware in STM32MP157C

VarunKumar
Associate II

Hi,

 

Currently I am working on how to use use cryp1 and cyp2 hardware efficiently. How to know it is using crypto hardware when working with openssl. how to check the efficiency?

Currently these configurations are enabled in my kernel.

CONFIG_CRYPTO_DEV_STM32_CRC=y
CONFIG_CRYPTO_DEV_STM32_HASH=y
CONFIG_CRYPTO_DEV_STM32_CRYP=y

 

but still I am not able see /dev/crypto dev is listed.

Currently my cat /proc/crypto output is something like this

name : cmac(aes)
driver : cmac(aes-arm)
module : cmac
priority : 200
refcnt : 4
selftest : passed
internal : no
type : shash
blocksize : 16
digestsize : 16

name : aes
driver : aes-arm
module : aes_arm
priority : 200
refcnt : 3
selftest : passed
internal : no
type : cipher
blocksize : 16
min keysize : 16
max keysize : 32

name : aes
driver : aes-generic
module : aes_generic
priority : 100
refcnt : 1
selftest : passed
internal : no
type : cipher
blocksize : 16
min keysize : 16
max keysize : 32

name : ccm(aes)
driver : stm32-ccm-aes
module : stm32_cryp
priority : 200
refcnt : 1
selftest : passed
internal : no
type : aead
async : yes
blocksize : 1
ivsize : 16
maxauthsize : 16
geniv : <none>

name : gcm(aes)
driver : stm32-gcm-aes
module : stm32_cryp
priority : 200
refcnt : 1
selftest : passed
internal : no
type : aead
async : yes
blocksize : 1
ivsize : 12
maxauthsize : 16
geniv : <none>

name : cbc(des3_ede)
driver : stm32-cbc-des3
module : stm32_cryp
priority : 1200
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 24
max keysize : 24
ivsize : 8
chunksize : 8
walksize : 8

name : ecb(des3_ede)
driver : stm32-ecb-des3
module : stm32_cryp
priority : 1200
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 24
max keysize : 24
ivsize : 0
chunksize : 8
walksize : 8

name : hmac(sha256)
driver : stm32-hmac-sha256
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 32

name : cbc(des)
driver : stm32-cbc-des
module : stm32_cryp
priority : 1200
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 8
max keysize : 8
ivsize : 8
chunksize : 8
walksize : 8

name : sha256
driver : stm32-sha256
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 32

name : ecb(des)
driver : stm32-ecb-des
module : stm32_cryp
priority : 1200
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 8
max keysize : 8
ivsize : 0
chunksize : 8
walksize : 8

name : hmac(sha224)
driver : stm32-hmac-sha224
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 28

name : ctr(aes)
driver : stm32-ctr-aes
module : stm32_cryp
priority : 1200
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 1
min keysize : 16
max keysize : 32
ivsize : 16
chunksize : 1
walksize : 1

name : sha224
driver : stm32-sha224
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 28

name : cbc(aes)
driver : stm32-cbc-aes
module : stm32_cryp
priority : 1200
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 16
min keysize : 16
max keysize : 32
ivsize : 16
chunksize : 16
walksize : 16

name : hmac(sha1)
driver : stm32-hmac-sha1
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 20

name : ecb(aes)
driver : stm32-ecb-aes
module : stm32_cryp
priority : 1200
refcnt : 2
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 16
min keysize : 16
max keysize : 32
ivsize : 0
chunksize : 16
walksize : 16

name : sha1
driver : stm32-sha1
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 20

name : hmac(md5)
driver : stm32-hmac-md5
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 16

name : md5
driver : stm32-md5
module : stm32_hash
priority : 200
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 16

name : pkcs1pad(rsa,sha256)
driver : pkcs1pad(rsa-generic,sha256)
module : kernel
priority : 100
refcnt : 1
selftest : passed
internal : no
type : akcipher

name : ecdh-nist-p384
driver : ecdh-nist-p384-generic
module : ecdh_generic
priority : 100
refcnt : 1
selftest : passed
internal : no
type : kpp

name : ecdh-nist-p256
driver : ecdh-nist-p256-generic
module : ecdh_generic
priority : 100
refcnt : 2
selftest : passed
internal : no
type : kpp

name : ecdh-nist-p192
driver : ecdh-nist-p192-generic
module : ecdh_generic
priority : 100
refcnt : 1
selftest : passed
internal : no
type : kpp

name : crc32c
driver : stm32-crc32-crc32c
module : stm32_crc32
priority : 200
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 4

how to confirm we are using stm crypto hardware and test the performance?

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @VarunKumar 

 

Same question has already been treated in this Forum. Did you try to search ? 

 

Let me know 

 

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
VarunKumar
Associate II

Hi @olivier

 

Thank you for the reply. I did went through the forum but did not get some info on how to confirm its using crypto hardware.

Can you please get me some forum links that you know so that I can refer that and check?