This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: AM5728 crypto accelerators

Part Number: AM5728

Hi,

I am trying to check crypto accelerators on TI-AM5728 SDK 6.03 linux referring the link:

http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto.html

I ran the command 

  • ls -l /dev/hwrng

crw------- 1 root root 10, 183 Sep 8 16:47 /dev/hwrng

  • lsmod

cryptodev 49152 0    entry is present

 

  • openssl speed -evp aes-128-cbc -engine cryptodev
    

    invalid engine "cryptodev"
    3069489168:error:25066067:DSO support routines:dlfcn_load:could not load the shared library:../openssl-1.1.1b/crypto/dso/dso_dlfcn.c:119:filename(/usr/lib/engines-1.1/cryptodev.so): /usr/lib/engines-1.1/cryptodev.so: cannot open shared object file: No such file or directory
    3069489168:error:25070067:DSO support routines:DSO_load:could not load the shared library:../openssl-1.1.1b/crypto/dso/dso_lib.c:162:
    3069489168:error:260B6084:engine routines:dynamic_load:dso not found:../openssl-1.1.1b/crypto/engine/eng_dyn.c:414:
    3069489168:error:2606A074:engine routines:ENGINE_by_id:no such engine:../openssl-1.1.1b/crypto/engine/eng_list.c:334:id=cryptodev
    3069489168:error:25066067:DSO support routines:dlfcn_load:could not load the shared library:../openssl-1.1.1b/crypto/dso/dso_dlfcn.c:119:filename(libcryptodev.so): libcryptodev.so: cannot open shared object file: No such file or directory
    3069489168:error:25070067:DSO support routines:DSO_load:could not load the shared library:../openssl-1.1.1b/crypto/dso/dso_lib.c:162:
    3069489168:error:260B6084:engine routines:dynamic_load:dso not found:../openssl-1.1.1b/crypto/engine/eng_dyn.c:414:
    Doing aes-128-cbc for 3s on 16 size blocks: 7533839 aes-128-cbc's in 2.73s
    Doing aes-128-cbc for 3s on 64 size blocks: 2052031 aes-128-cbc's in 2.42s
    Doing aes-128-cbc for 3s on 256 size blocks: 516376 aes-128-cbc's in 2.84s
    Doing aes-128-cbc for 3s on 1024 size blocks: 153322 aes-128-cbc's in 2.79s
    Doing aes-128-cbc for 3s on 8192 size blocks: 16364 aes-128-cbc's in 2.69s
    Doing aes-128-cbc for 3s on 16384 size blocks: 10581 aes-128-cbc's in 2.85s
    OpenSSL 1.1.1b 26 Feb 2019
    built on: Sun Apr 19 02:06:32 2020 UTC
    options:bn(64,32) rc4(char) des(long) aes(partial) idea(int) blowfish(ptr)
    compiler: arm-linux-gnueabihf-gcc -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=recipe-sysroot -isystem/home/gtbldadm/tools/gcc-arm-2019.03/arm-linux-gnueabihf/include -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map= -fdebug-prefix-map= -fdebug-prefix-map= -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -isystem/home/gtbldadm/tools/gcc-arm-2019.03/arm-linux-gnueabihf/include
    The 'numbers' are in 1000s of bytes per second processed.
    type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
    aes-128-cbc 44154.37k 54268.59k 46546.57k 56273.02k 49834.16k 60827.76k



Why it is giving error ? Also, speed is around 3 seconds, it clearly means it is not using crypto accelerators for speed testing


Also I am referring to the link
https://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Cryptography

  • openssl verify cert.pem

I am getting error on verifying the cert.pem in step Web generation certificate

C = AB, ST = C, L = D, O = E, OU = F, CN = G, emailAddress = H@i.com
error 18 at 0 depth lookup: self signed certificate
error cert.pem: verification failed

 

Regards

Sahil Kalra

  • For openssl-1.0.2 and earlier, the engine was called cryptodev. It was renamed to devcrypto in openssl 1.1.0+.

    If you run the command openssl engine -t -c, what output do you see?

    Regards, Daniel

  • Hey Daniel,

    On running command :         openssl engine -t -c

    Output received:

    (dynamic) Dynamic engine loading support

    [ unavailable ]

    command : openssl version -a 

    Output :

    OpenSSL 1.1.1b 26 Feb 2019

    built on: Sun Apr 19 02:06:32 2020 UTC
    platform: linux-armv4
    options: bn(64,32) rc4(char) des(long) idea(int) blowfish(ptr)
    compiler: arm-linux-gnueabihf-gcc -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=recipe-sysroot -isystem/home/gtbldadm/tools/gcc-arm-2019.03/arm-linux-gnueabihf/include -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map= -fdebug-prefix-map= -fdebug-prefix-map= -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -isystem/home/gtbldadm/tools/gcc-arm-2019.03/arm-linux-gnueabihf/include
    OPENSSLDIR: "/usr/lib/ssl-1.1"
    ENGINESDIR: "/usr/lib/engines-1.1"
    Seeding source: os-specific

    Regards 

    Sahil Kalra