Skip to content

Instantly share code, notes, and snippets.

@ErbaAitbayev
ErbaAitbayev / rsa.py
Created October 5, 2016 08:28
Simple Python RSA for digital signature with hashing implementation. For hashing SHA-256 from hashlib library is used.
import random
from hashlib import sha256
def coprime(a, b):
while b != 0:
a, b = b, a % b
return a