def test_recovering_public_key():
    signature = ecdsa_sign(MSG, PRIVATE_KEY)
    recovered_public_key = ecdsa_recover(MSG, signature)
    assert recovered_public_key == PUBLIC_KEY
def test_signing_and_verifying_with_address():
    signature = ecdsa_sign(MSG, PRIVATE_KEY)
    assert ecdsa_verify_address(MSG, signature, ADDRESS)
Example #3
0
def create_transaction_signature(unsigned_txn, private_key):
    signature = ecdsa_sign(rlp.encode(unsigned_txn), private_key)
    v, r, s = decode_signature(signature)
    return v, r, s
def test_signing_and_verifying_with_public_key():
    signature = ecdsa_sign(MSG, PRIVATE_KEY)
    assert ecdsa_verify(MSG, signature, PUBLIC_KEY)
Example #5
0
 def ecdsa_sign(self, msg, private_key):
     return ecdsa_sign(msg, private_key)