chiark / gitweb /
catacomb-python
14 years agobuild: Use mdwsetup.py from new CFD. Announce 1.0.2. 1.0.2
Mark Wooding [Sun, 4 Oct 2009 13:18:01 +0000 (14:18 +0100)]
build: Use mdwsetup.py from new CFD.  Announce 1.0.2.

14 years agodebian/control: Fix package description (oops).
Mark Wooding [Sun, 4 Oct 2009 13:29:54 +0000 (14:29 +0100)]
debian/control: Fix package description (oops).

14 years agodebian: Switch to CDBS and build for Python 2.6. 1.0.1
Mark Wooding [Sat, 3 Oct 2009 22:25:07 +0000 (23:25 +0100)]
debian: Switch to CDBS and build for Python 2.6.

Still seems to work.  Somewhat surprising, really.

15 years agocatacomb/__init__.py: Add iterfoo methods to _groupmap.
Mark Wooding [Mon, 17 Nov 2008 23:53:05 +0000 (23:53 +0000)]
catacomb/__init__.py: Add iterfoo methods to _groupmap.

This makes them look more like dictionaries, which is nice.

15 years agopwsafe: Stop using sre to shut up pissy warning.
Mark Wooding [Mon, 17 Nov 2008 23:52:26 +0000 (23:52 +0000)]
pwsafe: Stop using sre to shut up pissy warning.

15 years agoshare.c: Fix crappy typo in argument parsing.
Mark Wooding [Mon, 17 Nov 2008 23:52:05 +0000 (23:52 +0000)]
share.c: Fix crappy typo in argument parsing.

15 years agoalgorithms.h: Don't version-control generated files.
Mark Wooding [Mon, 23 Jun 2008 15:50:01 +0000 (16:50 +0100)]
algorithms.h: Don't version-control generated files.

15 years agoec (ecmeth_mmul): Fix point conversion.
Mark Wooding [Mon, 23 Jun 2008 14:07:58 +0000 (15:07 +0100)]
ec (ecmeth_mmul): Fix point conversion.

Really quite broken.

  * Firstly, the code tried to copy a point to an uninitialized
    destination point, which just isn't a good idea.

  * And secondly, after tediously doing the correct conversion, it just
    tried to copy the raw point over the top of the correct converted
    point.

Not good, really.

16 years agodebian: Drop support for Python 2.3.
Mark Wooding [Fri, 4 Apr 2008 23:56:24 +0000 (00:56 +0100)]
debian: Drop support for Python 2.3.

This is all very crufty and needs an overhaul anyway.

16 years agosetup: Use pkg-config to find out about libraries.
Mark Wooding [Fri, 4 Apr 2008 23:55:59 +0000 (00:55 +0100)]
setup: Use pkg-config to find out about libraries.

16 years agoutil: Actually initialize the utilities properly.
Mark Wooding [Fri, 4 Apr 2008 23:55:18 +0000 (00:55 +0100)]
util: Actually initialize the utilities properly.

Failure to do this cases segfaults when we actually come to do things
like iteration.

16 years agoec: Fix oncurvep.
Mark Wooding [Fri, 4 Apr 2008 23:54:42 +0000 (00:54 +0100)]
ec: Fix oncurvep.

The previous version didn't take into account the fact that we had
internal-format points.

17 years agomp: Remove checking from jacobi.
Mark Wooding [Sat, 17 Feb 2007 12:19:29 +0000 (12:19 +0000)]
mp: Remove checking from jacobi.

Now Catacomb uses the Kronecker symbol, which is defined for all pairs
of integers.  We no longer need to check that the arguments here are
correct.

17 years agoRename the class `check' method to `checkgroup'.
Mark Wooding [Sat, 17 Feb 2007 12:18:40 +0000 (12:18 +0000)]
Rename the class `check' method to `checkgroup'.

Otherwise it interferes with the element `check' method, which gets used
by preference.

17 years agoGeneral: Fix lots of whitespace issues.
Mark Wooding [Sat, 17 Feb 2007 12:18:00 +0000 (12:18 +0000)]
General: Fix lots of whitespace issues.

17 years agopubkey: Various stupid DSA bugs fixed.
Mark Wooding [Mon, 20 Nov 2006 17:45:44 +0000 (17:45 +0000)]
pubkey: Various stupid DSA bugs fixed.

I don't see how this ever worked.  Grumble.

17 years agokey: Make KeyFiles iterate over their keyids, not their keys.
Mark Wooding [Tue, 16 Jan 2007 22:27:24 +0000 (22:27 +0000)]
key: Make KeyFiles iterate over their keyids, not their keys.

This makes the various mapping methods like keys and values work
properly.

17 years agoec: Convert generator to external form in ECInfo constructor.
Mark Wooding [Thu, 16 Nov 2006 00:13:06 +0000 (00:13 +0000)]
ec: Convert generator to external form in ECInfo constructor.

This fixes a stupid bug.

17 years agoGeneral: Update for Python 2.5.
Mark Wooding [Wed, 25 Oct 2006 18:36:19 +0000 (19:36 +0100)]
General: Update for Python 2.5.

  * This renamed the members of heap types. so there's a compatibility
    macro now.

  * Debian has moved on to Python 2.4 as its standard version, so track
    that.

  * Also provide Python 2.5 packages now that we can.

18 years agogf: New methods for various modular operations.
Mark Wooding [Wed, 5 Apr 2006 23:07:56 +0000 (00:07 +0100)]
gf: New methods for various modular operations.

Modular square root and quadratic solution, and trace and halftrace.
Implemented in C for GFReduce, with thin Python glue for GF objects.

18 years agomp: Be more restrictive about implicit conversions.
Mark Wooding [Wed, 5 Apr 2006 11:20:57 +0000 (12:20 +0100)]
mp: Be more restrictive about implicit conversions.

Implicit conversions, e.g., for binary operators, used to be quite
promiscuous.  In particular, if P is a curve point and x is an MP, then
P * x was a point multiplication, but x * P converted P to an integer
(by discarding the y coordinate) and multiplied in integers.  This is
clearly insane.

The new code is pickier about converting things to MPs or GFs.  Explicit
conversions can still be given.  And there will still be great confusion
if you mix Catacomb types with other numeric types.  But things seem
more logical now, at least.

The actual implicit conversion rules are as follows:

  * An MP and any type with a `long' conversion /except/ for GF, FE,
    ECPt or GE may convert to MP.

  * A GF and any type with a `long' conversion /except/ for MP, FE, ECPt
    or GE may convert to GF.

  * Anything which can convert to `long' may convert to FE.  This will
    lead to confusion if you mix FEs and ECPts, but I think that's
    asking for trouble anyway.

  * There are no implicit conversions to ECPt or GE.  However, ECPt can
    be multiplied by anything with a `long' conversion.

I hope this is right.  If not, I'll fiddle some more.

18 years agofield: Correct conversions from integers.
Mark Wooding [Thu, 30 Mar 2006 23:25:22 +0000 (00:25 +0100)]
field: Correct conversions from integers.

The function tofe refused to convert integers to field elements.  I seem
to remember deciding that this was too weird for binary fields, but in
retrospect this seems a mistake, since there's nothing stopping a binary
field element converting to an mp (or gf).

Previously, binary operations between a field element and a Python
integer failed, but a binop with a fe and an mp would force the fe to
downgrade to an mp, which seems really bizarre.

Also, I think there was a possibility of a memory leak in the old code.

18 years agogetulong: Compare with LONG_MAX to decide what Python type to use.
Mark Wooding [Wed, 22 Mar 2006 12:58:45 +0000 (12:58 +0000)]
getulong: Compare with LONG_MAX to decide what Python type to use.

This may reduce the number of bignums created on 64-bit machines.

18 years agokey: Use convulong instead of PyLong_AsUnsignedLong.
Mark Wooding [Tue, 21 Mar 2006 01:20:29 +0000 (01:20 +0000)]
key: Use convulong instead of PyLong_AsUnsignedLong.

Python 2.4's implementation of PyLong_AsUnsignedLong handles integers
correctly; but 2.3 insists on having a real `long' object.  Our
`convulong' function handles these, and also stranger things like MPs.
Use it.

18 years agokey: Fixing of expiry and deletion time properties.
Mark Wooding [Tue, 7 Mar 2006 14:38:43 +0000 (14:38 +0000)]
key: Fixing of expiry and deletion time properties.

Allow them to be modified.  Return the correct value for keys which
never expire or are deleted.

18 years agoRemove the various `getuNN' functions and replace them with getulong().
Mark Wooding [Tue, 7 Mar 2006 14:25:03 +0000 (14:25 +0000)]
Remove the various `getuNN' functions and replace them with getulong().

They weren't doing any real good anyway, and the implementation was
randomly buggy.

18 years agoutil: Report ValuError (not TypeError) for failed integer conversions.
Mark Wooding [Tue, 7 Mar 2006 14:12:42 +0000 (14:12 +0000)]
util: Report ValuError (not TypeError) for failed integer conversions.

18 years agokey: Add read-only mapping methods to Keyfile.
Mark Wooding [Mon, 6 Mar 2006 16:56:59 +0000 (16:56 +0000)]
key: Add read-only mapping methods to Keyfile.

18 years agomappings: Separate mapping methods into read-only and read-write.
Mark Wooding [Mon, 6 Mar 2006 16:56:41 +0000 (16:56 +0000)]
mappings: Separate mapping methods into read-only and read-write.

18 years agogitignore: Ignore the COPYING file.
Mark Wooding [Mon, 6 Mar 2006 16:55:27 +0000 (16:55 +0000)]
gitignore: Ignore the COPYING file.

18 years agodebian: Fix package sections.
Mark Wooding [Wed, 15 Feb 2006 12:30:11 +0000 (12:30 +0000)]
debian: Fix package sections.

18 years agogroup: Implement KCDSA group generation.
Mark Wooding [Sun, 12 Feb 2006 00:39:05 +0000 (00:39 +0000)]
group: Implement KCDSA group generation.

Requires the corresponding feature in Catacomb.  Also fix a memory
management snafu in field-group-info handling.

18 years agoinfra: Add a copy of the GPL.
Mark Wooding [Wed, 8 Feb 2006 18:43:10 +0000 (18:43 +0000)]
infra: Add a copy of the GPL.

18 years agogf: Make GF.fromstring consistent with MP.fromstring
Mark Wooding [Sat, 4 Feb 2006 17:53:52 +0000 (17:53 +0000)]
gf: Make GF.fromstring consistent with MP.fromstring

The latter raises an exception if given an empty string, and reports
`bad radix' if it is, rather than `out of range'.

18 years agomp: Forbid negative bit numbers in {set,clear,test}bit methods.
Mark Wooding [Sun, 29 Jan 2006 13:55:35 +0000 (13:55 +0000)]
mp: Forbid negative bit numbers in {set,clear,test}bit methods.

18 years agoec, group: Bug squashing.
Mark Wooding [Sat, 28 Jan 2006 19:31:46 +0000 (19:31 +0000)]
ec, group: Bug squashing.

  * eccurve_pynew had a bad argument format string, which caused a
    segfault.

  * fginfo_pynew also had bogus argument parsing, found in sweep for
    similar bugs.

  * ECCurve.pt hadn't been fixed since curves became types.  Now done.

18 years ago__init__.py: Spruce up a lot.
Mark Wooding [Sat, 28 Jan 2006 19:12:38 +0000 (19:12 +0000)]
__init__.py: Spruce up a lot.

  * Divide into sections and add commentary.

  * Add static methods for BBSPriv class (ooops).

18 years agorand: Generators based on symmetric algorithms; fixing
Mark Wooding [Sat, 28 Jan 2006 19:09:57 +0000 (19:09 +0000)]
rand: Generators based on symmetric algorithms; fixing

  * Include support for the various generators based on symmetric
    algorithms: i.e., counter and OFB modes for block ciphers, and SEAL
    and RC4.

  * Recognise, and return correct subclass instance for, TLS and SSL
    generators, and the symmetric crypto-based generators.

18 years agomp: Replace MP.product() by an MPMul class. Much more useful.
Mark Wooding [Sat, 28 Jan 2006 19:07:27 +0000 (19:07 +0000)]
mp: Replace MP.product() by an MPMul class.  Much more useful.

18 years agoBug squashing.
Mark Wooding [Sat, 28 Jan 2006 19:03:25 +0000 (19:03 +0000)]
Bug squashing.

  * Fix setting functions to check for null value (interpreted as property
    deletion) and raise an exception or do something else useful.

  * Fix conversion of read buffer to string so it returns the remainder
    rather than the whole thing.

  * Make conversions between MP and Python long work on PyObjects rather
    than PyLongObjects, to eliminate pointless type casts.

  * Fix primefield constructor argument parsing so that it doesn't crash!

  * Fix radix checking in MP conversions to exclude +/-1, and 0 for output.
    This turns into a little function now.

  * Do argument checking on Jacobi function.

18 years agoReorganization: split out utilities; mapping methods
Mark Wooding [Sat, 28 Jan 2006 18:46:07 +0000 (18:46 +0000)]
Reorganization: split out utilities; mapping methods

  * Move non-project-specific Python utilities into a separate file.  They
    might conceivably find their way into a new project some day.

  * Implement the standard mapping methods generically (i.e., in terms of
    basic Python mapping operations).

  * Use the mapping methods for the various key-object-related mappings.

  * Start fixing setter functions for null values.

18 years agoalgorithms: Add PRPs as objects in their own right.
Mark Wooding [Sat, 28 Jan 2006 18:07:53 +0000 (18:07 +0000)]
algorithms: Add PRPs as objects in their own right.

18 years agodebian: various fixes.
Mark Wooding [Sat, 28 Jan 2006 14:41:08 +0000 (14:41 +0000)]
debian: various fixes.

  * Adopt Debian standard package naming.
  * Improve package descriptions.
  * Set up dependencies according to policy.

18 years agopassim: fix typo
Mark Wooding [Sat, 28 Jan 2006 14:26:52 +0000 (14:26 +0000)]
passim: fix typo

`tp_iternexr' instead of `tp_iternext'.

18 years agogf.c: remove stub file
Mark Wooding [Sat, 28 Jan 2006 14:04:24 +0000 (14:04 +0000)]
gf.c: remove stub file

This file never really got off the ground; the stuff that was meant
to go in it ended up in mp.c ages ago.

18 years agoExtract Subversion ignore data.
Mark Wooding [Sat, 28 Jan 2006 13:55:26 +0000 (13:55 +0000)]
Extract Subversion ignore data.

18 years agokey_qtag fixing.
mdw [Tue, 27 Sep 2005 11:27:14 +0000 (11:27 +0000)]
key_qtag fixing.

18 years agoBuffer sharing and subbuffers.
mdw [Tue, 27 Sep 2005 11:27:03 +0000 (11:27 +0000)]
Buffer sharing and subbuffers.

18 years agoCheckin, Debianized and more or less complete.
mdw [Mon, 26 Sep 2005 12:58:11 +0000 (12:58 +0000)]
Checkin, Debianized and more or less complete.

18 years agoFix for Cygwin.
mdw [Thu, 15 Sep 2005 11:58:36 +0000 (11:58 +0000)]
Fix for Cygwin.

18 years agoVarious other little bits.
mdw [Tue, 21 Jun 2005 07:15:39 +0000 (07:15 +0000)]
Various other little bits.

18 years agoModularize the password safe.
mdw [Tue, 21 Jun 2005 07:11:00 +0000 (07:11 +0000)]
Modularize the password safe.

18 years agoMore fixing for modern Pythons. No longer works with 2.2. Sorry.
mdw [Fri, 29 Apr 2005 13:11:19 +0000 (13:11 +0000)]
More fixing for modern Pythons.  No longer works with 2.2.  Sorry.

18 years agoUse default python to build.
mdw [Thu, 28 Apr 2005 09:41:54 +0000 (09:41 +0000)]
Use default python to build.

18 years agoFixing for Python 2.3 and later.
mdw [Wed, 27 Apr 2005 23:40:07 +0000 (23:40 +0000)]
Fixing for Python 2.3 and later.

19 years agoVarious minor fixings.
mdw [Sun, 10 Apr 2005 23:38:11 +0000 (23:38 +0000)]
Various minor fixings.

19 years agoInitial check-in of catacomb-python.
mdw [Sun, 10 Apr 2005 18:03:11 +0000 (18:03 +0000)]
Initial check-in of catacomb-python.

19 years agoImport catacomb-python.
mdw [Sun, 10 Apr 2005 17:59:47 +0000 (17:59 +0000)]
Import catacomb-python.