1

Topic: wolfssl Command

Hi all,

What is wrong with the command below ?? I am using the same key and iv that i have used in my programs with WolfSSL libcrypto. By the way, i have tried converting the key and iv' values to hexadecimal, but the outcome is the same.

    wolfssl -encrypt aes-128-cbc -in arq_1MB.dat -out fileE1.txt -key 9A594EFA2C40BCC12A056443AC0CC1C2 -iv     571D32CE4F431738E55269E218D13209 -verify

    wolfssl -decrypt aes-128-cbc -in fileE1.txt -out fileD1.txt -key 9A594EFA2C40BCC12A056443AC0CC1C2 -iv 571D32CE4F431738E55269E218D13209 -verify


    wolfssl -encrypt aes-256-cbc -in arq_1MB.dat -out fileE2.txt -key EA3E5530FA44E52C964233B6E9DE5DB2F617B1432DC8AAE236C48EF1ED9CF55E -iv 571D32CE4F431738E55269E218D13209 -verify

    wolfssl -decrypt aes-256-cbc -in fileE2.txt -out fileD2.txt -key EA3E5530FA44E52C964233B6E9DE5DB2F617B1432DC8AAE236C48EF1ED9CF55E -iv 571D32CE4F431738E55269E218D13209 -verify

Any of the commands abends responding with:

  Invalid entry
  Error returned: -313.


How could I run those commands in the right way ???

TKS

JL

Share

Re: wolfssl Command

Hi jl,

Thank you for using the wolfSSL forums, it looks like you just have the algorithm specs backwards IE:

aes-128-cbc

VS.

aes-cbc-128

try:

wolfssl -encrypt -h 

to output a usage example:

kalebhimes$ wolfssl -encrypt -h

Available En/De crypt Algorithms with current configure settings.

aes-cbc-128        aes-cbc-192        aes-cbc-256
aes-ctr-128        aes-ctr-192        aes-ctr-256
3des-cbc-56        3des-cbc-112        3des-cbc-168
camellia-cbc-128    camellia-cbc-192    camellia-cbc-256

***************************************************************

ENCRYPT USAGE: wolfssl -encrypt <-algorithm> -in <filename> -pwd <password> -out <output file name>

***************************************************************

EXAMPLE: 

wolfssl -encrypt aes-cbc-128 -pwd Thi$i$myPa$$w0rd -in somefile.txt -out encryptedfile.txt

Warmest Regards,

Kaleb