projects
/
oweals
/
openssl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
GitHub284: Fix typo in xx-32.pl scripts.
[oweals/openssl.git]
/
tools
/
primes.py
1
primes = [2, 3, 5, 7, 11]
2
safe = False # Not sure if the period's right on safe primes.
3
4
muliplier = 1 if not safe else 2
5
for p in primes:
6
muliplier *= p
7
8
offsets = []
9
for x in range(3, muliplier + 3, 2):
10
prime = True
11
for p in primes:
12
if not x % p or (safe and not ((x - 1) / 2) % p):
13
prime = False
14
break
15
16
if prime:
17
offsets.append(x)
18
19
print(offsets)
20
print(len(offsets))
21
print(muliplier)