Certification/self-signatures
Stephen Paul Weber <singpolyma@singpolyma.net> Sat, 14 August 2010 14:32 UTC
Received: from hoffman.proper.com (localhost [127.0.0.1]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o7EEWIMw053592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 14 Aug 2010 07:32:18 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by hoffman.proper.com (8.14.4/8.13.5/Submit) id o7EEWIND053591; Sat, 14 Aug 2010 07:32:18 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
X-Authentication-Warning: hoffman.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from mail-yw0-f43.google.com (mail-yw0-f43.google.com [209.85.213.43]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o7EEWHQs053586 for <ietf-openpgp@imc.org>; Sat, 14 Aug 2010 07:32:17 -0700 (MST) (envelope-from singpolyma@gmail.com)
Received: by ywf7 with SMTP id 7so1605549ywf.16 for <ietf-openpgp@imc.org>; Sat, 14 Aug 2010 07:32:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:subject :message-id:mime-version:content-type:content-disposition:jabber-id :openpgp:x-url:user-agent; bh=ykSaKbLwvrTc5LcKQ1z6oJfRMQbHiqNDlmk1ajTJ2K4=; b=FGMyDQeo3tFvflV6jTWQcc4ayU4dfip3zn864kfDQcfDWjryA5hNXBUh7uZ2KKnSw6 /HQPTR3bjkP+SK+RdIcGpDRrO/emBAsws6+R8tZS8q6+9CUn9hTzlzGNoZFiAyefxvun W8NjFR4p6wYLGFm/ievK6lfzZQHB2inL5kxrg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:jabber-id:openpgp:x-url:user-agent; b=gz+l50uMBdR8esd46rDPpoQ4zX6xOkBLmrX0LfZvIY3Ea26cxRc78g3ezW3CnLbHrL 4XjHe+Y06PmdF63s2RXuuTVwcoB+gWS2KuEcBm1Pm31qvRgt7hLNTcXJZ89kT1mmH5cA KcrMfmt3XC5r8aLKZZvygLMUwNlgj3fN3fNG4=
Received: by 10.150.160.2 with SMTP id i2mr3531005ybe.314.1281796335468; Sat, 14 Aug 2010 07:32:15 -0700 (PDT)
Received: from localhost (dsl-173-248-208-49.acanac.net [173.248.208.49]) by mx.google.com with ESMTPS id u41sm2167498yba.1.2010.08.14.07.32.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 14 Aug 2010 07:32:14 -0700 (PDT)
Date: Sat, 14 Aug 2010 09:32:11 -0500
From: Stephen Paul Weber <singpolyma@singpolyma.net>
To: ietf-openpgp@imc.org
Subject: Certification/self-signatures
Message-ID: <20100814143211.GA1530@singpolyma-svelti>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; x-action="pgp-signed"
Content-Disposition: inline
Jabber-ID: singpolyma@gmail.com
OpenPGP: id=CE519CDE; url=https://singpolyma.net/public.asc
X-URL: https://singpolyma.net
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: owner-ietf-openpgp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
List-Unsubscribe: <mailto:ietf-openpgp-request@imc.org?body=unsubscribe>
List-ID: <ietf-openpgp.imc.org>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello all! I'm seeking some clarification WRT computing v4 signatures over key data for 0x13 signatures (specifically, the self-signature). The spec says "0x99, followed by a two-octet length of the key, and then body of the key packet". I assume it's always on what would be the body of the public part of the packet? Is this the same as the data used in generating the fingerprint, just without version/timestamp/algorithm octets? Should the length field include the length of the 0x99 + length in it? Should it include the length of the whole public park (including version/timestamp/algorithm)? Then it says "A certification signature (type 0x10 through 0x13) hashes the User ID being bound to the key into the hash context after the above data ... A V4 certification hashes the constant 0xB4 for User ID certifications or the constant 0xD1 for User Attribute certifications, followed by a four-octet number giving the length of the User ID or User Attribute data, and then the User ID or User Attribute data." So, 0xB4 + 4-octet-length + user-id-packet-body ? The pseudocode I'm working with now (which isn't working) is: - ---- material = key_fields.map { |key_field| bitlength(key[key_field]) + key[key_field] }.join 0x99 + material.length + material + 0xB4 + user_id.body.length + user_id.body - ---- - -- Stephen Paul Weber, @singpolyma See <http://singpolyma.net> for how I prefer to be contacted edition right joseph -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJMZqjrAAoJENEcKRHOUZzerpsQAKXYwDdcf1hO8BKGd+AkA0CO 3lWWM/lFgo3ho0gqxDoni9Y3E4eT2VBSJ3mKXrRv0CNy6udyU88rSFECDvcz54CI Z6nf34DKlTbSpfYuR2/8n+bMhUZR/rnRhmj1Vdmxkz2VuheReWyUn1pEMBx3n4HT bVymy9KRQn3qZbR5UT5P8DL7xzLucful00V9aFtTC6CxC2ZHKUNl6RMDH0sPHY4o GEmdnVnlR0VREOgBqPCzAZV3/zcZ+aBqpj7mEi6AtRGvy0Dvi1Pv5YiSgp2tuNDZ Jv0j6G58NB5MqQWtfMttCLQDGhu6K4FNah+X6QSV2j86H00luSCQSSXB05kmd5Tw NSu4ZwjdLJOhCJDivI3LajvFKmCFLBsRZf6G1SmeP1zvv4OHMdw0MeG3g93/3M9V gfpOVi0tvgH8806M77+N/TdBBHrPmqteK4jHAed7NQ6jj0SGdKxp/h0XEfceSQ7w MmvrJkXS8m7MVIRCv9599a/DoKPbLmhXqsH4Fuo6AfmgdOiaNxt6vJDy7nuQdosN fZYekGZtpe2Dmj2NgRbz4pamlm6tuMRqsa1t7Q4jViisf4scB7ecV1FX8izFg/nZ 0wDsBb/FzSZTmZYn1zJvDpzy62JOvDGhnGNrGPmSCJxohUNAFr4b2DJq4nRnbm9F HnVT5e67gsVBXm4Tzz6j =Pt+h -----END PGP SIGNATURE-----
- Certification/self-signatures Stephen Paul Weber