N. P. O'Donnell, 2020
openssl enc -aes-256-cbc -in <plaintext input file> -out <ciphertext output file>
-- Number Theory stuff | |
-- N. P. O'Donnell, 2020 | |
module NumberTheory (congruent, factors, prime, extendedEuclideanAlgorithm, greatestCommonDivisor, lowestCommonMultiple, coPrime) where | |
-- Euclidean division of two integers | |
euclideanDivision :: Integer -> Integer -> Integer | |
euclideanDivision a b = toInteger (floor ((fromIntegral a) / (fromIntegral b))) | |
#!/usr/bin/env python3 | |
# | |
# Crypto & Number Theory | |
# N. P. O'Donnell, 2020 | |
def odd(a): | |
""" | |
Is a odd? | |
""" |
#!/usr/bin/env python3 | |
# Elliptic Curve functions | |
# For educational purposes only. | |
# | |
# N. P. O'Donnell, 2020-2021 | |
from math import inf | |
import random | |
#!/usr/bin/env python3 | |
# Simple worker which can run a function in a different thread, and | |
# catch exceptions so they can be handled in the calling thread. | |
# | |
# N. P. O'Donnell, 2020 | |
from threading import Thread | |
from typing import Callable | |
import random | |
import time |