summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/sign/README
blob: 952dec5a40a854fc328a9b93a49b7e78102e4eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
To sign packages in a transparent way:
gzip files can handle an extra field at the beginning that
stores anything we wish.

So it's just a question to choose a format for the signature, and to
embed it there.

We use the extra field to store signatures.  Each signature consists
of a 6 bytes type marker, a 2 bytes length, followed by the signature
itself.  We can potentially stack signatures: resign a signed archive
by just prepending the new signature to the extra field.

To check the first signature, the checker just needs to extract it, pass it
off to the checking protocol (e.g. PGP), followed by the unsigned archive
(e.g., regenerate the gzip header  without the first signature, then put
the gzip data).

* Signed archives just look like normal .tar.gz files, except for programs
that use the extra field for their own purpose,
* Possibility to grab the files off the net and extract stuff/verify
signatures on the fly (just need to wedge the checker as an intermediate
pipe)
* Pretty simple, small portable code to be able to check signatures
everywhere (the signer itself needs getpass and corresponding functionality)

The scheme should be extensible to any compressed format which allows for
extended headers.


Thanks to Angelos D. Keromytis for pointing out I did not need to
uncompress the archive to sign it, and to other members of the OpenBSD
project for various reasons.

--
	Marc Espie, 1999
	$OpenBSD: README,v 1.2 1999/10/04 21:46:27 espie Exp $