2

I am having some troubles with finding code responsible for transaction signature verification in EthereumJ. Does anyone can point me somehow ?

I already investigated ethereumj source code but only found validation of components not the real signature against public key.

public static boolean validateComponents(BigInteger r, BigInteger s, byte v) {

        if (v != 27 && v != 28) return false;

        if (isLessThan(r, BigInteger.ONE)) return false;
        if (isLessThan(s, BigInteger.ONE)) return false;

        if (!isLessThan(r, Constants.getSECP256K1N())) return false;
        if (!isLessThan(s, Constants.getSECP256K1N())) return false;

        return true;
    }

Am I missing something ? Does such validation occurs somewhere?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.