PRISM_Proof Email Key Generation and PublicationComodo Group Inc. philliph@comodo.com
General
EmailS/MIMEOpenPGPPKIPKIXRequest For Comments This document describes previous efforts and their deployment legacy and the requirements for a successful email security infrastructure. A gap analysis is performed and the tasks divided into problems that are generally considered solved albeit possibly requiring improved execution and problems that may be regarded as research. This division of the problem space into 'execution' and 'research' portions allows different groups of developers to address each independently and avoid unnecessary duplication of effort. A testbed for development and early adopter deployment that achieves this separation is described. Generating a public keypair and registering it for use should be the only occasion on which a user is required to think about their cryptographic security. Nor should the user be required to think too much in this circumstance either.To enable others to send encrypted email to them, a user must at minimum generate at least one public keypair and make the public key portion available to the intended communit of potential senders. The precise means by which this is achieved may be considered a hard research problem. Accordingly this specification anticipates such processing being performed 'in the cloud' (i.e. by magic) and describes a Web Service interface that may be used to Twenty years of effort attempting to deploy secure email has left a considerable legacy of deployed code. While this deployed code base is not ideally suited to the task (or the problem would be solved already) it is generally better to support use of such deployed resources where they exist rather than attempt to build everything from scratch. One significant design consequence that flows from this approach is to adopt ASN.1 encoding for cryptagraphic data objects, including the Key Endorsement object described in this document. While there are many better choices of data encoding and remarkably few that are worse, most cryptographic toolkits provide support for parsing X.509v3 certificates and generating Certificate Signing Requests and many provide comprehensive support for a wide range of ASN.1 encoded objects. A Strong Key Identifier is an identifier that identifies a unique public key formed using a strong Message digest function over the public key parameter values.This definition of Key Identifiers is considerably more restrictive than the PKIX definition which allows an issuer to use any unique string for the subjectKeyIdentifier and authorityKeyIdentifier extensions.Compliant certificate issuers SHOULD use Strong Key Identifiers as specified in this document for PKIX Key Identifiers.A strong Key Identifier takes one of the two following forms: The Key Identifier is an OpenPGP v4 Key fingerprint calculated as specified in [!RFC4880] The first byte specifies the digest algorithm and the following bytes the digest value calculated over the DER encoded SubjectPublicKeyInfo. The following algorithm values are assigned in this document: SHA-2-512 truncated to 128 bits.SHA-2-512 truncated to 224 bits.SHA-2-512 truncated to 256 bits.SHA-2-512 without truncationReserved for use in a future multi-byte algorithm identifier scheme.To prevent a downgrade attack in which an attacker truncates a longer Key Identifier, the input to the message digest function is prepared as follows: Let V be the algorithm identifier value and D be the DER encoded SubjectPublicKeyInfo and + stand for simple concatenation. Key Identifier = H (V + D)If it is necessary to present a Key Identifier to an end user, Base32 encoding is used. Additional dash (-) characters MAY be added to improve readability and MUST be ignored by compliant applications.To establish encrypted communications it is necessary to know a public key for the recipient and the recipient's security policy. The fact that a recipient is capable of receiving encrypted email does not mean that they are capable of receiving encrypted email on every device they use or that they are willing to accept encrypted email from every sender. A similar problem was faced when using Transport Layer Security [RFC5246] with HTTP [RFC2616]. By default, Web requests are sent without use of security. To force use of TLS, the URI method https is used in place of http. The security policy is encoded in the URI. Strong email addresses allow an email sender to encode the security policy in an RFC822 [RFC2822] compliant email address. RFC822 defines the 'user name' portion of an email address as follows: In a Strong Email Address, the character '?' is reserved. Although this is a legitimate account name in some operating systems, use is prohibited in current editions of Windows and most UNIX based operating systems. The address syntax is modified as follows: Addresses of the form indirect-key, direct-key and nokey are interpreted as follows: Messages sent to the address MUST be encrypted under an encryption key that the sender determines to be trustworthy. If the public key specified by the Key Identifier is an encryption key, messages sent to the address MUST be encrypted under the specified key. Otherwise messages sent to the address MUST be encrypted under an encryption key that has a direct key endorsement under the specified key. Messages sent to the address MUST be encrypted under an encryption key that has a key endorsement under the specified key. A frequently overlooked hazzard of using encryption is the risk of data loss should the private key be lost or otherwise become unavailable. Another practical difficulty that must be faced is the need to enable encrypted email to be read on more than one device. Once published, a strong email identifier effectively becomes a personal root of trust, the value of which may increase over time. Each of these use cases requires some form of private key backup and recovery mechanism. While such mechanisms have traditionally been considered to be an implementation choice that is outside the scope of a protocol specification, to do so incurs a substantial risk of a large number of bad implementation choices. In particular the need to enable receipt of email on multiple devices requires a standards based approach or else applications provided by different vendors will not be able to exchange keys.While a Key Escrow capability provides a Key Backup capability, the reverse is not true. A Key Escrow system is generally understood to support recovery of the private key without notice to the private key holder while a Key Backup system need not meet this requirement. A publication service MAY support Key Backup and Recovery. A user MAY choose to use the Key Backup and Recovery function supported by a Publication service. If Key Backup is used, the key management client encrypts the private key under a strong symmetric key and sends the encrypted data to the publication service. The information necessary to recover the private key is presented to the user in a compact form that MAY be written down and stored without risk of hardware failure rendering the key inaccessible. Private Keys are encrypted using the PKCS#8 format as specified in [RFC5208]. This specification is prefered to the PKCS#12 [I-D.moriarty-pkcs12v1-1] format as the latter is essentially a wrapper for multiple PKCS#8 keys and associated certificates that can be generated by a publication service if necessary. Key management tools MUST support the use of AES-256 to encrypt private keys. AES is prefered over AES-128 for the greater number of encryption cycles rather than the increased brute force work factor. Applications MAY use encryption keys with lengths less than 256 bits provided that the keys have a length of at least 128 bits. If the key size used is shorter than the key size required by the encryption algorithm, the HKDF-Expand function described in [RFC5869] is used to expand the truncated key to provide the necessary number of bits. Keys are presented in BASE32 encoding [RFC4648] with optional separators '-' to improve readability. Applications MUST ignore separators when decoding the keys. Key Management tools MAY support the use of a key splitting scheme to allow greater control over key recovery. For example, the user might split their key into three parts with a requirement that two parts are necessary to reconstruct the key. At this point the author has a paper by Rober Blakely Snr on an out-of-patent key splitting scheme but insufficient time to read the paper let alone write and implement the specification. If anyone is looking for something to do, that would be useful. Alice uses a key generation tool to generate a public keypair. The public parameters in hexadecimal are: Send email to Alice using encryption if and only if an encryption key for Alice can be found and Alice has published the email encryption policy 'encryption preferred' or stronger.Send email to Alice using encryption if and only if an encryption key for Alice can be found, otherwise report an error.Send email to Alice using encryption if and only if an encryption key for Alice can be found that is directly endorsed under the specified key, otherwise report an error.Send email to Alice using encryption if and only if an encryption key for Alice can be found that is (directly or indierectly) endorsed under the specified key, otherwise report an error.The private key component of Alice's key is as follows:The private key is encrypted under a randomly assigned symmetric key using PKCS8 encoding.The cipher (specified in the PKCS8 object) is AES-256. The password value in Base-32 encoding is: The precise means by which a public key is validated by a relying party is outside the scope of this specification. Keys MAY be validated by a traditional Certificate Authority or through peer to peer endorsement or any combination of the two. In order to maximize the flexibility for the trust infrastructre designers, two syntaxes for presenting public keys for use are supported. Key Management tools SHOULD support both: May be presented to a CA or other signer.Presents the public key in a form that many Internet applications accept directly.Certificate Signing Requests SHOULD conform to the following profile: The Key Identifier MUST be specified and MUST be a strong key identifier[[Prohibit various PKIX lunacies]Self Signed Certificates SHOULD conform to the following profile: The Key Identifier MUST be specified and MUST be a strong key identifier[[Prohibit various PKIX lunacies]Traditionally PKIX only permits use of Certification Authority provided trust assertions while OpenPGP only permits use of peer endorsement through key signing. PPE supports the use of a combination of both approaches for reasons described in [I-D.hallambaker-prismproof-trust] To perform peer endorsement, the following data structure is used: [[Note that although my tool generates ASN.1 encoding this is for purely pragmatic reasons of providing consistency. It is not meant to in any shape or fashion stand for an endorsement of this crackpot technology.] A new structure is introduced to support Key Endorsement rather than attempting to re-use the X.509v3 Certificate format in recognition of key endorsement having distinctly different semantics from issue of PKIX certificates. PKIX certificates are either end entity certificates or certificate signing certificates. A PKIX certificate is expressly prohibited from being used for both purposes. In the PKIX model, finding a certificate chain to a trusted anchor is necessary and sufficient to establish the trustworthiness of an end entity certificate. In the Key Endorsement model the reliance on a single key endorsement MAY be qualified by the age of the endorsement, the circumstances of issue, the number of independent trust paths from the relying party to the subject and the lengths of each path. Most of the fields in the TBSEndorsement structure have the same semantics as in PKIX with the exception of the Validity interval which is replaced by the time of issue. The precise mechanism by which endorsement is used requires further development. At minimum, the endorsement mechanism should allow the following forms of endorsement to be differentiated: A endorsement of a user's key identifier by another key held by the same user. This form of endorsement allows a user to establish a personal master key that is only used for the purpose of endorsing keys for specific uses (email encryption, email signature, endorsement, etc.) A user endorses the key identifier of another user (the subject) and possibly other aspects of the subject's identity such as their name, likeness etc. Such an endorsement SHOULD specify the basis for the endorsement (in person, remote, recent acquaintance, verification of government documents, childhood friend, etc.)One of the use practices that has emerged from attempts to employ PGP is the 'key party' in which groups of users perform mutual keysigning.In certain circumstances, it MAY be necessary to withdraw an endorsement. The reason for withdrawing the endorsement SHOULD be specified in the UnEndorsement notice and MAY include, notification of the loss of the private key, the subject is deceased, etc.)The Publication Service is a JSON/REST Web Service layered over HTTP transport. Although the publication service performs an important service, it is not a service trusted by the user since the publication service has no access to the user's private key (except in encrypted form) and does not sign any data that is read by the user. The Publication Service is one of the two interfaces between the part of the email message security problem that is well understood and the part that is widely regarded to be 'research'. Selection of the publication service MAY be left to individual user choice or a domain name holder MAY specify that publication requests be directed to a specific publication service. Users of a public email service are likely to want to insist on their own choice of publication service while a bank or government enterprise that has deployed its own security infrastructure is likely to want to insist that only credentials they approve are accepted for their site. To allow researchers the widest possible lattitude in developing new trust infrastructures, publication of three trust assertion formats are supported together with support for key backup and recovery. These assertion formats are: A PKIX self signed certificate which MAY be used in conjunction with an existing application that accepts public key information in self signed certificate form.A PKCS#10 Certificate Signing Request conforming to [!RFC2986]. A publication interface MAY forward the Certificate Signing request to a Certificate Authority for issue of a PKIX end entity certificate.A Key Endorsement in the format described in this document. The first time that the Publication Service is used is after the user generates a new keypair. For example, Alice registers the keypair generated in the previous example with her chosen Publication Service. Her key management tool makes an Assert request to the service with the following information: The Strong Key IdentifierThe Encrypted Private KeyA Self-Signed CertificateA Signed Certificate Signing RequestService information describing the email service parameters to be used when sending messages using the corresponding email account. [[Which really should be encrypted, shouldn't they?]Request Response Alice uses several different devices to read her email and she would like to be able to read encrypted emails on all of them. This requires that the private key be installed on each of the devices that she might want to use. Alice provides either the Key Recovery Passcode or a sufficient number of Key Shares to reconstruct the passcode to the key management tool running on each device. The device then requests recovery of the private key and associated service information: Request Response Providing the service information with the private key allows the key recovery tool to automate configuration of the user's email account on the device if this has not been done already. Using the key recovery mechanism to support key transport between devices simplifies the initial coding task at the cost of a sub-optimal user experience for the user with a large number of devices in use and/or frequent key updates. Future versions of the specification may adopt a different approach to key recovery in which each device in which keys are to be installed establishes a device specific keypair which is in turn used to automate the key transport. A key concern in the design of such a scheme being to prevent a weak random number generator on one device causing the private key to be compromised. Should the private key be lost, the subject be deceased or some other event occur that renders the key no longer servicable, a revocation statement is generated and issued. Such revocation statements use the Revoke request and the key endorsement message format: Request Response From time to time, Alice meets other PPE users and they endorse each other's keys. The AssertRequest is used to submit one or more signed key endorsements: Request Response A key endorsement MAY be submitted to the Publication Interface by any party including the signer or the subject. Register an assertion set. The Assert transaction is used when a keypair is first created to register the new Key Identifier, Self Signed Certificate and Certificate Signing Request and to request revision of embedded attributes such as the email security policy. The Assert transaction is also used to request registration of Key Endorsements. String [0..1] Principal Email address associated with the account String [0..Many] Additional Email addresses associated with the account. String [0..1] DNS Address of Service String [0..1] SRV format protocol identification prefix. Integer [0..1] IP Port number Boolean [0..1] If true, use of TLS is required String [0..1] Security policy description Binary [1..1] PKCS#8 Encrypted Private Key as specified in [!RFC5208]. Binary [0..1] Release Code value for authorizing private key recovery requests. If specified the service MUST NOT release the encrypted private key unless the requestor satisfies a challenge-response request that establishes knowledge of the Release Code. Register an assertion set At present only a single Key Identifier may be registered per request and no provision is made to link related requests. This is likely to become necessary when different keys are being used for key endorsement, signature, encryption and master purposes. Binary [1..1] Strong Key Identifier formed using a message digest function over the DER encoded Public Key Info block. EncryptedKey [0..1] Encrypted Private Key and associated attributes. Binary [0..Many] PKIX Certificates to be registered, comply with [!RFC5280] and additional profile constraints specified here. Binary [0..Many] Certificate Request in [!RFC2986] format. Binary [0..Many] Key Endorsements as specified in this document. Service [0..Many] Service connection information for associated services. For example, email IMAP [!RFC3501], POP3 [!RFC5034] and SUBMIT [!RFC4409] accounts. Response to an assertion registration request. It may be useful to expand the response to allow the gateway to provide information such as certificates issued in response to the certification request but these will typically require some form of validation and thus be returned asynchronously. Recover a previously registered encrypted private key file from the service If the Key Identifier cannot be found or there is no release code associated with the encrypted private key, the transaction is complete after the first response. Otherwise the service returns the status code 'ChallengeResponse' in response to the initial request and the client MUST make a second request in which it establishes proof of knowledge of the release code to complete the transaction. Request recovery of a previously registered encrypted private key. Binary [1..1] Key Identifier of key pair for which recovery of the private key is being requested. Binary [0..1] Client challenge value for proof of knowledge of the release code. Binary [0..1] Answer value for proof of knowledge of the release code. Respond to a recovery request. If the encrypted private key associated with the specified Key Identifier has an associated Binary [0..1] PKCS#8 Encrypted Private Key as specified in [!RFC5208]. Binary [0..1] Server challenge value for proof of knowledge of the release code. String [0..1] Digest algorithm for proof of knowledge of the release code. Publish a revocation meta-assertion Regquest revocation of a previously registered key and all related certificates and endorsements. Note that whil key revocation necessarily entails revocation of all the certificates and endorsement associated with the key, the reverse is not the case. A user may revoke a certificate granting use of a key for encrypted email without wishing to revoke a certificate for the same key granting use for signed email. Binary [1..1] Key Identifier of Key to be revoked. Binary [0..1] Signed Key Endorsement object with the 'revoke' attribute specified. Response to revocation request. I am sure there are some.Thanks to the many people who have encouraged me in this work and in particular the members of the IETF PERPASS list and the Cryptography mailing list. Future versions of the draft will have a more complete list.Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) ProfilePKCS #10: Certification Request Syntax Specification Version 1.7INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1Message Submission for MailThe Post Office Protocol (POP3) Simple Authentication and Security Layer (SASL) Authentication MechanismPRISM Proof Trust ModelInternet Message FormatOpenPGP Message FormatPublic-Key Cryptography Standards (PKCS) #8: Private-Key Information Syntax Specification Version 1.2The Base16, Base32, and Base64 Data EncodingsHMAC-based Extract-and-Expand Key Derivation Function (HKDF)PKCS 12 v1: Personal Information Exchange SyntaxHypertext Transfer Protocol -- HTTP/1.1Department of Information and Computer ScienceWorld Wide Web ConsortiumCompaq Computer CorporationWorld Wide Web ConsortiumXerox CorporationMicrosoft CorporationWorld Wide Web ConsortiumThe Transport Layer Security (TLS) Protocol Version 1.2