title: Smart Card External Authenticate 6982 error
body: <p>I'm trying to make security communicate with S.A.M.(Secure Access Module)
  Firstly I send this MSE:SET APDU for External Authenticate:</p>
  
  <pre><code>//83 is my private key's ID. F8 is algorithm identifier 
  OutgoingAPDU : 002281A4068001F8840183
  ResponseSW1SW2 : 9000 
  </code></pre>
  
  <p>Before send external auth. documents says encrypt with RSAES-OAEP PKCS #1 so I'm using this openssl command for encryption. </p>
  
  <pre><code>openssl_public_encrypt($dataForEncryption, $output, $publicKey['key'], OPENSSL_PKCS1_OAEP_PADDING);
  //$firstPartOfData =&gt; first 488 of $output
  //$secondPartOfData =&gt; last 24 of $output
  //total $output is 512
  </code></pre>
  
  <p>First of all is that true padding for RSAES-OAEP PKCS #1.</p>
  
  <p>And then external auth. APDU commands.</p>
  
  <pre><code>//strlen($firstPartOfData) = 488
  OutgoingAPDU : 10820000F4.$firstPartOfData
  ResponseSW1SW2 : 9000
  //strlen($firstPartOfData) = 24
  OutgoingAPDU : 008200000C.$secondPartOfData
  ResponseSW1SW2 : 6982
  </code></pre>
  
  <p>Where am I missing ? Or where is the mistake. I could'n find out the problem.  </p>