title: Select different padding modes in OpenSSL commands
body: <p>I wrote a Java Card applet to do DES encryption/Decryption. The <a href="https://stackoverflow.com/questions/30148089/java-card-des-generator-applet-output-is-different-from-online-tools-output/30149278?noredirect=1#comment48406460_30149278">source code of my  applet</a> (<em>If you want to use it, consider that Mr Bodewes found some bugs in this source code (those are mentioned in the comments under his answer. So fix it and then use</em>) have the following functions: </p>
  
  <ul>
  <li>DES_ECB_ISO9797_M1</li>
  <li>DES_ECB_ISO9797_M2</li>
  <li>DES_ECB_NOPAD</li>
  <li>DES_ECB_PKCS5</li>
  </ul>
  
  <p>I did a comparison between output of my program and output of an online tool, and finally I find them different. So I want to check correctness of my program's output using OpenSSL. </p>
  
  <p>These are results for encrypting <code>0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30</code> with key = <code>0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88</code> :</p>
  
  <pre><code>::&gt; SendToApplet.exe -key 1122334455667788 -data 3030303030303030
  
  Command::
  
  Data: 3030303030303030
  Key : 1122334455667788
  
  Results::
  
  DES_ECB_ISO9797_M1:
  8E 43 CF B8 91 02 01 38 .C.....8
  DES_ECB_ISO9797_M2:
  A6 DE 1C D9 1B A9 EE D0 ........
  DES_ECB_NOPAD:
  0B FC BF EE 82 F4 8B 19 .......
  DES_ECB_PKCS5:
  AA 6E 4D 79 E5 0C B1 51 .nMy...Q 
  </code></pre>
  
  <p>The question is how I can check to see if these results are OK? </p>
  
  <p>This is list of  <em>OpenSSL tool</em> commands and arguments: </p>
  
  <pre><code>OpenSSL&gt; ?
  openssl:Error: '?' is an invalid command.
  
  Standard commands
  asn1parse      ca             ciphers        crl            crl2pkcs7
  dgst           dh             dhparam        dsa            dsaparam
  ec             ecparam        enc            engine         errstr
  gendh          gendsa         genrsa         nseq           ocsp
  passwd         pkcs12         pkcs7          pkcs8          prime
  rand           req            rsa            rsautl         s_client
  s_server       s_time         sess_id        smime          speed
  spkac          verify         version        x509
  
  Message Digest commands (see the `dgst' command for more details)
  md2            md4            md5            rmd160         sha
  sha1
  
  Cipher commands (see the `enc' command for more details)
  aes-128-cbc    aes-128-ecb    aes-192-cbc    aes-192-ecb    aes-256-cbc
  aes-256-ecb    base64         bf             bf-cbc         bf-cfb
  bf-ecb         bf-ofb         cast           cast-cbc       cast5-cbc
  cast5-cfb      cast5-ecb      cast5-ofb      des            des-cbc
  des-cfb        des-ecb        des-ede        des-ede-cbc    des-ede-cfb
  des-ede-ofb    des-ede3       des-ede3-cbc   des-ede3-cfb   des-ede3-ofb
  des-ofb        des3           desx           idea           idea-cbc
  idea-cfb       idea-ecb       idea-ofb       rc2            rc2-40-cbc
  rc2-64-cbc     rc2-cbc        rc2-cfb        rc2-ecb        rc2-ofb
  rc4            rc4-40
  </code></pre>
  
  <p>Unfortunately I can see anything related to the Padding modes (i.e <em>ISO9797_M1</em>, <em>ISO9797_M2</em>, <em>NOPAD</em> and <em>PKCS5</em>). How I can specify them in my command?</p>