I have been working on EC calculations, ECDsa signatures and DER-encoding, considering the randomness of the results and the fact that I am not using any kind of external libraries for any of the steps, I don't know how correct my resulting signatures are!

Lets take the transaction in this example with the following private key:

Code:

18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725

How can I verify whether the following transaction has a valid signature (ignore the fact that the transaction it is spending does not exist):