digital signatures: how it's done in pdf
Post on 21-Oct-2014
470 views
DESCRIPTION
These are the slides that were be presented at a GlobalSign customer event in Leuven on September 16, 2014. In my talk, I explained why digital signatures are important. I introduced the audience to the basic concepts used when signing documents and showed how these concepts are used in the context of PDF. Furthermore, I discussed different architectures to implement a digital signature solution, as well as how digital signatures can be used in a workflow and how we can create digital signatures for the long term.TRANSCRIPT
![Page 1: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/1.jpg)
Digital Signatures
How it’s done in PDF
![Page 2: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/2.jpg)
iText, an open source PDF library
Java
C#
![Page 3: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/3.jpg)
Shareholders:- Ingeborg Willaert (50%)- Bruno Lowagie (50%)
iText Group NV
°2008 BelgiumIP, TM, Development
Marketing
iText Software BVBA
°2011 Belgium
Sales EMEA/Asia
iText Software Corp.
°2009 USA (CA/MA)
Sales Americas/Oceania
Board of Directors:- Peter Camps (chairman)- Ingeborg Willaert- Bruno LowagieAdvisory Board:- Andrew Binstock- Mark de Visser- Bernard Slede
iText Group
Benelux: 10th place
Belgium: 3rd place
![Page 4: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/4.jpg)
Agenda
• Why do we need digital signatures?
• Basic concepts…
• … applied to PDF
• Architectures: server-side vs. client-side
• Digital signatures and document workflow
• Long term validation
![Page 5: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/5.jpg)
Introduction
Why do we need digital signatures?
![Page 6: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/6.jpg)
Integrity
I paid a forged invoice
and lost 30K€ !
![Page 7: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/7.jpg)
Authenticity
Why am I, Emperor
Constantine I, in this picture? I
never transferred authority to
the Pope!
![Page 8: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/8.jpg)
Non-repudiation
I didn’t do it!
![Page 9: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/9.jpg)
Three goals
• Integrity — we want assurance that the document hasn’t been changed somewhere in the workflow
• Authenticity — we want assurance that the author of the document is who we think it is (and not somebody else)
• Non-repudiation — we want assurance that the author can’t deny his authorship.
![Page 10: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/10.jpg)
Part 1
Basic concepts…
![Page 11: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/11.jpg)
Concept 1: Hashing
• Hashing algorithm:
• a cryptographic hash function to turn an arbitrary block
of data into a fixed-size bit string.
• Available algorithms:
• MD5: Ron Rivest
• SHA:
• SHA-1: NSA (Being phased out!)
• SHA-2: NSA / NIST
• NEW: SHA-3 contest winner “Keccak”
• RIPEMD: KULeuven
![Page 12: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/12.jpg)
Concept 1: Integrity check using hash
Document
Generate Hash
AF1B4C...D34E
Secure
Server /
WebsiteRetrieve Hash
AF1B4C...D34E
Compare!
![Page 13: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/13.jpg)
Concept 2: encryption
• Assymetric key algorithms
• Encryption
• Digital signing
![Page 14: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/14.jpg)
Some name dropping
• Public Key Cryptography Standards
• PKCS#1: RSA Cryptography Standard (Rivest, Shamir, Adleman)
• PKCS#7: Cryptographic Message Standard (CMS)
• PKCS#11: Cryptographic Token Interface
• PKCS#12: Personal Information Exchange Syntax Standard
• PKCS#13: Elliptic Curve Cryptography Standard (ECDSA)
• Federal Information Processing Standards (FIPS)
• DSA: Digital Signature Algorithm (DSA)
• European Telecommunications Standards Institute (ETSI)
• CMS Advanced Electronic Signatures (CAdES)
![Page 15: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/15.jpg)
Concept 1 + Concept 2
• Producer
• Provides data as-is
• Provides hash encrypted using private key
• Provides public key
• Consumer
• Creates hash from data: hash1
• Decrypts hash using public key: hash2
• If (hash1 == hash2) document OK!
![Page 16: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/16.jpg)
Goals met?
• Integrity:
• hashes are identical
• Authenticity:
• identity found along with public key
• Non-repudiation:
• if hash can be decrypted with public key,
the document was signed with the
corresponding private key
![Page 17: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/17.jpg)
Differences between EU and US
• In the US, we make a distinction:
• Electronic signatures don’t necessarily involve PKI
• Digital signatures when a PKI infrastructure is involved
• In Europe, we speak of electronic signatures
• As a synonym for digital signatures
• All laws and regulations take this wording
• There’s no sharp distinction between electronic and
digital signatures (which leads to confusion)
• I always speak of digital signatures
![Page 18: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/18.jpg)
Part 2
… applied to PDF
![Page 19: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/19.jpg)
Standards
• ISO• ISO-32000-1 (2008) based on PDF 1.7 (2006)
• ISO-32000-2 will define PDF 2.0 (2016)
• ETSI: TS 102 778 (2009 - 2010)• PAdES 1: Overview
• PAdES 2: Basic – CMS based (ISO-32000-1)
• PAdES 3: Enhanced – CAdES based (ISO-32000-2)
• PAdES 4: LTV – Long Term Validation
• PAdES 5: XAdES based (XML content)
• PAdES 6: Visual representation guidelines
• ETSI: TS 103 172 (2011 - 2013)• PAdES Baseline Profile
![Page 20: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/20.jpg)
Signatures in PDF
• There are no bytes in the
PDF that aren’t covered,
other than the PDF
signature itself. (*)
• The digital signature isn’t
part of the ByteRange.
• The concept “to initial a
document” doesn’t exist;
you sign the complete
document at once, not
on a page per page
basis. (*)
![Page 21: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/21.jpg)
Some PDF terminology
• Signature field:
• Visualisation (one widget annotation)
• Extra info about signature (Lock, SV)
• /V refers to the signature dictionary
• Signing:
• Creating an /AP for the widget annotation
• Creating a signature dictionary for /V
![Page 22: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/22.jpg)
What’s inside the signature?
%PDF-1.x
...
/ByteRange ...
/Contents<
>...
%%EOF
DIGITAL SIGNATURE
• Signed Message Digest
• Certificate chain
• Revocation information
• Timestamp
ISO-32000-2:
At minimum the PKCS#7 object shall
include the signer’s X.509 signing
certificate. This certificate shall be used
to verify the signature value in
/Contents.
Best practices (“should” also have):
• Full certificate chain
• Revocation information (CRL / OCSP)
• Timestamp
![Page 23: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/23.jpg)
Part 3
Architectures:
Server-side vs. client-side signing
![Page 24: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/24.jpg)
Server-side signing
<</Type/Sig/
/Contents <
%PDF-1.x
...
...
%%EOF
>>>
Signed Message
Digest
Application DeviceSERVER
![Page 25: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/25.jpg)
Use cases server-side signing
• Company signature
• Invoices
• Contracts
• …
• Signing services in the Cloud
• Docusign
• Echosign
• …
• Security management responsibilities!
![Page 26: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/26.jpg)
Client-side signing
<</Type/Sig/
/Contents <
%PDF-1.x
...
...
%%EOF
>>>
Signed Message
Digest
ApplicationDevice CLIENT
![Page 27: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/27.jpg)
Use cases client-side signing
• Desktop applications• Adobe Acrobat Pro
• Adobe Reader (only for Reader-enabled documents)
• Home made, e.g. using iText
• In a web context• The PDF software runs on the client, e.g. using Java Web Start
• Access to the token or smart card through• MSCAPI
• PKCS#11
• Custom smart card library
• Security• User has smart card and PIN or USB token and passphrase
![Page 28: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/28.jpg)
Deferred signing
Signed
Message
Digest
AppDevice
CLIENT
<</Type/Sig/
/Contents <
%PDF-1.x
...
...
%%EOF
>>>
Application
SERVER
![Page 29: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/29.jpg)
Use cases deferred signing
• Signing on an iPad / Tablet• App on the device has low footprint
• Easy to link to integrate into a document management system
• Disadvantage• You need to trust the server that the hash you receive is actually the
hash of the document you want to sign
• Common Criteria• a framework in which computer system users can specify their
security functional and assurance requirements (SFRs and SARs respectively) through the use of Protection Profiles (PPs), vendors can then implement and/or make claims about the security attributes of their products, and testing laboratories can evaluatethe products to determine if they actually meet the claims.
![Page 30: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/30.jpg)
Part 4
Digital signatures
and document workflow
![Page 31: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/31.jpg)
Digital signatures: types
• Certification (aka author) signature
• only possible for the first revision (*)
• involves modification detection permissions:• No changes allowed
• Form filling and signing allowed
• Form filling, signing and commenting allowed
• Approval (aka recipient) signature
• workflow with subsequent signers
• New in PDF 2.0: modification detection permissions
• Usage Rights signature
• involving Adobe’s private key to Reader enable a PDF
![Page 32: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/32.jpg)
Other possible icons
• Signer’s
identity is
unknown
• Document
has been
altered or
corrupted
![Page 33: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/33.jpg)
Serial signatures
%PDF-1.x
% Original document
% Additional content 1
...
...
%%EOF
DIGITAL SIGNATURE 1
...
%%EOF
DIGITAL SIGNATURE 2
% Additional content 2
...
...
%%EOF
DIGITAL SIGNATURE 3
Rev1
Rev2
Rev3
A PDF document
can be signed more
than once, but
parallel signatures
aren’t supported,
only serial
signatures:
additional
signatures sign all
previous signatures.
![Page 34: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/34.jpg)
Certified by Alice
![Page 35: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/35.jpg)
Read and approved by Bob
![Page 36: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/36.jpg)
Signed by Bob
![Page 37: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/37.jpg)
Bob’s signature invalidated by Chuck
![Page 38: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/38.jpg)
Read, approved and signed by Carol
![Page 39: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/39.jpg)
Read, approved, and signed by Dave
![Page 40: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/40.jpg)
Signature and lock broken by Chuck
![Page 41: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/41.jpg)
Part 5
Long-term validation
![Page 42: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/42.jpg)
Certificates expire
Expiration date
2012 2013 2014
![Page 43: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/43.jpg)
Certificates get revoked
Expiration dateRevocation date
2012 2013 2014
![Page 44: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/44.jpg)
How to survive revocation / expiration?
2012 2013 2014
Expiration dateRevocation date
![Page 45: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/45.jpg)
Timestamps
![Page 46: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/46.jpg)
What to do when:
• There’s no CRL/OCSP/TS in the
document?
• The certificate is about to expire in one
of your documents?
• The hashing / encryption algorithm is
about to be deprecated?
![Page 47: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/47.jpg)
Document Security Store
%PDF-1.x
...
/ByteRange ...
/Contents<
>...
%%EOF
DIGITAL SIGNATURE
• Signed Message Digest
• Certificate
%PDF-1.x
...
/ByteRange ...
/Contents<
>...
%%EOF
DSS for DIGITAL SIGNATURE
• VRI, Certs, OCSPs, CRLs
DIGITAL SIGNATURE
• Signed Message Digest
• Certificate
![Page 48: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/48.jpg)
Document-level timestamp
%PDF-1.x
...
/ByteRange ...
/Contents<
>...
%%EOF
DSS for DIGITAL SIGNATURE
• VRI, Certs, OCSPs, CRLs
%PDF-1.x
...
/ByteRange ...
/Contents<
>...
%%EOF
DSS for DIGITAL SIGNATURE
• VRI, Certs, OCSPs, CRLs
DOCUMENT TIMESTAMP TS1
ETSI.RFC3161
DIGITAL SIGNATURE
• Signed Message Digest
• Certificate
DIGITAL SIGNATURE
• Signed Message Digest
• Certificate
![Page 49: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/49.jpg)
Repeat as soon as needed
%PDF-1.x
...
/ByteRange ...
/Contents<
>...
%%EOF
DSS for DIGITAL SIGNATURE
• VRI, Certs, OCSPs, CRLs
DOCUMENT TIMESTAMP TS1
%PDF-1.x
...
/ByteRange ...
/Contents<
>...
%%EOF
DSS for DIGITAL SIGNATURE
• VRI, Certs, OCSPs, CRLs
DOCUMENT TIMESTAMP TS1
DSS for TS1
DOCUMENT TIMESTAMP TS2
DIGITAL SIGNATURE
• Signed Message Digest
• Certificate
DIGITAL SIGNATURE
• Signed Message Digest
• Certificate
![Page 50: Digital Signatures: how it's done in PDF](https://reader034.vdocuments.net/reader034/viewer/2022052301/54470cb4b1af9fe33a8b476f/html5/thumbnails/50.jpg)
Q & A
EMEAKerkstraat 108
9050 Gentbrugge
BELGIUM
T: +32 92 98 02 31
F: +32 92 70 33 75
Americas, Oceania1 Broadway, 14th floor
Cambridge, MA 02142
USA
T: +1 617 982 2646
F: +1 617 982 2647
iText HQAdolf Baeyensstraat 121
9040 Sint-Amandsberg
BELGIUM
Asia71 Ayer Rajah Crescent #05-04
139951
SINGAPORE
E: sales.isa@itextpdf,com
T: tel: +65 31 58 39 47
http://itextpdf.com