HID APPROVE SDK  6.0
HID Approve SDK for Android
com.hidglobal.ia.service.otp.AsyncOTPGenerator Interface Reference

Extends the OTP generator to support asynchronous challenge-response generation. (OCRA) More...

Inheritance diagram for com.hidglobal.ia.service.otp.AsyncOTPGenerator:
com.hidglobal.ia.service.otp.OTPGenerator

Public Member Functions

char [] computeClientResponse (char[] password, char[] clientChallenge, char[] serverChallenge, InputAlgorithmParameters params) throws UnsupportedDeviceException, AuthenticationException, InternalException, LostCredentialsException, FingerprintAuthenticationRequiredException, FingerprintNotEnrolledException, PasswordRequiredException, PasswordExpiredException, InvalidParameterException
 
char [] computeResponse (char[] password, char[] challenge, InputAlgorithmParameters params) throws InvalidParameterException, InternalException, UnsupportedDeviceException, AuthenticationException, LostCredentialsException, FingerprintAuthenticationRequiredException, FingerprintNotEnrolledException, PasswordRequiredException, PasswordExpiredException
 
char [] computeServerResponse (char[] password, char[] clientChallenge, char[] serverChallenge, InputAlgorithmParameters params) throws UnsupportedDeviceException, AuthenticationException, InternalException, LostCredentialsException, FingerprintAuthenticationRequiredException, FingerprintNotEnrolledException, PasswordRequiredException, PasswordExpiredException, InvalidParameterException
 
char [] computeSignature (char[] password, char[] signatureChallenge, char[] clientChallenge, InputAlgorithmParameters params) throws InvalidParameterException, UnsupportedDeviceException, AuthenticationException, InternalException, LostCredentialsException, FingerprintAuthenticationRequiredException, FingerprintNotEnrolledException, PasswordRequiredException, PasswordExpiredException
 
char [] formatSignatureChallenge (char[][] inputData) throws InvalidChallengeException, InvalidParameterException
 
char [] getChallenge ()
 
- Public Member Functions inherited from com.hidglobal.ia.service.otp.OTPGenerator
AlgorithmParameters getAlgorithmParameters ()
 
String getName ()
 
String getStandardVersion ()
 
String getType ()
 
String getVersion ()
 

Static Public Attributes

static final String AUTHMODE_CHALLENGE_RESPONSE = "CHALLENGE_RESPONSE"
 
static final String AUTHMODE_MUTUAL_CHALLENGE_RESPONSE = "MUTUAL_CHALLENGE_RESPONSE"
 
static final String AUTHMODE_SIGNATURE = "SIGNATURE"
 
static final String AUTHMODE_SIGNATURE_SERVER_AUTH = "SIGNATURE_SERVER_AUTHENTICATION"
 

Detailed Description

Extends the OTP generator to support asynchronous challenge-response generation. (OCRA)

Computes OTP using externally provided challenge or transaction data.

Member Function Documentation

◆ computeClientResponse()

char [] com.hidglobal.ia.service.otp.AsyncOTPGenerator.computeClientResponse ( char []  password,
char []  clientChallenge,
char []  serverChallenge,
InputAlgorithmParameters  params 
) throws UnsupportedDeviceException, AuthenticationException, InternalException, LostCredentialsException, FingerprintAuthenticationRequiredException, FingerprintNotEnrolledException, PasswordRequiredException, PasswordExpiredException, InvalidParameterException

Compute the client response for one-way challenge-response with optional parameters. If there are no optional parameters, inputs can be omitted.

Parameters
passwordPassword protecting the OTP key
clientChallengeClient challenge
serverChallengeServer challenge
paramsAdditional data
Returns
OTP value
Exceptions
LostCredentialsExceptionif key securing the transaction have been wiped
InternalExceptionif an unexpected error occurred.
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy.
FingerprintAuthenticationRequiredExceptionif fingerprint authentication is required by policy.
FingerprintNotEnrolledExceptionif fingerprint enrollment is required.
PasswordRequiredExceptionif required password was not provided.
PasswordExpiredExceptionif expired password is given (changePassword required).
InvalidParameterExceptionif the given parameters are invalid or required parameters are missing.

◆ computeResponse()

Compute the response for one-way challenge-response. The params allows to pass additional data to compute the OTP. If there are no optional parameters, inputs can be omitted.

Parameters
passwordPassword protecting the OTP key
challengeChallenge
paramsAdditional data
Returns
OTP value
Exceptions
LostCredentialsExceptionif key securing the transaction have been wiped
InternalExceptionif an unexpected error occurred.
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy.
FingerprintAuthenticationRequiredExceptionif fingerprint authentication is required by policy.
FingerprintNotEnrolledExceptionif fingerprint enrollment is required.
PasswordRequiredExceptionif required password was not provided.
PasswordExpiredExceptionif expired password is given (changePassword required).
InvalidParameterExceptionif the given parameters are invalid or required parameters are missing.

◆ computeServerResponse()

char [] com.hidglobal.ia.service.otp.AsyncOTPGenerator.computeServerResponse ( char []  password,
char []  clientChallenge,
char []  serverChallenge,
InputAlgorithmParameters  params 
) throws UnsupportedDeviceException, AuthenticationException, InternalException, LostCredentialsException, FingerprintAuthenticationRequiredException, FingerprintNotEnrolledException, PasswordRequiredException, PasswordExpiredException, InvalidParameterException

Compute the server response for one-way challenge-response or for two-way signature. If there are no optional parameters, inputs can be omitted.

Parameters
passwordPassword protecting the OTP key
clientChallengeClient challenge
serverChallengeServer challenge
paramsAdditional data
Returns
OTP value
Exceptions
LostCredentialsExceptionif key securing the transaction have been wiped
InternalExceptionif an unexpected error occurred.
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy.
FingerprintAuthenticationRequiredExceptionif fingerprint authentication is required by policy.
FingerprintNotEnrolledExceptionif fingerprint enrollment is required.
PasswordRequiredExceptionif required password was not provided.
PasswordExpiredExceptionif expired password is given (changePassword required).
InvalidParameterExceptionif the given parameters are invalid or required parameters are missing.

◆ computeSignature()

char [] com.hidglobal.ia.service.otp.AsyncOTPGenerator.computeSignature ( char []  password,
char []  signatureChallenge,
char []  clientChallenge,
InputAlgorithmParameters  params 
) throws InvalidParameterException, UnsupportedDeviceException, AuthenticationException, InternalException, LostCredentialsException, FingerprintAuthenticationRequiredException, FingerprintNotEnrolledException, PasswordRequiredException, PasswordExpiredException

Compute the signature for one-way or two-way signature. For one-way signature, clientChallenge is empty. If there are no optional parameters, inputs can be omitted.

Parameters
passwordPassword protecting the OTP key
signatureChallengeChallenge to sign
clientChallengeThe challenge for the client
paramsThe params allow you to pass additional data
Returns
OTP value
Exceptions
LostCredentialsExceptionif key securing the transaction have been wiped
InternalExceptionif an unexpected error occurred.
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy.
FingerprintAuthenticationRequiredExceptionif fingerprint authentication is required by policy.
FingerprintNotEnrolledExceptionif fingerprint enrollment is required.
PasswordRequiredExceptionif required password was not provided.
PasswordExpiredExceptionif expired password is given (changePassword required).
InvalidParameterExceptionif the given parameters are invalid or required parameters are missing.

◆ formatSignatureChallenge()

char [] com.hidglobal.ia.service.otp.AsyncOTPGenerator.formatSignatureChallenge ( char  inputData[][]) throws InvalidChallengeException, InvalidParameterException

For transaction signing use cases, this method permits a challenge to be formatted according to standard based on several inputs provided by the user. Typically for OCRA see Appendix A of the Certificate profile.

Parameters
inputDataArray of input data provided by the user.
Returns
the fully formatted challenge to use in computeResponse method.
Exceptions
InvalidChallengeExceptionif input data does not allow to format a valid challenge with respect to the OTP algorithm parameters
InvalidParameterExceptionif the given parameters are invalid or required parameters are missing.

◆ getChallenge()

char [] com.hidglobal.ia.service.otp.AsyncOTPGenerator.getChallenge ( )

Returns a challenge according to format specified in OCRA suite for one-way use cases (challenge-response and signature). This method can be used by the client to provide the challenge to other parties (typically a server) so that it can authenticate the server using the asynchronous method.

Returns
a challenge