[Webfunds-devel] OpenPGP signed Contracts

Ian Grigg iang@systemics.com
Fri, 26 May 2000 11:40:38 -0400


> I've created the OPENPGP branch ...

I've just written a webfunds/ricardian/TODO file.  If it
annoys the scripts because it is not .java, let me know
and I'll move it up a directory.

> As far as I can see now, the following code needs hacking:
> * webfunds/ricardian/Contract.java
>   - this is where all the magic happens

Also keep a weather eye on IniFileReader which does some
basic reading stuff.  It used to be hardcoded to understand
the various headers (BEGIN PGP SIG....) but I have cleaned it
up some.  The reason it has its own Ini reader as opposed to
using the other one in sox or utils is that there are differences
in treatment because of the sigs and hashes, and it will need
its own reader with later generations of XML anyway.  Or
something...

> * webfunds/client/contracts/SignContractWizard.java
>   - this class should not be dealing with X509 stuff at all, so the
>     signature generation code will move to Contract.java

OK .. tentatively.  I think there is some value in having
Contract.java a read-only class, where it doesn't have any
ability to modify contracts.  Most of the work is done with
reading contracts, only a few people ever get involved in
signing contracts, so that's why we've had it separated in
the past.  See how it flies.

> My current question is: How does one create a new contract? I'd like
> to have something to play around with.

(as mentioned by Erwin) normal modus operandi is to take an
old contract and hack out the sig and change the keys.  Then
run it through SignContractWizard.

However, the flaw in that is that you propogate old errors.
There is an error in the current DigiGold_AUG, in that the
first char on one of the lines is ':' instead of ';' ...
The SignContractWizard, or something, should do sanity
checking on all this.

iang

PS: if you do want to write a new contract, you should be
able to add it to WebFunds and do some transfers.  You won't
be able to make money, but zeros and self-transfers should
still work.