java.lang.Object
se.swedenconnect.signservice.signature.signer.crypto.PkCrypto

public class PkCrypto extends Object
Public key crypto implementations used to generate signature values
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ecdsaSignData(byte[] data, PrivateKey privKey, se.swedenconnect.security.algorithms.Algorithm sigAlgo)
    Sign data using ECDSA
    static boolean
    ecdsaVerifyDigest(byte[] digest, EcdsaSigValue signature, PublicKey pubKey)
    Verify ECDSA signature value against a signed digest value
    static boolean
    ecdsaVerifySignedData(byte[] data, EcdsaSigValue signature, PublicKey pubKey, se.swedenconnect.security.algorithms.MessageDigestAlgorithm digestAlgo, se.swedenconnect.security.algorithms.AlgorithmRegistry algorithmRegistry)
    Verify signed data against an ECDSA signature value
    static se.swedenconnect.security.algorithms.Algorithm
    getAlgorithmFromTypeAndDigestMethod(se.swedenconnect.security.algorithms.MessageDigestAlgorithm digestAlgo, String keyType, se.swedenconnect.security.algorithms.AlgorithmRegistry algorithmRegistry)
    Get the signature algorithm supported by a specific key type and digest algorithm
    static byte[]
    rsaSign(byte[] data, PrivateKey privateKey)
    Sign data (encrypt) using RSA.
    static byte[]
    rsaSignEncodedMessage(byte[] data, PrivateKey privKey)
    Raw RSA encryption of data
    static byte[]
    rsaVerify(byte[] data, PublicKey pubKey)
    Decrypts data with RSA using the RSA public key (used in signature verification process)
    static byte[]
    rsaVerifyEncodedMessage(byte[] data, PublicKey pubKey)
    Raw decrypts data with RSA using the RSA public key disregaring any padding structrue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait