OASIS Digital Signature Services (OASIS-DSS) an Architecture, Implementation and Interoperability Master’S Thesis at Graz University of Technology 2008
Total Page:16
File Type:pdf, Size:1020Kb
OASIS Digital Signature Services (OASIS-DSS) An Architecture, Implementation and Interoperability Master’s Thesis at Graz University of Technology 2008 submitted by Konrad Lanz, bakk.techn., BSc Hons Institute for Applied Information Processing and Communications (IAIK), Graz University of Technology A-8010 Graz, Austria December 2008 © Copyright 2005-2008 Konrad Lanz Assessor: O.Univ.-Prof. Dipl.-Ing. Dr.techn. Reinhard Posch Supervisor: Ass.-Prof. Dipl.-Ing. Dr.techn. Peter Lipp i The candidate confirms that the work submitted is his own and the appropriate credit has been given where reference has been made to the work of others. I understand that failure to attribute material which is obtained from another source may be considered as plagiarism. (Signature of student) Signature Value F4BtvtUqSBPSgBeE2QPp1suVNoU75kZAk05AgIgLKJlMEov7RCAW35vkkEr/HwdR Signatory C=AT,OU=VSig,O=Hauptverband österr. Sozialvers.,CN=Konrad Lanz Date/Time-UTC 2008-12-15T23:15:40Z Issuer-Certificate C=AT,O=Hauptverband österr. Sozialvers.,CN=VSig CA 2 Serial-No. 17293657787164074630362273138432232730208 Method urn:pdfsigfilter:bka.gv.at:binaer:v1.1.0 Parameter etsi-bka-1.0@1229382940-394096199@31239-32542-0-14959-320 Verification Verification service: http://demo.a-sit.at/el_signatur/verification ©2005-2008 Konrad Lanz, All Rights reserved. Permission to copy this document is granted to Graz University of Technology i.e. the Institute for Applied Information Processing and Communications (IAIK) for in house educational purposes and its library and on a fair use basis. For permission to copy this document otherwise please do not hesitate to contact [email protected] with the following subject “request for copy permission MSc-Thesis 2008”. This document counts towards my degree classification. This thesis has been written in LATEX. ii Abstract OASIS Digital Signature Services (OASIS-DSS) An Architecture, Implementation and Interoperability This Master’s Thesis investigates “OASIS Digital Signature Services (OASIS-DSS)”, a client-server protocol that can contribute to hide the complexities of digital signature processing for “Extensible Markup Language (XML)” documents from the user. The challenges when creating “XML-Signature Syntax and Processing (XMLDSIG)” signatures range from making secure choices for transforms such as “XML Path Language Version 1.0 (XPath) filter transform”, “Extensible Stylesheet Language for Transformation (XSLT)” to canonicalization (C14n) of XML. Further, various cryptographic signature schemes, key distribution and the secure choice of hash functions need to be taken off a client and are better manageable centrally. When signed XML payload travels from client to server and back, broken signatures appear, the issue and proposed solutions are discussed in this thesis. When transforms and canonicalization in XMLDSIG depend on the context of the transport protocol signatures break. As such they are affected by inherited namespaces, inherited attributes or simply the presence of the transport protocol in the data model. XML documents can in general not be enveloped in one another. This thesis proposes to amend XML itself to enable round tripping of signed XML data. The architecture of OASIS-DSS itself was modified and extended to become implementable for all kinds of XML documents and transforms. A design and an implementation of an OASIS-DSS prototype library coping with the mentioned issues was performed. During the work on this thesis standardization activities were undertaken in the “Organization for the Advancement of Structured Information Standards (OASIS)” and the “World Wide Web Consortium (W3C)”. The author participated in the OASIS-DSS technical committee and W3C XML Security Working Group and its predecessor. Various amendments to OASIS-DSS addressing shortcomings identified during the work on this thesis have been committed. iii iv Kurzfassung OASIS Digital Signature Services (OASIS-DSS) An Architecture, Implementation and Interoperability Diese Masterarbeit untersucht ,,OASIS Digital Signature Services (OASIS-DSS)“ ein Client-Server Pro- tokoll, das dazu beitragt¨ die Komplexitat¨ digitaler Signatur Verarbeitung von ,,Extensible Markup Lan- guage (XML)“ Dokumenten dem User abzunehmen. Die Herausforderungen beim Erstellen von ,,XML- Signature Syntax and Processing (XMLDSIG)“ Signaturen reichen von der Wahl sicherer Transforma- tionen wie ,,XML Path Language Version 1.0 (XPath) Filtertransformationen“, ,,Extensible Stylesheet Language for Transformation (XSLT)“ bis hin zum Kanonisieren (C14n) von XML. Verschiedene kryp- tographische Signaturverfahren, Schlusselmanagement¨ und die sichere Wahl einer Hashfunktion konnen¨ dem Client abgenommen werden. Diese Entscheidungen werden oft besser zentral auf einem Server getroffen. Wenn signiertes XML vom Client zum Server und retour gesendet wird, brechen immer wieder Sig- naturen. Diese Problematik und Losungsvorschl¨ age¨ werden in dieser Arbeit diskutiert. Auch wenn Transformationen und Kanonisierung in XMLDSIG vom Kontext des Transportprotokolls abhangen,¨ konnen¨ Signaturen brechen. Als solche sind diese von geerbten Namensraumen,¨ geerbten Attributen oder schlicht von der Gegenwart des Transportprotokolls im Datenmodell betroffen. XML ist unter der Operation des Einfugens¨ eines Dokumentes in ein anderes im Allgemeinen nicht abgeschlossen. Diese Arbeit schlagt¨ vor XML selbst anzupassen um XML uncodiert direkt in XML so transportieren zu konnen,¨ dass signierte XML Inhalte originalgetreu erhalten werden. Die Architektur von OASIS-DSS selbst wurde so modifiziert und erweitert, dass eine Implementier- barkeit fur¨ generelle XML Dokumente und allgemeine Transformationen moglich¨ ist. Ein Design und eine Implementierung einer OASIS-DSS Prototypen-Bibliothek, die oben genannte Probleme behan- delt, wurden durchgefuhrt.¨ Wahrend¨ dieser Masterarbeit wurden bei der ,,Organization for the Advancement of Structured Informa- tion Standards (OASIS)“ und dem ,,World Wide Web Consortium (W3C)“ Standardisierungstatigkeiten¨ unternommen. Der Autor war Mitglied des OASIS-DSS Technischen Komitees (TC) und bei der W3C XML Security Working Group und deren Vorgangergruppe.¨ An verschiedensten Anderungen¨ von OASIS-DSS wurde fortlaufend mitgearbeitet. v vi Acknowledgements I would like to thank . Edith. 1998 was the luckiest year in my life, and not because XML was published. Edith thank you for your support, your patience and the last ten years. Eva, my mum for supporting me in everything I ever did. Peter Lipp my supervisor for trusting in my abilities right from the beginning. The Institute for Applied Information Processing and Communications (IAIK) and its head Reinhard Posch my assessor for giving me the chance to do this work at this institute. Many thanks to Harald Bratko for proof reading this document and Dieter Bratko for giving me advice on Public-Key Infrastructure (PKI). Especially, Clemens Orthacker for his friendship and proof reading the document. Konrad Lanz vii Formatting conventions in this thesis. • acronym (ACR) - acronyms • ACR - abbreviated acronym • code - in-line code elements • <ds:Signature> - refers to Extensible Markup Language (XML) elements • <dss:SignRequest> - refers to XML Schema (Schema) element declarations • dss:SignRequestType - refers to Schema types declarations • RequestID - XML attributes or Schema attribute declarations viii Contents Statement . .i Kurzfassung . .v Abstract . iii Acknowledgements . vii 1 Introduction 1 2 Background 3 2.1 The Extensible Markup Language (XML) . .3 2.1.1 The X and typing in XML . .5 2.1.2 XML, a good choice for a signature . .8 2.2 Namespaces and Types . .9 2.2.1 Namespaces help to extend XML grammars . .9 2.2.2 XML Schema (Schema) . 11 2.3 XML Technologies for Processing . 14 2.3.1 Simple API for XML (SAX) . 15 2.3.2 Document Object Model (DOM) . 17 2.3.3 XML Path Language Version 1.0 (XPath) . 18 2.3.4 Uniform Resource Identifier (URI) . 23 2.3.5 XML Pointer Language Version 1.0 (XPointer) . 28 2.3.6 Extensible Stylesheet Language for Transformation (XSLT) . 33 2.3.7 Cascading Style Sheets (CSS) . 35 2.4 Digital Signatures . 35 2.4.1 XML Digital Signatures . 36 2.5 Canonicalization . 42 2.5.1 Minimal Canonicalization (MC14n) . 42 2.5.2 C14n and C14n11 . 43 2.5.3 Exclusive XML Canonicalization Version 1.0 (Exc-C14n) . 45 2.5.4 Schema Centric XML Canonicalization Version 1.0 (ScC14n) . 47 2.5.5 Canonicalizations overview . 50 ix 3 OASIS-DSS 51 3.1 Incentives for using OASIS-DSS . 51 3.2 Basics . 53 3.2.1 dss:RequestBaseType............................... 55 3.2.2 dss:DocumentBaseType............................. 56 3.2.3 dss:DocumentType - Forms of payload . 57 3.3 Signing . 59 3.3.1 Basic processing for signing using XMLDSIG . 59 3.3.2 Enter the processing at various stages . 59 3.3.3 Important optional inputs and outputs for signature creation . 64 3.3.4 <dss:IncludeObject> - Creating enveloping signatures . 64 3.3.5 <dss:SignaturePlacement> - Creating enveloped signatures . 65 3.3.6 <dss:SignedReference> - More control on reference generation . 66 3.3.7 Further optional inputs and outputs for signature creation . 68 3.3.8 Other optional inputs . 68 3.3.9 dss:ResponseBaseType - Returning signed documents . 68 3.3.10 <dss:SignResponse> .............................. 69 3.4 Verifying . 71 3.4.1 Basic processing for verifying using XMLDSIG . 72 3.4.2 Important optional inputs and outputs for signature verification . 72 3.4.3 <dss:VerifyResponse> .............................. 73 3.5 Signing, Verifying - concluding remarks