@Override
  public Signature sign(final Bytes32 dataHash) throws SecurityModuleException {
    try {
      final SECPSignature signature = signatureAlgorithm.sign(dataHash, keyPair);
      return new SignatureImpl(signature);
    } catch (final Exception e) {
      throw new SecurityModuleException("Unexpected error while signing: " + e.getMessage(), e);
    }
  }
Instantiates a new Key pair security module.

@param keyPair the key pair
crypto/services/src/main/java/org/hyperledger/besu/cryptoservices/KeyPairSecurityModule.java