Class PowerAuthClientSignature

java.lang.Object
io.getlime.security.powerauth.crypto.client.signature.PowerAuthClientSignature

public class PowerAuthClientSignature extends Object
Class implementing client-side signature related processes.
Author:
Petr Dvorak
  • Constructor Details

    • PowerAuthClientSignature

      public PowerAuthClientSignature()
  • Method Details

    • signatureForData

      public String signatureForData(byte[] data, List<SecretKey> signatureKeys, byte[] ctrData, SignatureConfiguration signatureConfiguration) throws GenericCryptoException, CryptoProviderException
      Compute a PowerAuth signature for given data, signature keys and counter. Signature keys are symmetric keys deduced using private device key KEY_DEVICE_PRIVATE and server public key KEY_SERVER_PUBLIC, and then using KDF function with proper index. See PowerAuth protocol specification for details.
      Parameters:
      data - Data to be signed.
      signatureKeys - A signature keys.
      ctrData - Hash based counter / index of the derived key KEY_DERIVED.
      signatureConfiguration - Format and parameters of signature to calculate.
      Returns:
      PowerAuth signature for given data.
      Throws:
      GenericCryptoException - In case signature computation fails.
      CryptoProviderException - In case cryptography provider is incorrectly initialized.