Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## opencard.opt.signature
Interface KeyGenerationCardService

public abstract interface KeyGenerationCardService
extends SignatureCardService

`KeyGenerationCardService` The SignatureCardService offers methods to generate and verify a signature as well as key import, verification and generation methods. Many smartcard applications will work with existing keys imported during initialization or personalization instead of importing/generating them at runtime. Thus the functionality for

- signature generation and verification
- key import and verification
- key generation

is split into three interfaces "SignatureCardService", "KeyImportCardService" and "KeyGenerationCardService". Card service realizations of these interfaces need only implement the functionality needed by the application or supported by the specific card. This solution also offers potential for downsizing opencard for use in embedded devises with small memory resources.

See Also:
  `SignatureCardService`, `KeyImportCardService`

Method Summary
`void` | `generateKeyPair(PrivateKeyRef privateDest, PublicKeyRef publicDest, int strength, java.lang.String keyAlgorithm)` Generate a pair of PKA keys on card.
`java.security.PublicKey` | `readPublicKey(PublicKeyRef pulicKey, java.lang.String keyAlgorithm)` Read a public key (that was generated on the card) from the card.

Methods inherited from interface opencard.opt.signature.SignatureCardService
`signData, signData, signHash, signHash, verifySignedData, verifySignedData, verifySignedHash, verifySignedHash`

Methods inherited from interface opencard.opt.service.CardServiceInterface
`getCard, setCHVDialog`

Methods inherited from interface opencard.opt.security.SecureService
`provideCredentials`

Method Detail

### generateKeyPair

    public void generateKeyPair(PrivateKeyRef privateDest,
                                PublicKeyRef publicDest,
                                int strength,
                                java.lang.String keyAlgorithm)
                         throws opencard.core.service.CardServiceException,
                                java.security.InvalidKeyException,
                                opencard.core.terminal.CardTerminalException

  Generate a pair of PKA keys on card.
  Throws:
    java.security.InvalidKeyException - Thrown when the key files do not match the requested strength or algorithm.
    opencard.core.service.CardServiceException - Thrown when the card does not support the requested strength or algorithm.
    opencard.core.terminal.CardTerminalException - any subclass of CardTerminalException

### readPublicKey

    public java.security.PublicKey readPublicKey(PublicKeyRef pulicKey,
                                                 java.lang.String keyAlgorithm)
                                          throws opencard.core.service.CardServiceException,
                                                 java.security.InvalidKeyException,
                                                 opencard.core.terminal.CardTerminalException

  Read a public key (that was generated on the card) from the card.
  Throws:
    java.security.InvalidKeyException - Thrown when the key file does not match the requested algorithm.
    opencard.core.service.CardServiceException - access conditions do not allow reading the key, key is not found
    opencard.core.terminal.CardTerminalException - any subclass of CardTerminalException

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD