TABLE OF CONTENTS

 

[Modules] Calypso_SAM_Commands.c

NAME

   SpringCard Calypso API :: SAM command set

COPYRIGHT

AUTHOR

   Johann Dantant / PRO ACTIVE

HISTORY

   JDA 21/10/2008 : first public release

[Functions] CalypsoSamCipherCardDataEx

NAME

   CalypsoSamCipherCardDataEx

DESCRIPTION

   Ask the SAM to cipher data to be transmitted to the card

INPUTS

   CALYPSO_CTX_ST *ctx         : library context
   BYTE           apdu_p1
   BYTE           apdu_p2
   const BYTE     plain[]
   CALYPSO_SZ     plainsize
   BYTE           cipher[]
   CALYPSO_SZ     *ciphersize

RETURNS

   CALYPSO_RC                  : 0 or an error code

[Functions] CalypsoSamDigestAuthenticate

NAME

   CalypsoSamDigestAuthenticate

DESCRIPTION

   Verify card's signature after CalypsoCardCloseSecureSession

INPUTS

   CALYPSO_CTX_ST *ctx         : library context
   const BYTE     card_sign[4] : signature returned by the card

RETURNS

   CALYPSO_RC                  : 0 or an error code

[Functions] CalypsoSamDigestClose

NAME

   CalypsoSamDigestClose

DESCRIPTION

   SAM-side counterpart of CalypsoCardCloseSecureSession

INPUTS

   CALYPSO_CTX_ST *ctx        : library context
   BYTE           sam_sign[4] : signature computed by the SAM
                                (to be forwarded to the card)

RETURNS

   CALYPSO_RC                 : 0 or an error code

[Functions] CalypsoSamDigestInit

NAME

   CalypsoSamDigestInit

DESCRIPTION

   SAM-side counterpart of CalypsoCardOpenSecureSession1, CalypsoCardOpenSecureSession2
   or CalypsoCardOpenSecureSession3

INPUTS

   CALYPSO_CTX_ST *ctx         : library context
   BYTE           kif          : key identifier
   BYTE           kvc          : key version and counter
   const BYTE     cardresp[]   : card's answer to the open secure session command
                                 (including its challenge)
   CALYPSO_SZ     cardrespsize : length of cardresp

RETURNS

   CALYPSO_RC                  : 0 or an error code

[Functions] CalypsoSamDigestUpdate

NAME

   CalypsoSamDigestUpdate

DESCRIPTION

   Forward a card's APDU (in/out) to the SAM

INPUTS

   CALYPSO_CTX_ST *ctx         : library context
   const BYTE     cardapdu[]   : APDU
   CALYPSO_SZ     cardapdusize : length of the APDU

RETURNS

   CALYPSO_RC                  : 0 or an error code

[Functions] CalypsoSamGetChallenge

NAME

   CalypsoSamGetChallenge

DESCRIPTION

   Retrieve the challenge from the SAM, to be used in CalypsoCardOpenSecureSession1,
   CalypsoCardOpenSecureSession2 or CalypsoCardOpenSecureSession3

INPUTS

   CALYPSO_CTX_ST *ctx        : library context
   BYTE           sam_chal[4] : the UID of the card

RETURNS

   CALYPSO_RC                 : 0 or an error code

[Functions] CalypsoSamGiveRandom

NAME

   CalypsoSamGiveRandom

DESCRIPTION

   Feed the SAM with a challenge generated by the card

INPUTS

   CALYPSO_CTX_ST *ctx         : library context
   const BYTE     challenge[8] : the challenge returned by the card

RETURNS

   CALYPSO_RC                  : 0 or an error code

SEE ALSO

   CalypsoCardGetChallenge

[Functions] CalypsoSamSelectDiversifier

NAME

   CalypsoSamSelectDiversifier

DESCRIPTION

   Feed the SAM with the UID of the card currently being worked on

INPUTS

   CALYPSO_CTX_ST *ctx        : library context
   const BYTE     card_uid[8] : the UID of the card

RETURNS

   CALYPSO_RC                 : 0 or an error code

Generated from calypso_sam_commands.c on Mon Aug 18 16:38:26 2014