title: Authenticating an applet on Javacard and an applet on SAM (Secure Access Module)
body: <p>I have written an applet in my java card and the other applet in my SAM. I want to create mutual authentication by sending random number created each side.
  The model of reader is:</p>
  
  <pre><code>c:\&gt;gp.exe  -all -d
  # Detected readers from SunPCSC
  [*] ACS ACR1281 1S Dual Reader PICC 0
  [*] ACS ACR1281 1S Dual Reader SAM 0
  </code></pre>
  
  <p>I select applet on SAM ,create random number and send out. Then I select applet on java card creating string with random of SAM and new random creation by card and send the mixed random.</p>
  
  <p>So I should again select applet on SAM to check the random, but as my randoms are in transient Clear_ON_RESET Memory, they gone.</p>
  
  <p>I need random numbers in transient <code>CLEAR_ON_RESET</code> Memory.And I use <code>gp.exe</code> for sending APDU's.</p>
  
  <p>Is there any way that I can have both SAM and Card selected? I guess there should be a way to have both them up.</p>