ECKey implements Serializable { public ECDSASignature sign(Sha256Hash input) throws KeyCrypterException { return sign(input, null); } ECKey();  ECKey(BigInteger privKey);  ECKey(BigInteger privKey, BigInteger pubKey);  ECKey(@Nullable byte[] privKeyBytes, @Nullable byte[] pubKey);  ECKey(@Nullable EncryptedPrivateKey encryptedPrivateKey, @Nullable byte[] pubKey, KeyCrypter keyCrypter);  ECKey(@Nullable BigInteger privKey, @Nullable byte[] pubKey, boolean compressed); private  ECKey(@Nullable BigInteger privKey, @Nullable byte[] pubKey); static ECKey fromASN1(byte[] asn1privkey); boolean isPubKeyOnly(); boolean hasPrivKey(); byte[] toASN1(); static byte[] publicKeyFromPrivate(BigInteger privKey, boolean compressed); byte[] getPubKeyHash(); byte[] getPubKey(); boolean isCompressed(); String toString(); String toStringWithPrivate(); Address toAddress(NetworkParameters params); void clearPrivateKey(); ECDSASignature sign(Sha256Hash input); ECDSASignature sign(Sha256Hash input, @Nullable KeyParameter aesKey); static boolean verify(byte[] data, ECDSASignature signature, byte[] pub); static boolean verify(byte[] data, byte[] signature, byte[] pub); boolean verify(byte[] data, byte[] signature); boolean verify(Sha256Hash sigHash, ECDSASignature signature); boolean isPubKeyCanonical(); static boolean isPubKeyCanonical(byte[] pubkey); String signMessage(String message); String signMessage(String message, @Nullable KeyParameter aesKey); static ECKey signedMessageToKey(String message, String signatureBase64); void verifyMessage(String message, String signatureBase64); @Nullable static ECKey recoverFromSignature(int recId, ECDSASignature sig, Sha256Hash message, boolean compressed); @Nullable byte[] getPrivKeyBytes(); DumpedPrivateKey getPrivateKeyEncoded(NetworkParameters params); long getCreationTimeSeconds(); void setCreationTimeSeconds(long newCreationTimeSeconds); @Override boolean equals(Object o); @Override int hashCode(); ECKey encrypt(KeyCrypter keyCrypter, KeyParameter aesKey); ECKey decrypt(KeyCrypter keyCrypter, KeyParameter aesKey); static boolean encryptionIsReversible(ECKey originalKey, ECKey encryptedKey, KeyCrypter keyCrypter, KeyParameter aesKey); boolean isEncrypted(); @Nullable EncryptedPrivateKey getEncryptedPrivateKey(); KeyCrypter getKeyCrypter(); static final ECDomainParameters CURVE; static final BigInteger HALF_CURVE_ORDER; @VisibleForTesting
    static boolean FAKE_SIGNATURES; }
@Test public void sValue() throws Exception { final int ITERATIONS = 10; ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(ITERATIONS)); List<ListenableFuture<ECKey.ECDSASignature>> sigFutures = Lists.newArrayList(); final ECKey key = new ECKey(); for (byte i = 0; i < ITERATIONS; i++) { final Sha256Hash hash = Sha256Hash.create(new byte[]{i}); sigFutures.add(executor.submit(new Callable<ECKey.ECDSASignature>() { @Override public ECKey.ECDSASignature call() throws Exception { return key.sign(hash); } })); } List<ECKey.ECDSASignature> sigs = Futures.allAsList(sigFutures).get(); for (ECKey.ECDSASignature signature : sigs) { assertTrue(signature.s.compareTo(ECKey.HALF_CURVE_ORDER) <= 0); } }