Search code examples
digital-signaturesmartcardapduiso-7816-4

ISO 7816 How to Use Calculate Signature Command APDU Multiple Times


I do the following steps for signing a single data with a smart card with the ISO7816 standard.

  1. Select MF
  2. Select DF
  3. Verify Pin
  4. Manage security environment
  5. Compute digital signature

If I want to sign multiple data then I follow these steps :

  1. Select MF
  2. Select DF
  3. Verify Pin
  4. Manage security environment
  5. Compute digital signature 1
  6. Verify Pin
  7. Manage security environment
  8. Compute digital signature 2
  9. Verify Pin
  10. Manage security environment
  11. Compute digital signature 3

Do i have to do VerifyPin and manage security environment steps everytime?

If I try these steps:

  1. Select MF
  2. Select DF
  3. Verify Pin
  4. Manage security environment
  5. Compute digital signature 1
  6. Compute digital signature 2

I'm getting 69 82 (Security condition not satisfied.) in step 6.


Solution

  • What you are describing is the concept typically called bulk signature. It is supported by some cards, but most likely this requires a modification of the personalization sequence used to setup the card before issuance or a different ordering option. The more secure standard behavior (as you observe in the example) is, that the acquired access right is exhausted by the signing process.

    There are serious legal obstacles, since digital signatures are considered as a willful act, so imply that you were aware of what you signed and intended to do so by entering the PIN. Under conditions asking for a bulk signature, typically considerable organizational security provisions have to be supplemented to the environment, so a doctor, who intends to sign electronic prescriptions, has to make plausible, that the card reader is under his/her continuous supervision.

    There are more restricted forms of bulk signature, where the PIN has not to be entered every time, but e.g. every 10th time, since the unlimited signature capability is too dangerous.

    Just to clarify this: if a card is hardwired for single signature per PIN entry, there is nothing an application can do to achieve bulk signature instead.

    Summarized: While a PIN entry proves the presence of the legitimate card holder, this is insufficent for the willful act aspect of digital signatures.