request for comments on "electronic notebook"

Ivo Alxneit ivo.alxneit@psi.ch
Thu Aug 7 20:23:02 2003


--------------Boundary-00=_PRI9M859OYEC1IVTKW33
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

could you please comment on whether the following scheme implementing
an 'electronic notebook' based on free software holds.

i define an 'electronic notebook' as a journal, from which you later
can verify that you had an idea or that you did a measurement during
a certain time periode. thus later manipulations on the journal or on
the measured data should be detectable. it should not, however,
protect the data (against deletion/manipulation,...) nor should it
prevent preying eyes from accessing it. also note that i am not
concerned whether the journal would suffice as legal evidence in
court as this may be different from country to country.

the journal is a flat text file with the following structure:

   .
   .
   ## date, begin item n-1
   text line 1
   text line 2
       .
       .
   text line n-1
   text line n
   ## date, end item n-1
   ## stamp n-1
   ## date, begin item n
   text line 1
   text line 2
       .
       .
   text line n-1
   text line n
   ## date, end item n
   ## stamp n
   ## date, begin item n+1
   text line 1
   text line 2
       .
       .
   text line n-1
   text line n
   ## date, end item n+1
   ## stamp n+1
       .
       .
      =20
    =20
text lines starting with ##DATAFILE foo have a sha1 hash sum of the
file foo added to them. this will be done before an entry is closed
by setting the end marker and generating the detached signature (see
later).

each entry in the journal has a start marker (including date and time
when the marker was issued) and an end marker (again with date and
time). a stamp is added to each entry after its end marker. stamp n
is formed as follows:

a detached signature of entry n including stamp n-1 is created (after
the end marker has been set and the hash sum has been added to files
marked by ##DATAFILE) (gpg --detach-sign --armor) with the key of the
journal's owner (or anybody else having access to the journal). the
first item does not include a previously issued stamp of course. the
detached signature is then emailed to clear@stamper.itconsult.co.uk
where it is clearsigned and returned to the sender. the clearsigned
message contains the original detached signature and a time stamp
stating when the message was signed.

this stamp is the added to the end of the journal.

later any entry in the journal can be verified like this:

 - stamp n is extracted from the journal and its signature verified=20

 - the signature of entry n (stamp n-1 up to end marker item n) is
 extracted from stamp n and verified

  - any file marked with the keyword ##DATAFILE lines is verified by
 calculating its hash sum and comparing it to the one stored in the
 journal

only an unaltered entry in the journal will pass the first two
verification steps. verification step three is used to detect
modifications on files marked by ##DATAFILE keywords. the time/date
given in an entry's start and end marker specify the time period
during which the entry was made. as they are covered by the cleartext
signature they cannot be altererd later. to verify that an entry was
indeed made during the time period claimed, the verifier should check
that the time/date stated in the corresponding stamp is reasonably
close to the time/date of the end marker. it is, however up to him to
decide what "reasonably close" means (minutes/hours/...). to decide
whether to trust the stamp issued by stamper.itconsult.co.uk please
consult their web page (http://www.itconsult.co.uk/stamper.htm).

it becomes impossible to insert a new item in the middle of the file
because the detached signature of item n includes the stamp of item
n-1. however, if somebody deletes everything from the end marker n
(including it), the person could then change item n, and then
generate a new end marker and stamp. i believe that this scenario is
unimportant as the new stamp n would bear the date of when it was
issued. thus a falsified priority claim could hardly be manufactured
like this. also on accounts where regular (dayly) backups are made
such a modification would be noted.

the 'electronic logbook' can be shared among different users as it is
unimportant whether all detached signatures to be signed by
clear@stamper.itconsult.co.uk are issued by the same key.

so all you need for this 'electronic notebook' is:

- - a text editor
- - gnupg (/ pgp)
- - a secret key
- - stamper's public key
- - access to email

for those wanting to play around with the idea i have attached some
bash/perl scripts that automate the basic tasks (yes i know they look
awfull). ideas how to automate sending the detached signature and
retreiving the stamp are wellcome. simply piping it into mail does not
work as i cannot receive email on my working computer and i do not
seem to be able to specify an modified from adress.

- --=20
Dr. Ivo Alxneit
Laboratory for Solar Technology   phone: +41 56 310 4092
CH-5232 Villigen                    fax: +41 56 310 2624
Paul Scherrer Institute          http://solar.web.psi.ch
Switzerland                        gnupg key: 0x515E30C7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/Mp5OAd7CE1FeMMcRAj1NAJ4qi1snwjKWnWof6zTVAf24MUQGOwCgigpg
wSe6RISXko4vaSlivm1f+XA=3D
=3DsWnz
-----END PGP SIGNATURE-----

--------------Boundary-00=_PRI9M859OYEC1IVTKW33
Content-Type: application/x-tgz;
  name="scripts.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="scripts.tar.gz"

H4sIAMWbMj8AA+0b/VfbOJJfk79CGO8LUILjQOAKG/boQXncuy28pXu/NDQYWyE+HNtnO1Be2/3b
b0Yftuw4JFA+du95XgtYGs1II2m+JFmO048TaxQuPB+0zFZru9NZaAFsb23mfgO0W9vbC/Df3OyY
na1NwDPbW1vbC6T1jH1KYQyjjwhZsLwvPnWTqXiz6v+isLRoXLq+cWnFw/pSfYnc0Ch2A5+Y6y32
PY7pDrHkIiH8pxdcDVyPMgT6JYksO4lJMqQkcUdU4AyiYMTKYuuGOoSOLNfjVdDI8h0kGhM3IUnA
0CTNujsgn4i+RJo+JW1yvou1fr1G7WFAtJEbx65/RUIrskY0oZEma8i9XUW0L8DMrA9cwWKRNAdE
N4sceDMoF6zyLS0/vqVR9+IqoiHR3uMYcWA0+jtrR6N1N7EDPx57ybodrI+vNSB1wRlqOm+tkS7R
tCJf17+xPNchkv/UHk/IRAwRa+7tc4Iz0DShH22trEtNhMMPB+T06JScHR992P/4+2+HrHSit7yX
ludF1HLuUOowxzCTWV/yfeCtGK13h0fHH1Iehwfk18Ozs/0jyWiPJKOwz5aCbSU4Ed9IDMRJw1wz
ZhMwnAbZU2jUoafJOIYZC69Is8m/mgOHmPAFi90d3KXIpL1nOPTG8MeeB1zZHB+dnBwAG/i0bq9J
42sYuT70qv29IUSoc5IoQIE7ISxlV0BjehW5yR2xh9S+Jqf7Z2eHByArHGvaj2+EDblJyY6FPxvG
556/qhtfdWf3w+6l1WCF3xsEh6q369SL6RzM3u8f/wvEdesmQ8J7vSO7r5U0B9F/OPnI51ZjsxiN
MsHC37pZf231VcEPgg0bOKH9eGiZz8Zjhv03zU5Lsf9bgL9httqV/X8JWFokxjiOmBMA5ssrOgHr
JpToAx+sLag4ff+3o39/ap3v1jO119qtByH1l09+//ge9MuaxrG1ld367RC12fLPompvhXyt19zB
svF5aelg/+M+FhKDldZ0z/VpV+/vwt9qfS9+s9w7e7N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