Example of signed web-content with one certificate and all 4 meta tags specified.
signature file: SHA1(index.html)= 2da960b664de83395166494764461477cef48dd9651434a149dcb536ef1c50176c946fcc7d841559f940b186eaa77efa373f31c17613193e5b54ca3864bc9daab37e5ee2bca12cc96cbe919b8f2754a432ef75f1b1a11025cfb00a23ef7fea3c15bea3e3b837d644361d1196a7b3381a33682b6bd669c0df611f19bb6cfd6a37 Bendtsen Expires March 2, 2005 [Page 33] Internet-Draft cryptographically signed web-content September 2004 7.3 2-crt-sigsys-all-4-meta/index.html HTML file:Example of signed web-content with 2 certificates and all 2*4 meta tag sspecified. This one is timestamped by a 3. party.
signature file: index.sign: SHA1(index.html)= 0a79aa4b060c4d0460bb8f85ec74e3b94ad067971adda350601812781c107c536594f9758b57c9075eedad7c6af17427a9740f7c633aff1278fe0ff33e2e953f3ca5fd6c5bc2b38f8c3dd4e33307ee0d30f8e8a9029ed21c4990b1ee9a8d013969f809833668d648dc6b3967aacf1f48d7f094bc7c8a431394a12fa87abc33da timestamp.sign: SHA1(index.html)= 7f04d339be316d78fb8ad9a7b8e45e3a4fb263947a7651779de0264177365958c62d33e91ab36c8f13b328171452511bd5ec73f74dfead385ec5220e2baac03624743b28035ffcced08a57c1f4debcfd5aa240064130b0616d3221dc765d0ff3ec333229e7670db5a13c5dd8c3effc2c005e08c86ab603926d4978503d2aaa27 Bendtsen Expires March 2, 2005 [Page 34] Internet-Draft cryptographically signed web-content September 2004 7.4 2-reverse-signature-systems/index.html HTML file:Example of signed web-content where the actual signatures does not come in the same order as it is listed in the meta tag that informs which signature systems are used.
signature file: index.asc: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: index.html iD8DBQBBXJ6ztD2zoXULtBcRAuXBAKDTMHxefR+4/b2SaRVFBGwJpPsF5wCg+vj4 00NTGVdi/mFvXfDNCcYiq6s= =V7K2 -----END PGP SIGNATURE----- index.sign: SHA1(index.html)= 86155645d1c2548688b9b646d7a9a5199546ca8682308fa965252080bf748f038dfd8be1024c6cb4af901ba5e8a2c2991ae74ff090deb87dda336aafdb921c2a0ef4cd577e00e080baf532ffc06a281bf318f96d95805fd8dbacb810d87d3b74c748d70b78808eaea28e4ac4d04425a8043eb8e5b3303a4ab3cfdc5bc47bb0af Bendtsen Expires March 2, 2005 [Page 35] Internet-Draft cryptographically signed web-content September 2004 7.5 2-signature-systems/index..html HTML file:Example of signed web-content where the actualy signatures comes in the same order as it is listed in the meta tag that informs of which signature systems are used..
signature file: index.asc: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: index.html iD8DBQBBXJ7EtD2zoXULtBcRAuZiAKCgoWF0ufto910vj4jkNKLhyug+cwCg8McZ 2utjHOrHNO+7d5gjuUAxbto= =jUQF -----END PGP SIGNATURE----- index.sign: SHA1(index.html)= 3295a994d42b922d599736fe83c8249eadac900faa2a34ff39fdd27f8542fd1f91b4427bf78f1ef573bf5a9d26b6738e06b0d6c76ad6d45c329770dacf65ccf9fabfb83cc933261912d4776435aa5e9d50c361b88202912d40d3a0d5c259ff064bf5d85dde6acf73b8346d4e273cb13ec4b324fcb0c3bb6617532777d6bde594 Bendtsen Expires March 2, 2005 [Page 36] Internet-Draft cryptographically signed web-content September 2004 7.6 common-meta/index.html HTML file:Example of signed web-content where the rootCA and CRL are commonly specified.
signature file: index.sign: SHA1(index.html)= 95c1136db5a89ad58b568d2ca2a346b7d377deac643b16f419323407b2e1c5612a775a18707d40eb4454b4b0514909940490e256fea995a84650f2c08432eb5ed1e45dd7232c7faf2e6df0ee2652cbe04a01b58938ab9532b558e333c4789c6e5c0b3bb4b404863c45a70f926c98a3bc4c99a8719151e73a87b64390fe72835e editor.sign: SHA1(index.html)= 3079820d04755b2aeba30d63d9cff8abc2d517c6a1bf925c03282202c4f12eec054e9c8ae59442240a9de6d554b16c0ba7e9de0a8927c34bb6a5613f163763760f229a628aec43677d8f0a6dd066ad4f30c8aaa49861619c05888e1f5423f27a3294901b2863fa6d5e64bb6c90caa6bf14c12e65a282ec321a9fe2ecd58212fd Bendtsen Expires March 2, 2005 [Page 37] Internet-Draft cryptographically signed web-content September 2004 7.7 fake-certificate/index.html HTML file:Example of signed web-content using a false and revoked certificate.
signature file: SHA1(index.html)= 7972f0d56f0646499140ef59b8388a2d985e14dc2f3973dee014a59b1857aeb0fb7dfba77a5aa26fb7c1002c06befdac595519b06c1c507e14427104f15192e99b21a58daf33aa386707c333c93ce40201ce1b2f477be7c91e8223ac3808a87d2c68b4bf1e0e127a273ffb321a706a636e8c0b6ec348f7d9db7bd65f2eb693aa Bendtsen Expires March 2, 2005 [Page 38] Internet-Draft cryptographically signed web-content September 2004 7.8 just-signature-system-meta/index.html HTML file:Example of signed web-content where only the signature system is defined, and the signature, the crt, and other stuff will have to be downloaded as specified in the RFC.
signature file: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: index.html iD8DBQBBXJ/LtD2zoXULtBcRAvvHAJ9a2GoR+0czP2H3YzjYyjbsK2KuxgCgtcaV NWLgApGYcQbve07rLPeL158= =wlfv -----END PGP SIGNATURE----- Bendtsen Expires March 2, 2005 [Page 39] Internet-Draft cryptographically signed web-content September 2004 7.9 non-verify/index.html HTML file:Example of signed web-content that does not verify.
signature file: SHA1(index.html)= 2da960b664de83395166494764461477cef48dd9651434a149dcb536ef1c50176c946fcc7d841559f940b186eaa77efa373f31c17613193e5b54ca3864bc9daab37e5ee2bca12cc96cbe919b8f2754a432ef75f1b1a11025cfb00a23ef7fea3c15bea3e3b837d644361d1196a7b3381a33682b6bd669c0df611f19bb6cfd6a37 Bendtsen Expires March 2, 2005 [Page 40] Internet-Draft cryptographically signed web-content September 2004 7.10 overrule-common-metas/index.html HTML file:Example of signed web-content where the commonly specified rootCA and CRL are overruled, because a 3. party timestamper signed the content.
signature file: editor.sign: SHA1(index.html)= 3f193a3f8a60f2866685a446fbcc2a42fc43d0101917d326a1e758f2cd6024bd4494f8dc79dba68d5ca4332c4b61c77a5d3870c4d9e0adf526614f5cbb242476736ebd791ef8777719e583d56314b6205cf8e307032361faa5b02c8c60c1f3af812ba4d97df1efe0272dc93d20406defcd79a96e58e8f196f218d7d16e001b5b jon.sign: SHA1(index.html)= 342ecb5a176c958e7f2664110a032c3fe7d8cd33c86e75911a9c3944d6d664319bb713ba94321d345b2fecc65da4062faefb3e4b7a11452b1bfc7cb9f89c74905e545c4bf5f457b6aaf4cf3d6006ad1c8213b92c80ce783a9522391df52c05bf097967c4e5d71bfcbe31632bb56ae17ce685d565c110d4e394aaefd0bab768bb timestamp.sign: SHA1(index.html)= 69e0dfbee60a9848a02600e0289c9f894fff075729e1a050fab8afe784483d12cf1159be92d77fc6f1aca460feceed19ff39313b27dab219a0a4b9a05793675b594b5a1bbc163b8f97822dee4f7251ac9746ee615bd00feabaacb3d40dc662834d418ad09483e686fa469e299e254c37959c8f55e4025c8f3bf97525d133f216 Bendtsen Expires March 2, 2005 [Page 41] Internet-Draft cryptographically signed web-content September 2004 8. Security Considerations This section has been tried written as described in the RFC for writing Security Considerations, [RFC3552]. If implementers of the method described in this document are not done with enough care, the method is useless. Any implementer MUST pay attention to deliberately malformed meta tags, and ensure that this can not be used in a buffer overrun, or other compromises. Besides this, care MUST be taken about which certificates to trust. Generally the name of the certificate MUST match the name of the web-server, but the user SHOULD be warned and be able to trust the certificate anyway, like with the current SSL solution. 8.1 Confidentiality Confidentiality does not apply to signing of web-content because anyone can download it and read/view/verify it without having their identity revealed to the signer/author/publisher. And for the publisher, the entire point is to publish so anyone can read it. 8.2 Data Integrity The entire point with the method described in this document is to allow the user to trust that the data has not been changed, and that the author is who the author claims to be. The cryptographic signature systems used in the method described in this document should allow the reader/viewer to trust that the data has not been changed since the time of signature, so this document will assume that the cryptographic signature system used gives that protection. 8.3 Peer Entity authentication - data origin authentication Is the author who the author claims to be? The certificates are used to give the reader/viewer trust in who the author really is. X.509 certificates uses a central root CA to prove the identity of the author. But these root CA's puts their signature on the certificate as proof of identity for money. This mean that the root CA's has an economic interest in signing as many certificates as possible. You might want to trust the method used in OpenPGP more, because there can be more than one signature on an OpenPGP certificate, which OpenPGP calls a public key. Further more, the signatures includes an indication level of how much care the signer used to verify the identity of the certificate the signer just signed. And there are usually no money exchanged between the owner of a certificate and the signer. Usually they are friends, relatives, family, or just know each other, but they need not know each other prior to signing. The method described in this document allows the author and the reader/viewer to place trust in different Bendtsen Expires March 2, 2005 [Page 42] Internet-Draft cryptographically signed web-content September 2004 certificate systems. This could mean that the user of a program following this method could possibly be given 2 configuration choices: 1. I trust OpenPGP 2. I trust X.509 A 3. option for 3. party signature systems, that the method described in this document allows to be used, MAY be included as well, but this author RECOMMENDS that the configuration option is preset to "I do NOT trust 3. party signature systems". This author further RECOMMENDS that within these 2 or more signature systems, the user is given the choice of: 1. I trust, just verify 2. I DO NOT trust, but verify anyway 3. Do not even verify Peer Entity authentication might be attacked by a man-in-the-middle attack if the attacker gains a X.509 certificate with the same name as the web-server, even if the web-server already has it's own X.509 certificate. This could happen by trying to acquire a signature from another root CA. Suppose that Example Inc. has a X.509 certificate signed by root CA 1. The attacker then makes a similar certificate, but asks root CA 2 to sign the certificate. If so, the attacker can change the content at example.com, or between example.com and the client, and it will still look like it is real content from Example Inc. The author of this document hopes that the root CA's check for similar certificates at the other root CA's before signing it. This author seems to remember that a false X.509 certificate was used some years ago. This could probably happen to OpenPGP certificates as well. 8.4 Non-Repudiation The method described in this document does not provide Non-Repudiation. This means, that a reader/viewer can not prove to a 3. party that the author wrote the contents of the signed HTML document, even if the signature verifies. The reason is that the certificate used to sign the document might have been compromised. Even if it has not been compromised, an author that does not want to stand by the content, can just claim that the certificate has been compromised, and it is impossible to prove otherwise. 8.5 Systems Security Systems Security must be present at both the signer system, and at the verifier system. However, because the signer system, as opposed to SSL does not need to be the web-server that the data is downloaded from. This allows the web-server to be compromised, and one can still verify the content. It also allows the usage of proxies that Bendtsen Expires March 2, 2005 [Page 43] Internet-Draft cryptographically signed web-content September 2004 caches the content, or even that the content is supplied on a disk. The author could store the secret key offsite offline at a secure location and only use it to sign content brought back and forth through a disc. However the author might also choose to do (automatic) signing at the web-server, and the verifier will not be able to tell the difference. Therefore, the verifier can only hope that the author knows the right procedure. Any program following the method described in this document SHOULD inform the signer and verifier of the above possibility at-least upon installation. The verifier must also have Systems Security, and this means that any program following the method described in this document MUST take care to implement not only this method correctly, but also take care when implementing usage, viewing, reading, playing, executing the signed content. At the time of this writing there has recently been 2 remote compromises in major browsers, both in Internet Explorer and the Mozilla family, where a malformed JPEG image could be used to execute arbitrary code. The method described in this document does NOT offer protection against authors that deliberately or not signs malformed content. 8.6 Unauthorized Usage Once a certificate has been compromised one can no longer be sure that unauthorized usage does not happen. Therefore a signer SHOULD revoke, or have the certificate revoked at the slightest possibility of a compromise. 8.7 Inappropriate Usage This method does not protect against signers or verifiers inappropriate usage of the signed content. And it is NOT a watermark system. Any signature can easily be removed and replaced by another signature, or just removed. 8.8 Other Threads This method offers no protection against Denial of Service. An attacker can easily remove the signature, the content, or change the content. But this is no worse than the current situation with no signed web-content. What could be worse is if the attacker gains a trust worthy certificate with the name of the web-server, because then the verifier will see that the content is signed, and that the signature verifies. Therefore care MUST be taken in which certificates to trust. Time of signature? Only the OpenGPG signature system includes a Bendtsen Expires March 2, 2005 [Page 44] Internet-Draft cryptographically signed web-content September 2004 time-stamp, but one can not trust this time-stamp, because that implies trust in the author, which might want to misled you. The solution for this is to use 3. party time-stampers which the reader/ viewer has trust in. Since the method can support more than one signature, and signatures from more than one entity, then the use of 3. party time-stampers is rather easy. The author just has to make sure that both the author and the 3. party signatures are on the document. Any program following this method MAY automatically trust signatures from certain 3. party time-stampers without informing the user that the name of the 3. party time-stampers does not match the web-server name, but this author RECOMMENDS that such an option is left to the user to configure. Notice that the only trust a user should have in a 3. party time-stamper, is that the time-stamp is correct. 3. party time-stampers usually makes no effort to verify the author or the content. Because some signature systems does not include a time-stamp, the 3. part time-stamper will have to insert it's own timestamp. This could be done by a HTML comment, because the time-stamp is not normaly needed by the reader/viewer. However, since this modifies the content, the time-stamper should sign the document before the author does, such that the author signs the time-stamp as well. 8.9 Possible Attacks Eavesdropping is not a problem, because data are meant to be (public) viewable by anyone that can connect to the web-server. Other methods could be used to prevent eavesdropping. Replay is not a problem, because it does not matter if data are sent again. Cryptographic signing is meant to protect against message insertion and modification, or man-in-the-middle but if the certificate is compromised, then messages could be inserted or modified. Another possible attack point is to have a certificate that appears authentic. This method provides no protection against message deletion. All web-content linked in the HTML document SHOULD be signed with individual signatures, such that the reader/viewers browser may choose what content to show, execute, or ... A signer MUST take care to keep the secret key that corresponds to the public key in the certificate secret, such that only the signer knows it. This could be done by storing it on a offsite offline computer, and only bring the content that needs to be signed to and from this computer by a disk. However, storing it at the signers Bendtsen Expires March 2, 2005 [Page 45] Internet-Draft cryptographically signed web-content September 2004 personal computer should generally be considered sufficient. It SHOULD NOT be stored at the web-server that serves the signed content. However it might be hard to sign non-static content, or even content that is semi-static without having the secret key at the web-server. Luckily the OpenPGP allows one to use subkeys, which is very useful here. This subkey could be used with a very short expire date, such that if it is compromised, it wont be useful for a long time. And then the main key can be kept offsite offline in a secure location. X.509 does not offer the same possibility. Bendtsen Expires March 2, 2005 [Page 46] Internet-Draft cryptographically signed web-content September 2004 9. no IANA Considerations This document has no actions for IANA. Bendtsen Expires March 2, 2005 [Page 47] Internet-Draft cryptographically signed web-content September 2004 10. References 10.1 Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2440] Noerenberg, J., Callas, J., Donnerhacke, L., Finney, H. and R. Thayer, "OpenPGP Message Format", RFC 2440, November 1998. [html] World Wide Web Consortium, "The HTML standard, http://www.w3c.org/MarkUp/". [openssl] "The OpenSSL crypto system, http://www.openssl.org/". 10.2 Informative References [RFC3552] Rescorla, E., Korver, B. and Internet Architecture Board, "Security Considerations Guidelines", RFC 3552, July 2003. [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 3629, November 2003. [X.509] ITU-T, "Recommendation X.509 (1997 E): Information Technology - Open Systems Interconnection - The Directory: Authentication Framework", June 1997. [meta] World Wide Web Consortium, "The META element, http://www.w3.org/TR/html4/struct/global.html#h-7.4.4", December 1999. [ssl] netscape, "SSL 3.0 Specification, http://wp.netscape.com/eng/ssl3/". [xmlsig] World Wide Web Consortium, "XML Signature WG, http://www.w3.org/Signature/". Bendtsen Expires March 2, 2005 [Page 48] Internet-Draft cryptographically signed web-content September 2004 Author's Address Jon Bendtsen Department of Computer Science University of Copenhagen Tagensvej 52, v.707 Copenhagen N 2200 DK Phone: +45 2211 6623 EMail: bendtsen@diku.dk URI: http://jbit.dk/ Bendtsen Expires March 2, 2005 [Page 49] Internet-Draft cryptographically signed web-content September 2004 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director. Full Copyright Statement Copyright (C) The Internet Society (2004). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Bendtsen Expires March 2, 2005 [Page 50]