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 KeyImportCardService

public abstract interface KeyImportCardService
extends SignatureCardService

`KeyImportCardService` 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`, `KeyGenerationCardService`

Method Summary
`boolean` | `importAndValidatePrivateKey(PrivateKeyRef destination, java.security.PrivateKey privateKey, byte[] keyInfo, byte[] signature, PublicKeyRef validationKey)` Import and validate a private key.
`boolean` | `importAndValidatePublicKey(PublicKeyRef destination, java.security.PublicKey key, byte[] keyInfo, byte[] signature, PublicKeyRef validationKey)` Import and validate a public key to the card.
`void` | `importPrivateKey(PrivateKeyRef destination, java.security.PrivateKey key, byte[] keyInfo)` Import a private key.
`void` | `importPublicKey(PublicKeyRef destination, java.security.PublicKey key, byte[] keyInfo)` Import a public key to 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

### importAndValidatePrivateKey

    public boolean importAndValidatePrivateKey(PrivateKeyRef destination,
                                               java.security.PrivateKey privateKey,
                                               byte[] keyInfo,
                                               byte[] signature,
                                               PublicKeyRef validationKey)
                                        throws opencard.core.service.CardServiceException,
                                               java.security.InvalidKeyException,
                                               opencard.core.terminal.CardTerminalException

  Import and validate a private key. Key import means storing the key on card for future use in operations that involve PKA keys like signing or authentication. Key validation means to verify a signature provided for the key. If validation is successfull a card may set the key's status to verified and only allow sensitive operations using verified keys.
  Throws:
    java.security.InvalidKeyException - The key type is not supported by the specific card service.
    opencard.core.service.CardServiceException - any subclass of CardServiceException
    opencard.core.terminal.CardTerminalException - any subclass of CardTerminalException

### importAndValidatePublicKey

    public boolean importAndValidatePublicKey(PublicKeyRef destination,
                                              java.security.PublicKey key,
                                              byte[] keyInfo,
                                              byte[] signature,
                                              PublicKeyRef validationKey)
                                       throws opencard.core.service.CardServiceException,
                                              java.security.InvalidKeyException,
                                              opencard.core.terminal.CardTerminalException

  Import and validate a public key to the card. Key import means storing the key on card for future use in operations that involve PKA keys like signature verification or authentication. Key validation means to verify a signature provided for the key. If validation is successfull a card may set the key's status to verified and only allow sensitive operations using verified keys.
  Throws:
    java.security.InvalidKeyException - The key type is not supported by the specific card service.
    opencard.core.service.CardServiceException - any subclass of CardServiceException
    opencard.core.terminal.CardTerminalException - any subclass of CardTerminalException

### importPrivateKey

    public void importPrivateKey(PrivateKeyRef destination,
                                 java.security.PrivateKey key,
                                 byte[] keyInfo)
                          throws opencard.core.service.CardServiceException,
                                 java.security.InvalidKeyException,
                                 opencard.core.terminal.CardTerminalException

  Import a private key. Key import means storing the key on card for future use in operations that involve PKA keys like signing or authentication.
  Throws:
    java.security.InvalidKeyException - The key type is not supported by the specific card service.
    opencard.core.service.CardServiceException - any subclass of CardServiceException
    opencard.core.terminal.CardTerminalException - any subclass of CardTerminalException

### importPublicKey

    public void importPublicKey(PublicKeyRef destination,
                                java.security.PublicKey key,
                                byte[] keyInfo)
                         throws opencard.core.service.CardServiceException,
                                java.security.InvalidKeyException,
                                opencard.core.terminal.CardTerminalException

  Import a public key to the card. Key import means storing the key on card for future use in operations that involve PKA keys like signature verification or authentication.
  Throws:
    java.security.InvalidKeyException - The key type is not supported by the specific card service.
    opencard.core.service.CardServiceException - any subclass of CardServiceException
    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