Skip to content

Instantly share code, notes, and snippets.

@SuviSree
SuviSree / RSA.py
Created March 6, 2021 10:46 — forked from avalonalex/RSA.py
A implementation of RSA public key encryption algorithms in python, this implementation is for educational purpose, and is not intended for real world use. Hope any one want to do computation like (a^b mode n) effectively find it useful.
#!/usr/bin/env python
import argparse
import copy
import math
import pickle
import random
from itertools import combinations
@SuviSree
SuviSree / RSA.py
Created March 6, 2021 10:44 — forked from basavesh/RSA.py
A implementation of RSA public key encryption algorithms in python
import random
import math
import copy
def euclid(a,b):
'''returns the Greatest Common Divisor of a and b'''
a = abs(a)
b = abs(b)
@SuviSree
SuviSree / PyMarkov
Created January 19, 2021 14:27 — forked from Slater-Victoroff/PyMarkov
Arbitrary ply markov constructor in python
from collections import Counter
import cPickle as pickle
import random
import itertools
import string
def words(entry):
return [word.lower().decode('ascii', 'ignore') for word in entry.split()]
def letters(entry):