Interface DecipherCardService
-
- All Known Implementing Classes:
SmartCardHSMCardService
public interface DecipherCardService
-
-
Field Summary
Fields Modifier and Type Field Description static byteRSA_DECRYPTION_OAEPstatic byteRSA_DECRYPTION_PLAINstatic byteRSA_DECRYPTION_V15
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]decipher(SmartCardHSMKey privateKey, byte[] cryptogram)The device performs a plain rsa decryption.byte[]decipher(SmartCardHSMKey privateKey, byte[] cryptogram, byte algorithmID)The device decrypts a cryptogram and returns the plain text.byte[]performECCDH(SmartCardHSMKey privateKey, byte[] pkComponents)The device calculates a shared secret point using an EC Diffie-Hellman operation.
-
-
-
Field Detail
-
RSA_DECRYPTION_PLAIN
static final byte RSA_DECRYPTION_PLAIN
- See Also:
- Constant Field Values
-
RSA_DECRYPTION_V15
static final byte RSA_DECRYPTION_V15
- See Also:
- Constant Field Values
-
RSA_DECRYPTION_OAEP
static final byte RSA_DECRYPTION_OAEP
- See Also:
- Constant Field Values
-
-
Method Detail
-
decipher
byte[] decipher(SmartCardHSMKey privateKey, byte[] cryptogram) throws CardTerminalException, CardServiceException
The device performs a plain rsa decryption.- Parameters:
privateKey- the private SmartCardHSMKeycryptogram-- Returns:
- the plain text
- Throws:
CardServiceExceptionCardTerminalException
-
decipher
byte[] decipher(SmartCardHSMKey privateKey, byte[] cryptogram, byte algorithmID) throws CardTerminalException, CardServiceException
The device decrypts a cryptogram and returns the plain text.- Parameters:
privateKey- the private SmartCardHSMKeycryptogram-algorithmID- one of RSA_DECRYPTION_Plain, RSA_DECRYPTION_V15 or RSA_DECRYPTION_OAEP- Returns:
- the plain text
- Throws:
CardTerminalExceptionCardServiceException
-
performECCDH
byte[] performECCDH(SmartCardHSMKey privateKey, byte[] pkComponents) throws CardTerminalException, CardServiceException
The device calculates a shared secret point using an EC Diffie-Hellman operation. The public key of the sender must be provided as input to the command. The device returns the resulting point on the curve associated with the private key.- Parameters:
privateKey- Key identifier of the SmartCardHSM private keypkComponents- Concatenation of '04' || x || y point coordinates of ECC public Key- Returns:
- Concatenation of '04' || x || y point coordinates on EC curve
- Throws:
CardServiceExceptionCardTerminalException
-
-