Design issues

Every change that is not a small fix or minor enhancement requires some kind of design. In order to discuss design decisions as much as possible and leave some kind of track about decisions made and design in place other than source code and comments and maybe even documentation, this sector of the wiki could be used. As always - feel free to comment (but please leave your name after your comment).

Pinpad functionality

(Martin) Current state of secure pin entry methods in OpenSC is somewhat limited and hairy. Checks and features and functionality spans several component borders (application, library, card driver, reader, pkcs15 layer, etc). The target is to provide smooth pinpad support.

In theory different layers affect the total pinpad-oriented functioning:

  1. Reader capabilities - actual reader capabilities detected and enabled by the reader (ctapi, pcsc, openct)
  2. Reader driver and how-if-what verify methods it implements (though the name verify is not correct if we talk about full pin operations)
  3. Card driver and if it implements the new pin command interface or if it is possible at all for the given card (maybe it uses some other method, maybe it uses non-numeric passwords)
  4. pkcs15 layer - what it thinks about underlying hardware capacities and if/how it makes use of it
  5. pkcs11 layer - exports PROTECTED_AUTHENTICATION_PATH to indicate 'secure authentication (aka pinpad)' and itself feeds data to pkcs15 layer.
  6. applications - how they interpret various parameters (like slot capabilities, pkcs11 features, etc), how/if they react or should react on empty pins etc.
  7. Library internal UI functionality - instead of asking for a pin who should notify the user to insert the pin to the pinpad and how?

All these should be put to work for a common goal in a nice way.

Requirements

Things to keep in mind

Decisions

... to be continued ...