moth/puzzles/crypto/diffie.py

9 lines
156 B
Python
Raw Normal View History

2009-10-15 12:34:58 -06:00
prime = 51237129793
mod = 321454621
a = 341
A = prime ** a % mod
b = 573
B = prime ** b % mod
key = A**b % mod
assert B**a % mod == key, 'Bad diffie math.'