Skip to content

Instantly share code, notes, and snippets.

View shemnon's full-sized avatar

Danno Ferrin shemnon

View GitHub Profile
@nlitsme
nlitsme / ecdsa_demo.py
Last active April 9, 2024 16:46
python implementation of ecdsa calculations, demonstrating how to recover a private key from two signatures with identical 'r', and demonstrating how to find the public key from a signature and message, or from two signatures.
from __future__ import print_function, division
"""
By Willem Hengeveld <itsme@xs4all.nl>
ecdsa implementation in python
demonstrating several 'unconventional' calculations,
like finding a public key from a signature,
and finding a private key from 2 signatures with identical 'r'
"""