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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.tuweni.bytes.Bytes32
calculateECDHKeyAgreement(PublicKey partyKey)
PublicKey
getPublicKey()
Signature
sign(org.apache.tuweni.bytes.Bytes32 dataHash)
-
-
-
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
-
getPublicKey
PublicKey getPublicKey() throws SecurityModuleException
- Returns:
- the public key associated with the key stored behind this interface.
- Throws:
SecurityModuleException
- if getPublicKey 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
-
-