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

## opencard.opt.signature
Interface KeyImportCardService

All Superinterfaces:
  CardServiceInterface, SecureService, SignatureCardService

    public 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.

Version:
  $Id: KeyImportCardService.java,v 1.1.1.1 1999/10/05 15:08:48 damke Exp $
Author:
  Peter Bendel (peter_bendel@de.ibm.com)
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

    boolean importAndValidatePrivateKey(PrivateKeyRef destination,
                                        java.security.PrivateKey privateKey,
                                        byte[] keyInfo,
                                        byte[] signature,
                                        PublicKeyRef validationKey)
                                        throws CardServiceException,
                                               java.security.InvalidKeyException,
                                               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.

  Parameters:
    `destination` - Reference to the location on card where the imported key should be placed.
    `privateKey` - The actual key to be imported
    `keyInfo` - Additional special information to be stored with the key file.
    `signature` - Signature for validation of the key.
    `validationKey` - Key on card used for validation of signature.
  Throws:
    `java.security.InvalidKeyException` - The key type is not supported by the specific card service.
    `CardServiceException` - any subclass of CardServiceException
    `CardTerminalException` - any subclass of CardTerminalException

### importAndValidatePublicKey

    boolean importAndValidatePublicKey(PublicKeyRef destination,
                                       java.security.PublicKey key,
                                       byte[] keyInfo,
                                       byte[] signature,
                                       PublicKeyRef validationKey)
                                       throws CardServiceException,
                                              java.security.InvalidKeyException,
                                              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.

  Parameters:
    `destination` - Reference to the location on card where the imported key should be placed.
    `key` - The actual key.
    `keyInfo` - Additional special information to be stored with the key file.
    `signature` - Signature for validation of the key.
    `validationKey` - Key on card used for validation of signature.
  Throws:
    `java.security.InvalidKeyException` - The key type is not supported by the specific card service.
    `CardServiceException` - any subclass of CardServiceException
    `CardTerminalException` - any subclass of CardTerminalException

### importPrivateKey

    void importPrivateKey(PrivateKeyRef destination,
                          java.security.PrivateKey key,
                          byte[] keyInfo)
                          throws CardServiceException,
                                 java.security.InvalidKeyException,
                                 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.

  Parameters:
    `destination` - Reference to the location on card where the imported key should be placed.
    `key` - Private Key to store on card.
    `keyInfo` - Special information stored within the key file.
  Throws:
    `java.security.InvalidKeyException` - The key type is not supported by the specific card service.
    `CardServiceException` - any subclass of CardServiceException
    `CardTerminalException` - any subclass of CardTerminalException

### importPublicKey

    void importPublicKey(PublicKeyRef destination,
                         java.security.PublicKey key,
                         byte[] keyInfo)
                         throws CardServiceException,
                                java.security.InvalidKeyException,
                                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.

  Parameters:
    `destination` - Reference to the location on card where the imported key should be placed.
    `key` - The actual key.
    `keyInfo` - Additional special information to be stored with the key file.
  Throws:
    `java.security.InvalidKeyException` - The key type is not supported by the specific card service.
    `CardServiceException` - any subclass of CardServiceException
    `CardTerminalException` - any subclass of CardTerminalException

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