I addition to Claris' answer, if your question is about ECDSA, the hashing step is actually an essential part of the signature scheme and not just a step we choose to do before invoking it. Without it, the signature would not be secure. This is because given a public key, it is possible to compute (signature, message hash) pairs such that the signature is ...
Bitcoin uses double hashing almost everywhere>SHA256[SH256[X]]called Hash256 which produces a 160 bit out.Linking transaction outputs and inputs.Generating the checsum in a bitcoin address.Hashing the block in a merkle tree.
I figured it out, I simply was missing a step. I wasn't signing my transaction before sending.
>>> res = srv.sendrawtransaction(t.raw_hex())
Assuming you're talking about ECDSA signing. For BIP340/Schnorr signatures, see this answer.
For valid signatures
d: the private key
P=d*G: the public key
k1: the (first) nonce
R1=k1*G: the public first nonce
r1=R1.x mod n: the public first nonce as it will be encoded in the signature.
k2=2*k1, R2=k2*G=2*R1, r2=R2.x mod n: the same for the second nonce
I solved the problem by installing the bitcoin package again.
I was getting this error message with my script doubleslow-base.py:
Traceback (most recent call last):
File "./doubleslow-base.py", line 136, in <module>
File "/home/valentin/python/doubleslow/doubleslow_module.py", line 301, in ...
From this only for example, only for outgoing transaction
With this: https://cryptoxploit.com/rsz-key/