|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SignatureCardService
SignatureCardService 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
KeyGenerationCardService
,
KeyImportCardService
Method Summary | |
---|---|
byte[] |
signData(PrivateKeyRef privateKey,
java.lang.String signAlgorithm,
byte[] data)
Generate a digital Signature. |
byte[] |
signData(PrivateKeyRef privateKey,
java.lang.String signAgorithm,
java.lang.String padAlgorithm,
byte[] data)
Generate a digital Signature (overload method that allows to specify the padding algorithm). |
byte[] |
signHash(PrivateKeyRef privateKey,
java.lang.String signAgorithm,
byte[] hash)
Generate a digital Signature on the provided hash. |
byte[] |
signHash(PrivateKeyRef privateKey,
java.lang.String signAgorithm,
java.lang.String padAlgorithm,
byte[] hash)
Generate a digital Signature on the provided hash (Overloaded method that allows to specify the padding algorithm). |
boolean |
verifySignedData(PublicKeyRef publicKey,
java.lang.String signAlgorithm,
byte[] data,
byte[] signature)
Verify a digital Signature including hashing. |
boolean |
verifySignedData(PublicKeyRef publicKey,
java.lang.String signAlgorithm,
java.lang.String padAlgorithm,
byte[] data,
byte[] signature)
Verify a digital Signature including hashing (overload method that allows to specify the padding algorithm to be used). |
boolean |
verifySignedHash(PublicKeyRef publicKey,
java.lang.String signAlgorithm,
byte[] hash,
byte[] signature)
Verify a digital Signature. |
boolean |
verifySignedHash(PublicKeyRef publicKey,
java.lang.String signAlgorithm,
java.lang.String padAlgorithm,
byte[] hash,
byte[] signature)
Verify a digital Signature (overloaded method that allows to specify the padding algorithm to be used). |
Methods inherited from interface opencard.opt.service.CardServiceInterface |
---|
getCard, setCHVDialog |
Methods inherited from interface opencard.opt.security.SecureService |
---|
provideCredentials |
Method Detail |
---|
byte[] signData(PrivateKeyRef privateKey, java.lang.String signAlgorithm, byte[] data) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
The padding algorithm is chosen as defined in the Java Cryptography Architecture Specification.
The standard algorithm name must be specified as defined in the Java Cryptography Architecture API Specification & Reference, for example
privateKey
- a reference to the private key on card to be used for signingsignAlgorithm
- standard digital signature algorithm namedata
- data to be signed
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
byte[] signData(PrivateKeyRef privateKey, java.lang.String signAgorithm, java.lang.String padAlgorithm, byte[] data) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
The standard algorithm name must be specified as defined in the Java Cryptography Architecture API Specification & Reference, for example
privateKey
- a reference to the private key on card to be used for signingsignAgorithm
- standard digital signature algorithm namepadAlgorithm
- padding algorithm name, for example one of
ISO9796,
PKCS#1,
ZEROPADDINGdata
- data to be signed
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
byte[] signHash(PrivateKeyRef privateKey, java.lang.String signAgorithm, byte[] hash) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
The padding algorithm is chosen as defined in the Java Cryptography Architecture Specification.
Use a key algorithm name (not a digital signature algorithm name, because digital signature algorithms include hashing) a defined in the Java Cryptography Architecture API Specification & Reference, for example
privateKey
- a reference to the private key on card to be used for signingsignAgorithm
- standard key algorithm namehash
- the hash/digest to be signed
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
byte[] signHash(PrivateKeyRef privateKey, java.lang.String signAgorithm, java.lang.String padAlgorithm, byte[] hash) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
Use a key algorithm name (not a digital signature algorithm name, because digital signature algorithms include hashing) a defined in the Java Cryptography Architecture API Specification & Reference, for example
privateKey
- a reference to the private key on card to be used for signingsignAgorithm
- standard key algorithm namepadAlgorithm
- padding algorithm name, for example one of
ISO9796,
PKCS#1,
ZEROPADDINGhash
- the hash/digest to be signed
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
boolean verifySignedData(PublicKeyRef publicKey, java.lang.String signAlgorithm, byte[] data, byte[] signature) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
The padding algorithm is chosen as defined in the Java Cryptography Architecture Specification.
The standard algorithm name must be specified as defined in the Java Cryptography Architecture API Specification & Reference, for example
publicKey
- a reference to the public key on card to be used for signature validationsignAlgorithm
- standard digital signature algorithm namedata
- the data for which the signature should be verifiedsignature
- signature to be verified
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
boolean verifySignedData(PublicKeyRef publicKey, java.lang.String signAlgorithm, java.lang.String padAlgorithm, byte[] data, byte[] signature) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
The standard algorithm name must be specified as defined in the Java Cryptography Architecture API Specification & Reference, for example
publicKey
- a reference to the public key on card to be used for signature validationsignAlgorithm
- standard digital signature algorithm namepadAlgorithm
- padding algorithm name, for example one of
ISO9796,
PKCS#1,
ZEROPADDINGdata
- the data for which the signature should be verifiedsignature
- signature to be verified
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
boolean verifySignedHash(PublicKeyRef publicKey, java.lang.String signAlgorithm, byte[] hash, byte[] signature) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
The padding algorithm is chosen as defined in the Java Cryptography Architecture Specification.
Use a key algorithm name (not a digital signature algorithm name, because digital signature algorithms include hashing) a defined in the Java Cryptography Architecture API Specification & Reference, for example
publicKey
- a reference to the public key on card to be used for signature validationsignAlgorithm
- standard key algorithm namehash
- The hash for which the signature should be verified.signature
- signature to be verified
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
boolean verifySignedHash(PublicKeyRef publicKey, java.lang.String signAlgorithm, java.lang.String padAlgorithm, byte[] hash, byte[] signature) throws CardServiceException, java.security.InvalidKeyException, CardTerminalException
Use a key algorithm name (not a digital signature algorithm name, because digital signature algorithms include hashing) a defined in the Java Cryptography Architecture API Specification & Reference, for example
publicKey
- a reference to the public key on card to be used for signature validationsignAlgorithm
- standard key algorithm namepadAlgorithm
- padding algorithm name, for example one of
ISO9796,
PKCS#1,
ZEROPADDINGhash
- The hash for which the signature should be verified.signature
- signature to be verified
java.security.InvalidKeyException
- Thrown when the key is not valid or does not match the requested algorithm.
CardServiceException
- any subclass of CardServiceException
CardTerminalException
- any subclass of CardTerminalExceptionJCAStandardNames
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |