Interface SecurityModule


  • public interface SecurityModule
    Provides a generic interface for classes which wrap/hide a cryptographic private key. This interface ensures cryptographic functions required by Ethereum are available to the application at large, without releasing the content of the private key.
    • Method Detail

      • sign

        Signature sign​(org.apache.tuweni.bytes.Bytes32 dataHash)
                throws SecurityModuleException
        Parameters:
        dataHash - The Keccack hash of a set of data, which is to be signed.
        Returns:
        the signature (R, S) generated by signing the hash with the node key
        Throws:
        SecurityModuleException - if sign fails
      • calculateECDHKeyAgreement

        org.apache.tuweni.bytes.Bytes32 calculateECDHKeyAgreement​(PublicKey partyKey)
                                                           throws SecurityModuleException
        Parameters:
        partyKey - the key with which an agreement is to be created.
        Returns:
        The bytes forming the agreement
        Throws:
        SecurityModuleException - if calculateECDHKeyAgreement fails