Downloads

cubedemo.py
A demonstration of the "Cube Attack" that Shamir described at Crypto 2008.

Language: Python (2.4)
Requires: no other modules
Runs under: Linux, probably also Windows and Mac OS X.

To download it, get the source by clicking here, then save to a file.

Multiscatter
An application for exploring a set of multidimensional data through the use of scatterplots.

Language: Python
Requires: Tkinter, scatterplot (below)
Runs under: Linux, maybe Windows, maybe Mac OS X.

To download it, get the source by clicking here, then save to a file.

A short user's manual is here.

Scatterplot
A Python module for creating scatterplots of X, Y data.

Language: Python
Requires: Tkinter
Runs under: Linux, maybe Windows, maybe Mac OS X.

To download it, get the source by clicking here, then save to a file.

ecdsa.py
A Python module for generating and verifying elliptic-curve DSA signatures.

Language: Python
Requires: ellipticcurve.py, numbertheory.py
Runs under: Linux, probably all Python implementations.

To download it, get the source by clicking here, then save to a file.

ellipticcurve.py
A Python module for working with elliptic curves over fields modulo a prime.

Language: Python
Requires: numbertheory.py
Runs under: Linux, probably all Python implementations.

To download it, get the source by clicking here, then save to a file.

numbertheory.py
A Python module providing number-theoretic functions: modular square roots, Jacobi symbols, modular inverses, Euler totient function, factorization, Carmichael function, primality testing.

Language: Python
Requires: None
Runs under: Linux, probably all Python implementations.

To download it, get the source by clicking here, then save to a file.

spamcopfilter.py
A Python program that identifies spam emails in my "Held Mail" folder at Spamcop and moves them into my "Spam for sure" folder.

Language: Python
Requires: imaplib, re, string, sys, types
Runs under: Linux, probably all Python implementations.

To download it, get the source by clicking here, then save to a file.

units.py
A Python module for manipulating dimensioned quantities, i.e., numbers measured in units like centimeters per second. Especially useful in conjunction with nature.py.

Language: Python
Requires: math
Runs under: Linux, probably all Python implementations.

To download it, get the source by clicking here, then save to a file.

nature.py
A Python module that defines many quantities describing the universe around us: the speed of light, the mass of the Earth, Planck's constant, and such. This module uses the units.py module to keep track of units.

An example shows it best:

Example 1: have you ever wondered about the magnitude of
the centrifugal force due to the Earth's rotation when you're
standing on the equator?

>>> import nature
>>> r = nature.earth_equatorial_radius
>>> w = 2 * 3.1416 / nature.earth_rotation_period
>>> print w*w*r
3.39172088527 cm /sec^2

Example 2: did you know the Sun pulls on the Moon harder
than the Earth does?

>>> G = nature.gravitational_constant
>>> re = nature.moon_orbit_radius             # Moon-Earth distance
>>> rs = ( nature.earth_orbit_radius + re )   # Moon farthest from sun.
>>> ms = nature.sun_mass
>>> me = nature.earth_mass
>>> print "Earth pull:", G*me/re/re
Earth pull: 0.27021048893 cm /sec^2

>>> print "Sun pull:", G*ms/rs/rs
Sun pull: 0.585397316513 cm /sec^2            # About twice Earth's pull.
    

Language: Python
Requires: units
Runs under: Linux, probably all Python implementations.

To download it, get the source by clicking here, then save to a file.


Back to Peter's home page.

2008-09-02

My email address: