Digital signature: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Laura240406
imported>King1607
No edit summary
 
Line 6: Line 6:


A '''digital signature''' is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature on a message gives a recipient confidence that the message came from a sender known to the recipient.<ref name="bellare-goldwasser2008digsigs">{{cite book
A '''digital signature''' is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature on a message gives a recipient confidence that the message came from a sender known to the recipient.<ref name="bellare-goldwasser2008digsigs">{{cite book
|title=Lecture Notes on Cryptography
|first1=Shafi |last1=Goldwasser |author-link1=Shafi Goldwasser
|first1=Mihir
|first2=Mihir |last2=Bellare |author-link2=Mihir Bellare
|last1=Bellare
|author-link1=Mihir Bellare
|first2=Shafi
|last2=Goldwasser
|author-link2=Shafi Goldwasser
|date=July 2008
|date=July 2008
|url=https://cseweb.ucsd.edu/~mihir/papers/gb.pdf#page=168
|chapter=Chapter 10: Digital signatures
|chapter=Chapter 10: Digital signatures
|chapter-url=https://cseweb.ucsd.edu/~mihir/papers/gb.pdf#page=168
|title=Lecture Notes on Cryptography
|page=168
|page=168
|access-date=2023-06-11
|access-date=2023-06-11
Line 22: Line 18:
|url-status=live
|url-status=live
}}</ref><ref name="katz-lindell2007digsigs">{{cite book
}}</ref><ref name="katz-lindell2007digsigs">{{cite book
|title=Introduction to Modern Cryptography
|last1=Katz |first1=Jonathan |author-link1=Jonathan Katz (computer scientist)
|first1=Jonathan
|last2=Lindell |first2=Yehuda |author-link2=Yehuda Lindell
|last1=Katz
|author-link1=Jonathan Katz (computer scientist)
|first2=Yehuda
|last2=Lindell
|author-link2=Yehuda Lindell
|date=2007
|date=2007
|chapter=Chapter 12: Digital Signature Schemes
|chapter=Chapter 12: Digital Signature Schemes
|title=Introduction to Modern Cryptography
|page=399
|page=399
}}</ref>
}}</ref>


Digital signatures are a standard element of most [[cryptographic protocol]] suites, and are commonly used for software distribution, financial transactions, [[contract management software]], and in other cases where it is important to detect forgery or [[Tampering (crime)|tampering]].
Digital signatures are a type of [[public-key cryptography]], and are commonly used for [[software distribution]],<ref name="boneh-shoup">{{cite book
|last1=Boneh |first1=Dan |author-link1=Dan Boneh
|last2=Shoup |first2=Victor |author-link2=Victor Shoup
|chapter=13. Digital Signatures
|title=A Graduate Course in Applied Cryptography
|edition=Version 0.6
|date=January 2023
|url=https://toc.cryptobook.us/book.pdf#page=542
}}</ref><ref name="debian-package-signing">{{cite web
|title=&sect; 7.5. Package signing in Debian
|website=Securing Debian Manual
|publisher=Debian Project
|url=https://www.debian.org/doc/manuals/securing-debian-manual/deb-pack-sign.en.html
|access-date=2025-07-17
|archive-url=https://web.archive.org/web/20250611053211/https://www.debian.org/doc/manuals/securing-debian-manual/deb-pack-sign.en.html
|archive-date=2025-06-11
}}</ref><ref name="apple-code-distribution">{{cite web
|title=Distributing your app to registered devices
|publisher=Apple, Inc.
|website=Apple Developer Documentation
|url=https://docs.developer.apple.com/documentation/xcode/distributing-your-app-to-registered-devices
|access-date=2025-07-17
|archive-url=https://web.archive.org/web/20240313192757/https://developer.apple.com/documentation/xcode/distributing-your-app-to-registered-devices
|archive-date=2024-03-13
}}</ref>
financial transactions,{{cn|date=July 2025}} [[contract management software]],{{cn|date=July 2025}} and in other cases where it is important to detect forgery or [[Tampering (crime)|tampering]].


Digital signatures are often used to implement [[electronic signature]]s, which include any electronic data that carries the intent of a signature,<ref name="cEMCl">{{Cite web |url=http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=106_cong_public_laws&docid=f:publ229.106.pdf |title=US ESIGN Act of 2000 |access-date=2006-05-10 |archive-date=2011-05-22 |archive-url=https://web.archive.org/web/20110522212411/http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=106_cong_public_laws&docid=f:publ229.106.pdf |url-status=live }}</ref> but not all electronic signatures use digital signatures.<ref name="6TaHP">[http://enterprise.state.wi.us/home/strategic/esig.htm State of WI] {{webarchive|url=https://web.archive.org/web/20060925104000/http://enterprise.state.wi.us/home/strategic/esig.htm |date=2006-09-25}}</ref><ref name="uExGJ">[http://www.naa.gov.au/recordkeeping/er/Security/6-glossary.html National Archives of Australia] {{webarchive|url=https://web.archive.org/web/20141109180215/http://www.naa.gov.au/recordkeeping/er/Security/6-glossary.html|date=November 9, 2014}}</ref> Electronic signatures have legal significance in some countries, including [[Brazil]],  [[Canada]],<ref name="iwENG">{{cite web|title=Secure Electronic Signature Regulations SOR/2005-30|url=https://laws-lois.justice.gc.ca/eng/regulations/SOR-2005-30/FullText.html|website=Justice Laws Website|date=10 March 2011|access-date=19 May 2020|archive-date=28 February 2020|archive-url=https://web.archive.org/web/20200228123232/https://laws-lois.justice.gc.ca/eng/regulations/SOR-2005-30/FullText.html|url-status=live}}</ref> [[South Africa]],<ref name="TZv4Q">{{cite journal |title=Electronic Communications and Transactions Act [No. 25 of 2002] |url=https://www.gov.za/sites/default/files/gcis_document/201409/a25-02.pdf |journal=Government Gazette |publisher=[[South Africa|Republic of South Africa]] |volume=446 |issue=23708 |date=2 August 2002 |access-date=23 September 2019 |archive-date=1 April 2019 |archive-url=https://web.archive.org/web/20190401025101/https://www.gov.za/sites/default/files/gcis_document/201409/a25-02.pdf |url-status=live }}</ref> [[Russia]],<ref>{{Cite web |title=Федеральный закон "Об электронной подписи" от 06.04.2011 N 63-ФЗ (последняя редакция) \ КонсультантПлюс |url=https://www.consultant.ru/document/cons_doc_LAW_112701/ |access-date=2024-10-27 |website=www.consultant.ru}}</ref> the [[United States]], [[Algeria]],<ref name="9wrdi">{{cite web|title=Law 15-04|url=http://www.algerianbanks.com/index.php/environnement-juridique/principaux-codes-juridiques/la-signature-et-a-la-certification-electroniques|website=Official Journal, February 1, 2015|access-date=February 20, 2018|archive-date=November 5, 2018|archive-url=https://web.archive.org/web/20181105202747/http://www.algerianbanks.com/index.php/environnement-juridique/principaux-codes-juridiques/la-signature-et-a-la-certification-electroniques|url-status=live}}</ref> [[Turkey]],<ref>{{cite web|title=Elektronik İmza Kanunu|url=https://www.mevzuat.gov.tr/mevzuatmetin/1.5.5070.pdf|website=Mevzuat Bilgi Sistemi|publisher=Resmî Gazete|date=2004-01-23|access-date=2022-03-11|language=tr|trans-title=Electronic Signature Law|archive-date=2022-03-22|archive-url=https://web.archive.org/web/20220322012649/https://www.mevzuat.gov.tr/mevzuatmetin/1.5.5070.pdf|url-status=live}}</ref> [[India]],<ref name="fN2Ic">{{cite web|title=The Information Technology Act, 2000|url=http://www.dot.gov.in/sites/default/files/itbill2000_0.pdf|website=Department of Telecommunications, Ministry of Communication, Government of India|publisher=The Gazette of India Extraordinary|access-date=17 September 2017|archive-date=18 September 2017|archive-url=https://web.archive.org/web/20170918053132/http://www.dot.gov.in/sites/default/files/itbill2000_0.pdf|url-status=live}}</ref>  [[Indonesia]], [[Mexico]], [[Saudi Arabia]],<ref name="LplND">{{cite web|title=Electronic Transaction Law|url=http://www.citc.gov.sa/en/RulesandSystems/CITCSystem/Pages/ElectronicTransactionsLaw.aspx|website=Communication and Information Technology Commission|access-date=17 September 2017|archive-date=17 September 2017|archive-url=https://web.archive.org/web/20170917170649/http://www.citc.gov.sa/en/RulesandSystems/CITCSystem/Pages/ElectronicTransactionsLaw.aspx|url-status=dead}}</ref> [[Uruguay]],<ref name="Xf3lW">{{Cite web | url=https://www.agesic.gub.uy/innovaportal/v/5834/13/agesic/firma-electronica.html | title=Cómo se usa | access-date=2018-02-01 | archive-date=2018-02-02 | archive-url=https://web.archive.org/web/20180202012559/https://www.agesic.gub.uy/innovaportal/v/5834/13/agesic/firma-electronica.html | url-status=live }}</ref> [[Switzerland]], [[Chile]]<ref name="4h0yN">{{Cite web|url=https://www.leychile.cl/Navegar?idNorma=196640|title=Ley-19799 Sobre Documentos Electrónicos, Firma Electrónica y Servicios de Certificación de Dicha Firma|date=2002-04-12|website=Ley Chile – Biblioteca del Congreso Nacional|language=es|access-date=2020-01-21|archive-date=2019-12-26|archive-url=https://web.archive.org/web/20191226165830/http://www.leychile.cl/Navegar?idNorma=196640|url-status=live}}</ref> and the countries of the [[European Union]].<ref name="Cryptomathic_MajorStandardsDigSig">{{cite web|last1=Turner|first1=Dawn|title=Major Standards and Compliance of Digital Signatures – A World-Wide Consideration|url=http://www.cryptomathic.com/news-events/blog/major-standards-and-compliance-of-digital-signatures-a-world-wide-consideration|publisher=Cryptomathic|access-date=7 January 2016|archive-date=9 February 2016|archive-url=https://web.archive.org/web/20160209203857/http://www.cryptomathic.com/news-events/blog/major-standards-and-compliance-of-digital-signatures-a-world-wide-consideration|url-status=live}}</ref><ref name="CryptomathicDigSigServicesAshiqJA">{{cite web|last1=JA|first1=Ashiq|title=Recommendations for Providing Digital Signature Services|url=http://www.cryptomathic.com/news-events/blog/recommendations-for-providing-digital-signature-services|publisher=Cryptomathic|access-date=7 January 2016|archive-date=9 February 2016|archive-url=https://web.archive.org/web/20160209203856/http://www.cryptomathic.com/news-events/blog/recommendations-for-providing-digital-signature-services|url-status=live}}</ref>
A digital signature on a message or document is similar to a [[Signature|handwritten signature]] on paper, but it is not restricted to a physical medium like paper&mdash;any [[bitstring]] can be digitally signed&mdash;and while a handwritten signature on paper could be copied onto other paper in a [[forgery]], a digital signature on a message is mathematically bound to the ''content'' of the message so that it is infeasible for anyone to forge a valid digital signature on any other message.<ref name="stinson3e2006digsigs"/>


Digital signatures employ [[asymmetric key algorithm|asymmetric cryptography]]. In many instances, they provide a layer of validation and security to messages sent through a non-secure channel: Properly implemented, a digital signature gives the receiver reason to believe the message was sent by the claimed sender. Digital signatures are equivalent to traditional handwritten signatures in many respects, but properly implemented digital signatures are more difficult to forge than the handwritten type. Digital signature schemes, in the sense used here, are cryptographically based, and must be implemented properly to be effective. They can also provide [[non-repudiation]], meaning that the signer cannot successfully claim they did not sign a message, while also claiming their [[private key]] remains secret.<ref>{{Cite journal |last1=Chia |first1=Jason |last2=Chin |first2=Ji-Jian |last3=Yip |first3=Sook-Chin |date=2021-09-16 |title=Digital signature schemes with strong existential unforgeability |journal=F1000Research |volume=10 |page=931 |language=en |doi=10.12688/f1000research.72910.1 |pmid=36798451 |pmc=9925878 |s2cid=239387758 |doi-access=free }}</ref> Further, some non-repudiation schemes offer a timestamp for the digital signature, so that even if the private key is exposed, the signature is valid.<ref name="G18bg">{{Cite journal|last1=Fang|first1=Weidong|last2=Chen|first2=Wei|last3=Zhang|first3=Wuxiong|last4=Pei|first4=Jun|last5=Gao|first5=Weiwei|last6=Wang|first6=Guohui|date=2020-03-04|title=Digital signature scheme for information non-repudiation in blockchain: a state of the art review|journal=EURASIP Journal on Wireless Communications and Networking|volume=2020|issue=1|doi=10.1186/s13638-020-01665-w|s2cid=212613803|issn=1687-1499|doi-access=free}}</ref><ref name="U844i">{{Cite journal|last1=Zhou|first1=J.|last2=Lam|first2=K.Y.|date=May 1999|title=Securing digital signatures for non-repudiation|url=http://dx.doi.org/10.1016/s0140-3664(99)00031-6|journal=Computer Communications|volume=22|issue=8|pages=710–716|doi=10.1016/s0140-3664(99)00031-6|issn=0140-3664|access-date=2020-10-26|archive-date=2023-07-01|archive-url=https://web.archive.org/web/20230701101034/https://www.sciencedirect.com/science/article/abs/pii/S0140366499000316?via%3Dihub|url-status=live|url-access=subscription}}</ref> Digitally signed messages may be anything representable as a [[bitstring]]: examples include electronic mail, contracts, or a message sent via some other cryptographic protocol.
Digital signatures are often used to implement [[electronic signature]]s, which include any electronic data that carries the intent of a signature,<ref name="cEMCl">{{Cite web |url=http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=106_cong_public_laws&docid=f:publ229.106.pdf |title=US ESIGN Act of 2000 |access-date=2006-05-10 |archive-date=2011-05-22 |archive-url=https://web.archive.org/web/20110522212411/http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=106_cong_public_laws&docid=f:publ229.106.pdf |url-status=live }}</ref> but not all electronic signatures use digital signatures.<ref name="6TaHP">[http://enterprise.state.wi.us/home/strategic/esig.htm State of WI] {{webarchive|url=https://web.archive.org/web/20060925104000/http://enterprise.state.wi.us/home/strategic/esig.htm |date=2006-09-25}}</ref><ref name="uExGJ">[http://www.naa.gov.au/recordkeeping/er/Security/6-glossary.html National Archives of Australia] {{webarchive|url=https://web.archive.org/web/20141109180215/http://www.naa.gov.au/recordkeeping/er/Security/6-glossary.html|date=November 9, 2014}}</ref>


==Definition==
==Definition==
{{Main|Public-key cryptography}}


A digital signature scheme typically consists of three algorithms:
A digital signature scheme consists of three algorithms:<ref name="stinson3e2006digsigs"/><ref name="galbraith2012mathpkcbook-kemdem">{{cite book
* A ''[[key generation]]'' algorithm that selects a ''private key'' [[Uniform distribution (discrete)|uniformly at random]] from a set of possible private keys. The algorithm outputs the private key and a corresponding ''public key''.
|last=Galbraith |first=Steven
* A ''signing'' algorithm that, given a message and a private key, produces a signature.
|title=Mathematics of Public-Key Cryptography
* A ''signature verifying'' algorithm that, given the message, public key and signature, either accepts or rejects the message's claim to authenticity.
|date=2012
|section=§1.3.2: Security of signatures
|section-url=https://ia600600.us.archive.org/7/items/mathematics_202103/Steven.D.Galbraith.Mathematics.of.Public.Key.Cryptography.2012.pdf#page=23
|pages=7–9
|publisher=Cambridge University Press
|isbn=978-1-107-01392-6
}}</ref>
* A '''[[key generation]]''' algorithm that selects a '''private key''' at random from a set of possible private keys. The algorithm outputs the private key and a corresponding '''public key'''.
* A '''signing''' algorithm that, given a message and a private key, produces a signature.
* A '''signature verifying''' algorithm that, given the message, public key and signature, either accepts or rejects the message's claim to authenticity.


Two main properties are required:
Two main properties are required:


First, the authenticity of a signature generated from a fixed message and fixed private key can be verified by using the corresponding public key.
# ''Correctness'':  Signatures produced by the signing algorithm with a private key pass the verification algorithm with the corresponding public key.
 
# ''Security'' ([[Digital signature forgery|existential unforgeability under chosen-message attack]], or EUF-CMA):  It should be computationally infeasible to generate a valid signature for a party without knowing that party's private key.
Secondly, it should be computationally infeasible to generate a valid signature for a party without knowing that party's private key.
A digital signature is an authentication mechanism that enables the creator of the message to attach a code that acts as a signature.
The [[Digital Signature Algorithm]] (DSA), developed by the [[National Institute of Standards and Technology]], is one of [[Digital signature#Some digital signature algorithms|many examples]] of a signing algorithm.
 
In the following discussion, 1<sup>''n''</sup> refers to a [[Unary numeral system|unary number]].


Formally, a '''digital signature scheme''' is a triple of probabilistic polynomial time algorithms, (''G'', ''S'', ''V''), satisfying:
Formally, a digital signature scheme is a triple of [[probabilistic polynomial-time]] algorithms, (''G'', ''S'', ''V''), satisfying:
* ''G'' (key-generator) generates a public key (''pk''), and a corresponding private key (''sk''), on input 1<sup>''n''</sup>, where ''n'' is the security parameter.
* ''G'' (key-generator) generates a public key (''pk''), and a corresponding private key (''sk''), on input 1<sup>''n''</sup>, where ''n'' is the security parameter.
* ''S'' (signing) returns a tag, ''t'', on the inputs: the private key (''sk''), and a string (''x'').
* ''S'' (signing) returns a tag, ''t'', on the inputs: the private key (''sk''), and a string (''x'').
* ''V'' (verifying) outputs ''accepted'' or ''rejected'' on the inputs: the public key (''pk''), a string (''x''), and a tag (''t'').
* ''V'' (verifying) outputs ''accepted'' or ''rejected'' on the inputs: the public key (''pk''), a string (''x''), and a tag (''t'').
For correctness, ''S'' and ''V'' must satisfy


: Pr [ (''pk'', ''sk'') ← ''G''(1<sup>''n''</sup>), ''V''( ''pk'', ''x'', ''S''(''sk'', ''x'') ) = ''accepted'' ] = 1.<ref name="IjhTrs">Pass, def 135.1</ref>
Here 1<sup>''n''</sup> refers to a [[Unary numeral system|unary number]] in the formalism of [[computational complexity theory]].


A digital signature scheme is '''secure''' if for every non-uniform probabilistic polynomial time [[Adversary (cryptography)|adversary]], ''A''
For ''correctness'', ''S'' and ''V'' must satisfy


: Pr [ (''pk'', ''sk'') ← ''G''(1<sup>''n''</sup>), (''x'', ''t'') ← ''A''<sup>''S''(''sk'', · )</sup>(''pk'', 1<sup>''n''</sup>), ''x'' ∉ ''Q'', ''V''(''pk'', ''x'', ''t'') = ''accepted''] < [[Negligible function|negl]](''n''),
: Pr [(''pk'', ''sk'') ← ''G''(1<sup>''n''</sup>), ''V''(''pk'', ''x'', ''S''(''sk'', ''x'')) = ''accepted''] = 1.<ref name="IjhTrs">Pass, def 135.1</ref>
 
A digital signature scheme is ''secure'' if for every non-uniform probabilistic polynomial time [[Adversary (cryptography)|adversary]] ''A'',
 
: Pr [(''pk'', ''sk'') ← ''G''(1<sup>''n''</sup>), (''x'', ''t'') ← ''A''<sup>''S''(''sk'', · )</sup>(''pk'', 1<sup>''n''</sup>), ''x'' ∉ ''Q'', ''V''(''pk'', ''x'', ''t'') = ''accepted''] < [[Negligible function|negl]](''n''),


where ''A''<sup>''S''(''sk'', · )</sup> denotes that ''A'' has access to the [[Oracle machine|oracle]], ''S''(''sk'', · ), ''Q'' denotes the set of the queries on ''S'' made by ''A'', which knows the public key, ''pk'', and the security parameter, ''n'', and ''x'' ∉ ''Q'' denotes that the adversary may not directly query the string, ''x'', on ''S''.<ref name="IjhTrs" /><ref name="nOvvy">Goldreich's FoC, vol. 2, def 6.1.2. Pass, def 135.2</ref>
where ''A''<sup>''S''(''sk'', · )</sup> denotes that ''A'' has access to the [[Oracle machine|oracle]], ''S''(''sk'', · ), ''Q'' denotes the set of the queries on ''S'' made by ''A'', which knows the public key, ''pk'', and the security parameter, ''n'', and ''x'' ∉ ''Q'' denotes that the adversary may not directly query the string, ''x'', on ''S''.<ref name="IjhTrs" /><ref name="nOvvy">Goldreich's FoC, vol. 2, def 6.1.2. Pass, def 135.2</ref>


==History==
==History==
In 1976, [[Whitfield Diffie]] and [[Martin Hellman]] first described the notion of a digital signature scheme, although they only conjectured that such schemes existed based on functions that are trapdoor one-way permutations.<ref name="ikWoF">"New Directions in Cryptography", IEEE Transactions on Information Theory, IT-22(6):644–654, Nov. 1976.</ref><ref name="lysythesis">"[https://dspace.mit.edu/handle/1721.1/29271 Signature Schemes and Applications to Cryptographic Protocol Design] {{Webarchive|url=https://web.archive.org/web/20220908083823/https://dspace.mit.edu/handle/1721.1/29271 |date=2022-09-08 }}", [[Anna Lysyanskaya]], PhD thesis, [[Massachusetts Institute of Technology|MIT]], 2002.</ref>  Soon afterwards, [[Ronald Rivest]], [[Adi Shamir]], and [[Len Adleman]] invented the [[RSA (algorithm)|RSA]] algorithm, which could be used to produce primitive digital signatures<ref name="rsa">{{cite journal | first1 = R. | last1 = Rivest | last2 = Shamir | first2 = A. | last3 = Adleman | first3 = L. | url = http://people.csail.mit.edu/rivest/Rsapaper.pdf | title = A Method for Obtaining Digital Signatures and Public-Key Cryptosystems | journal = Communications of the ACM | volume = 21 | issue = 2 | pages = 120–126 | year = 1978 | doi = 10.1145/359340.359342 | citeseerx = 10.1.1.607.2677 | s2cid = 2873616 | access-date = 2012-11-27 | archive-date = 2008-12-17 | archive-url = https://web.archive.org/web/20081217101831/http://people.csail.mit.edu/rivest/Rsapaper.pdf | url-status = dead }}</ref> (although only as a proof-of-concept – "plain" RSA signatures are not secure<ref name="7aSJZ">For example any integer, ''r'', "signs" ''m''=''r''<sup>''e''</sup> and the product, ''s''<sub>1</sub>''s''<sub>2</sub>, of any two valid signatures, ''s''<sub>1</sub>, ''s''<sub>2</sub> of ''m''<sub>1</sub>, ''m''<sub>2</sub> is a valid signature of the product, ''m''<sub>1</sub>''m''<sub>2</sub>.</ref>). The first widely marketed software package to offer digital signature was [[Lotus Notes]] 1.0, released in 1989, which used the RSA algorithm.<ref name="CKgyC">{{cite web|title=The History of Notes and Domino|url=http://www.ibm.com/developerworks/lotus/library/ls-NDHistory/|website=developerWorks|access-date=17 September 2014|date=2007-11-14|archive-date=2013-03-05|archive-url=https://web.archive.org/web/20130305042623/http://www.ibm.com/developerworks/lotus/library/ls-NDHistory/|url-status=live}}</ref>
In 1976, [[Whitfield Diffie]] and [[Martin Hellman]] first described the notion of a digital signature scheme, although they only conjectured that such schemes existed based on functions that are trapdoor one-way permutations.<ref name="ikWoF">{{cite journal | last1=Diffie | first1=W. | last2=Hellman | first2=M. | title=New directions in cryptography |url=https://www-ee.stanford.edu/~hellman/publications/24.pdf | journal=IEEE Transactions on Information Theory | date=1976 | volume=22 | issue=6 | pages=644–654 | doi=10.1109/TIT.1976.1055638 }}</ref><ref name="lysythesis">"[https://dspace.mit.edu/handle/1721.1/29271 Signature Schemes and Applications to Cryptographic Protocol Design] {{Webarchive|url=https://web.archive.org/web/20220908083823/https://dspace.mit.edu/handle/1721.1/29271 |date=2022-09-08 }}", [[Anna Lysyanskaya]], PhD thesis, [[Massachusetts Institute of Technology|MIT]], 2002.</ref>  Soon afterwards, [[Ronald Rivest]], [[Adi Shamir]], and [[Len Adleman]] invented the [[RSA (algorithm)|RSA]] algorithm, which could be used to produce primitive digital signatures<ref name="rsa">{{cite journal | first1 = R. | last1 = Rivest | last2 = Shamir | first2 = A. | last3 = Adleman | first3 = L. | url = https://people.csail.mit.edu/rivest/Rsapaper.pdf | title = A Method for Obtaining Digital Signatures and Public-Key Cryptosystems | journal = Communications of the ACM | volume = 21 | issue = 2 | pages = 120–126 | year = 1978 | doi = 10.1145/359340.359342 | doi-access=free | citeseerx = 10.1.1.607.2677 | s2cid = 2873616 | access-date = 2025-07-02 | archive-date = 2008-12-17 | archive-url = https://web.archive.org/web/20081217101831/http://people.csail.mit.edu/rivest/Rsapaper.pdf }}</ref> (although only as a proof-of-concept – "plain" RSA signatures are not secure<ref name="7aSJZ">For example any integer, ''r'', "signs" ''m''=''r''<sup>''e''</sup> and the product, ''s''<sub>1</sub>''s''<sub>2</sub>, of any two valid signatures, ''s''<sub>1</sub>, ''s''<sub>2</sub> of ''m''<sub>1</sub>, ''m''<sub>2</sub> is a valid signature of the product, ''m''<sub>1</sub>''m''<sub>2</sub>.</ref>). The first widely marketed software package to offer digital signature was [[Lotus Notes]] 1.0, released in 1989, which used the RSA algorithm.<ref name="CKgyC">{{cite web|title=The History of Notes and Domino|url=http://www.ibm.com/developerworks/lotus/library/ls-NDHistory/|website=developerWorks|access-date=17 September 2014|date=2007-11-14|archive-date=2013-03-05|archive-url=https://web.archive.org/web/20130305042623/http://www.ibm.com/developerworks/lotus/library/ls-NDHistory/|url-status=live}}</ref>


Other digital signature schemes were soon developed after RSA, the earliest being [[Lamport signature]]s,<ref name="ejiWf">"Constructing digital signatures from a one-way function.", [[Leslie Lamport]], Technical Report CSL-98, SRI International, Oct. 1979.</ref> [[Merkle signature scheme|Merkle signatures]] (also known as "Merkle trees" or simply "Hash trees"),<ref name="jl9LD">"A certified digital signature", Ralph Merkle, In Gilles Brassard, ed., Advances in Cryptology – [[CRYPTO]] '89, vol. 435 of Lecture Notes in Computer Science, pp. 218–238, Spring Verlag, 1990.</ref> and [[Rabin signature]]s.<ref name="HgBx0">"Digitalized signatures as intractable as factorization." [[Michael O. Rabin]], Technical Report MIT/LCS/TR-212, MIT Laboratory for Computer Science, Jan. 1979</ref>
Other digital signature schemes were soon developed after RSA, the earliest being [[Lamport signature]]s,<ref name="ejiWf">"Constructing digital signatures from a one-way function.", [[Leslie Lamport]], Technical Report CSL-98, SRI International, Oct. 1979.</ref> [[Merkle signature scheme|Merkle signatures]] (also known as "Merkle trees" or simply "Hash trees"),<ref name="jl9LD">
{{cite book
| last1=Merkle | first1=Ralph C.
| date=1990
| chapter=A Certified Digital Signature
| chapter-url=https://link.springer.com/content/pdf/10.1007/0-387-34805-0_21.pdf
| title=Advances in Cryptology CRYPTO' 89 Proceedings
| series=Lecture Notes in Computer Science
| volume=435 | pages=218–238
| doi=10.1007/0-387-34805-0_21 |doi-access=free
| isbn=978-0-387-97317-3
}}</ref> and [[Rabin signature]]s.<ref name="rabin1979lcs-tr">{{cite tech report
|last=Rabin |first=Michael O. |author-link=Michael O. Rabin
|title=Digitalized Signatures and Public Key Functions as Intractable as Factorization
|number=TR-212
|institution= MIT Laboratory for Computer Science
|date=January 1979
|location=Cambridge, MA, United States
|url=http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TR-212.pdf
}}</ref>


In 1988, [[Shafi Goldwasser]], [[Silvio Micali]], and [[Ronald Rivest]] became the first to rigorously define the security requirements of digital signature schemes.<ref name="SJC 17(2)">"A digital signature scheme secure against adaptive chosen-message attacks.", Shafi Goldwasser, Silvio Micali, and Ronald Rivest. SIAM Journal on Computing, 17(2):281–308, Apr. 1988.</ref> They described a hierarchy of attack models for signature schemes, and also presented the [[GMR (cryptography)|GMR signature scheme]], the first that could be proved to prevent even an existential forgery against a chosen message attack, which is the currently accepted security definition for signature schemes.<ref name="SJC 17(2)" />  The first such scheme which is not built on trapdoor functions but rather on a family of function with a much weaker required property of one-way permutation was presented by [[Moni Naor]] and [[Moti Yung]].<ref name="Z2zaX">Moni Naor, Moti Yung: Universal One-Way Hash Functions and their Cryptographic Applications. STOC 1989: 33–43</ref>
In 1988, [[Shafi Goldwasser]], [[Silvio Micali]], and [[Ronald Rivest]] became the first to rigorously define the security requirements of digital signature schemes.<ref name="SJC 17(2)">
{{cite journal
|last1=Goldwasser |first1=Shafi |author-link1=Shafi Goldwasser
|last2=Micali |first2=Silvio |author-link2=Silvio Micali
|last3=Rivest |first3=Ronald L. |author-link3=Ron Rivest
|title=A Digital Signature Scheme Secure Against Adaptive Chosen-Message Attacks
|journal=[[SIAM Journal on Computing]]
|volume=17 |issue=2 |year=1988
|pages=281–308
|url=https://cr.yp.to/bib/1988/goldwasser.pdf
|archive-url=https://web.archive.org/web/20240918024817/https://cr.yp.to/bib/1988/goldwasser.pdf
|archive-date=2024-09-18
|doi=10.1137/0217017
}}</ref>
They described a hierarchy of attack models for signature schemes, and also presented the [[GMR (cryptography)|GMR signature scheme]], the first that could be proved to prevent even an existential forgery against a chosen message attack, which is the currently accepted security definition for signature schemes.<ref name="SJC 17(2)" />  The first such scheme which is not built on trapdoor functions but rather on a family of function with a much weaker required property of one-way permutation was presented by [[Moni Naor]] and [[Moti Yung]].<ref name="Z2zaX">
{{cite book
|last1=Naor |first1=Moni |author-link1=Moni Naor
|last2=Yung |first2=Moti |author-link2=Moti Yung
|date=1989
|chapter=Universal one-way hash functions and their cryptographic applications
|title=Proceedings of the twenty-first annual ACM symposium on Theory of computing - STOC '89
|pages=33–43
|publisher=[[Association for Computing Machinery|ACM]]
|isbn=978-0-89791-307-2
|doi=10.1145/73007.73011
|doi-access=free
}}</ref>


==Method==
==Method==
Line 83: Line 151:
One digital signature scheme (of many) is based on [[RSA (algorithm)|RSA]]. To create signature keys, generate an RSA key pair containing a modulus, ''N'', that is the product of two random secret distinct large primes, along with integers, ''e'' and ''d'', such that ''e''&nbsp;''d''&nbsp;[[Modular arithmetic|≡]]&nbsp;1&nbsp;(mod&nbsp;''φ''(''N'')), where ''φ'' is [[Euler's totient function]]. The signer's public key consists of ''N'' and ''e'', and the signer's secret key contains ''d''.
One digital signature scheme (of many) is based on [[RSA (algorithm)|RSA]]. To create signature keys, generate an RSA key pair containing a modulus, ''N'', that is the product of two random secret distinct large primes, along with integers, ''e'' and ''d'', such that ''e''&nbsp;''d''&nbsp;[[Modular arithmetic|≡]]&nbsp;1&nbsp;(mod&nbsp;''φ''(''N'')), where ''φ'' is [[Euler's totient function]]. The signer's public key consists of ''N'' and ''e'', and the signer's secret key contains ''d''.


Used directly, this type of signature scheme is vulnerable to key-only existential forgery attack. To create a forgery, the attacker picks a random signature σ and uses the verification procedure to determine the message, ''m'', corresponding to that signature.<ref name="2Zzbo">"Modern Cryptography: Theory & Practice", Wenbo Mao, Prentice Hall Professional Technical Reference, New Jersey, 2004, pg. 308. {{ISBN|0-13-066943-1}}</ref> In practice, however, this type of signature is not used directly, but rather, the message to be signed is first [[cryptographic hash function|hashed]] to produce a short digest, that is then [[Padding (cryptography)#Public key cryptography|padded]] to larger width comparable to&nbsp;''N'', then signed with the reverse [[trapdoor function]].<ref name="Jwm4G">Handbook of Applied Cryptography by Alfred J. Menezes, Paul C. van Oorschot, Scott A. Vanstone. Fifth Printing (August 2001) page 445.</ref> This forgery attack, then, only produces the padded hash function output that corresponds to σ, but not a message that leads to that value, which does not lead to an attack. In the random oracle model, [[Full domain hash|hash-then-sign]] (an idealized version of that practice where hash and padding combined have close to ''N'' possible outputs), this form of signature is existentially unforgeable, even against a [[chosen-plaintext attack]].<ref name="lysythesis" />{{Clarify|reason=Please give a page number or theorem number.|date=September 2010}}<ref>{{cite conference
Used directly, this type of signature scheme is vulnerable to key-only existential forgery attack. To create a forgery, the attacker picks a random signature σ and uses the verification procedure to determine the message, ''m'', corresponding to that signature.<ref name="2Zzbo">"Modern Cryptography: Theory & Practice", Wenbo Mao, Prentice Hall Professional Technical Reference, New Jersey, 2004, pg. 308. {{ISBN|0-13-066943-1}}</ref> In practice, however, this type of signature is not used directly, but rather, the message to be signed is first [[cryptographic hash function|hashed]] to produce a short digest, that is then [[Padding (cryptography)#Public key cryptography|padded]] to larger width comparable to&nbsp;''N'', then signed with the reverse [[trapdoor function]].<ref name="Jwm4G">Handbook of Applied Cryptography by Alfred J. Menezes, Paul C. van Oorschot, Scott A. Vanstone. Fifth Printing (August 2001) page 445.</ref> This forgery attack, then, only produces the padded hash function output that corresponds to σ, but not a message that leads to that value, which does not lead to an attack. In the random oracle model, [[Full domain hash|hash-then-sign]] (an idealized version of that practice where hash and padding combined have close to ''N'' possible outputs), this form of signature is existentially unforgeable, even against a [[chosen-plaintext attack]].<ref name="lysythesis" />{{Clarify|reason=Please give a page number or theorem number.|date=September 2010}}<ref>
|last1=Bellare
{{cite book
|first1=Mihir
|last1=Bellare |first1=Mihir |author-link1=Mihir Bellare
|author-link1=Mihir Bellare
|last2=Rogaway |first2=Phillip |author-link2=Phillip Rogaway
|last2=Rogaway
|date=1996
|first2=Phillip
|chapter=The Exact Security of Digital Signatures-How to Sign with RSA and Rabin
|author-link2=Phillip Rogaway
|editor-last=Maurer |editor-first=Ueli |editor-link=Ueli Maurer (cryptographer)
|title=The Exact Security of Digital Signatures—How to Sign with RSA and Rabin
|title=Advances in Cryptology — EUROCRYPT '96
|date=1996
|series=Lecture Notes in Computer Science
|series=Lecture Notes in Computer Science
|volume=1070
|volume=1070
|location=Berlin, Heidelberg
|editor-last=Maurer
|publisher=Springer
|editor-first=Ueli
|pages=399–416
|editor-link=Ueli Maurer (cryptographer)
|doi=10.1007/3-540-68339-9_34 |doi-access=free
|conference=Advances in Cryptology — EUROCRYPT '96
|isbn=978-3-540-68339-1
|book-title=International Conference on the Theory and Application of Cryptographic Techniques Saragossa, Spain, May 12–16, 1996 Proceedings
|conference-url=https://link.springer.com/book/10.1007/3-540-68339-9
|language=en
|location=Berlin, Heidelberg
|publisher=Springer
|pages=399–416
|doi=10.1007/3-540-68339-9_34
|doi-access=free
|isbn=978-3-540-68339-1
|issn=0302-9743
|eissn=1611-3349
}}</ref>
}}</ref>


Line 119: Line 176:
==Applications==
==Applications==


As organizations move away from paper documents with ink signatures or authenticity stamps, digital signatures can provide added assurances of the evidence to provenance, identity, and status of an [[electronic document]] as well as acknowledging informed consent and approval by a signatory.  The United States Government Printing Office (GPO) publishes electronic versions of the budget, public and private laws, and congressional bills with digital signatures.  Universities including Penn State, [[University of Chicago]], and Stanford are publishing electronic student transcripts with digital signatures.
As organizations move away from paper documents with ink signatures or authenticity stamps, digital signatures can provide added assurances of the evidence to provenance, identity, and status of an [[electronic document]] as well as acknowledging informed consent and approval by a signatory.{{cn|date=July 2025}} The [[United States Government Printing Office]] (GPO) publishes electronic versions of the budget, public and private laws, and congressional bills with digital signatures.{{cn|date=July 2025}} Universities including [[Penn State]], [[University of Chicago]], and [[Stanford University|Stanford]] are publishing electronic student transcripts with digital signatures.{{cn|date=July 2025}}


Below are some common reasons for applying a digital signature to communications:
Below are some common reasons for applying a digital signature to communications:
Line 125: Line 182:
===Authentication===
===Authentication===
A message may have letterhead or a handwritten signature identifying its sender, but letterheads and handwritten signatures can be copied and pasted onto forged messages.
A message may have letterhead or a handwritten signature identifying its sender, but letterheads and handwritten signatures can be copied and pasted onto forged messages.
Even legitimate messages may be modified in transit.<ref name="stinson3e2006digsigs">{{cite book
Even legitimate messages may be modified in transit.<ref name="stinson3e2006digsigs">
{{cite book
|last=Stinson |first=Douglas |author-link=Doug Stinson
|date=2006
|chapter=7: Signature Schemes
|title=Cryptography: Theory and Practice
|title=Cryptography: Theory and Practice
|last=Stinson
|first=Douglas
|author-link=Doug Stinson
|edition=3rd
|edition=3rd
|isbn=978-1-58488-508-5
|isbn=978-1-58488-508-5
|publisher=Chapman & Hall/CRC
|publisher=Chapman & Hall/CRC
|date=2006
|chapter=7: Signature Schemes
|page=281
|page=281
}}</ref>
}}</ref>


If a bank's central office receives a letter claiming to be from a branch office with instructions to change the balance of an account, the central bankers need to be sure, before acting on the instructions, that they were actually sent by a branch banker, and not forged—whether a forger fabricated the whole letter, or just modified an existing letter in transit by adding some digits.
If a bank's central office receives a letter claiming to be from a [[branch office]] with instructions to change the balance of an account, the central bankers need to be sure, before acting on the instructions, that they were actually sent by a branch banker, and not forged—whether a forger fabricated the whole letter, or just modified an existing letter in transit by adding some digits.


With a digital signature scheme, the central office can arrange beforehand to have a public key on file whose private key is known only to the branch office.
With a digital signature scheme, the central office can arrange beforehand to have a public key on file whose private key is known only to the branch office.
Line 155: Line 211:


'''Uniqueness and malleability of signatures.'''
'''Uniqueness and malleability of signatures.'''
A signature itself cannot be used to uniquely identify the message it signs—in some signature schemes, every message has a large number of possible valid signatures from the same signer, and it may be easy, even without knowledge of the private key, to transform one valid signature into another.<ref name="bcjz2020ed25519sectheorypractice">{{cite tech report
A signature itself cannot be used to uniquely identify the message it signs—in some signature schemes, every message has a large number of possible valid signatures from the same signer, and it may be easy, even without knowledge of the private key, to transform one valid signature into another.<ref name="bcjz2020ed25519sectheorypractice">
|first1=Jacqueline
{{cite tech report
|last1=Brendel
|first1=Jacqueline |last1=Brendel
|first2=Cas
|first2=Cas |last2=Cremers
|last2=Cremers
|first3=Dennis |last3=Jackson
|first3=Dennis
|first4=Meng |last4=Zhao
|last3=Jackson
|title=The Provable Security of Ed25519: Theory and Practice
|first4=Meng
|publisher=IACR Cryptology ePrint Archive
|last4=Zhao
|number=2020/823
|title=The Provable Security of Ed25519: Theory and Practice
|date=2020-10-14
|publisher=IACR Cryptology ePrint Archive
|url=https://eprint.iacr.org/2020/823
|number=2020/823
|date=2020-10-14
|url=https://eprint.iacr.org/2020/823
}}</ref>
}}</ref>
If signatures are misused as transaction IDs in an attempt by a bank-like system such as a [[Bitcoin]] exchange to detect replays, this can be exploited to replay transactions.<ref name="decker-wattenhofer2014btcmalleablemtgox">{{cite conference
If signatures are misused as transaction IDs in an attempt by a bank-like system such as a [[Bitcoin]] exchange to detect replays, this can be exploited to replay transactions.<ref name="decker-wattenhofer2014btcmalleablemtgox">
|first1=Christian
{{cite book
|last1=Decker
|last1=Decker |first1=Christian
|first2=Roger
|last2=Wattenhofer |first2=Roger
|last2=Wattenhofer
|chapter=Bitcoin Transaction Malleability and MtGox
|title=Bitcoin Transaction Malleability and MtGox
|editor-last1=Kutyłowski |editor-first1=Mirosław
|doi=10.1007/978-3-319-11212-1_18
|editor-last2=Vaidya |editor-first2=Jaideep
|pages=313–326
|title=Computer Security - ESORICS 2014
|editor-first1=Mirosław
|year=2014  
|editor-last1=Kutyłowski
|series=Lecture Notes in Computer Science
|editor-first2=Jaideep
|volume=8713
|editor-last2=Vaidya
|pages=313–326
|conference=European Symposium on Research in Computer Security—ESORICS
|publisher=Springer
|year=2014
|arxiv=1403.6676
|series=Lecture Notes in Computer Science
|doi=10.1007/978-3-319-11212-1_18
|volume=8713
|doi-access=free
|publisher=Springer
|isbn=978-3-319-11212-1
|isbn=978-3-319-11212-1
|doi-access=free
|arxiv=1403.6676
}}</ref>
}}</ref>


Line 205: Line 255:


===Non-repudiation===
===Non-repudiation===
[[Non-repudiation]],<ref name="Cryptomathic_MajorStandardsDigSig" /> or more specifically non-repudiation of origin, is an important aspect of digital signatures. By this property, an entity that has signed some information cannot at a later time deny having signed it. Similarly, access to the public key only does not enable a fraudulent party to fake a valid signature.
[[Non-repudiation]], or more specifically non-repudiation of origin, is an important aspect of digital signatures. By this property, an entity that has signed some information cannot at a later time deny having signed it. Similarly, access to the public key only does not enable a fraudulent party to fake a valid signature.


Note that these authentication, non-repudiation etc. properties rely on the secret key {{em|not having been revoked}} prior to its usage. Public [[certificate revocation|revocation]] of a key-pair is a required ability, else leaked secret keys would continue to implicate the claimed owner of the key-pair. Checking revocation status requires an "online" check; e.g., checking a [[certificate revocation list]] or via the [[Online Certificate Status Protocol]].<ref name="CryptomathicDigSigServicesAshiqJA" />  Very roughly this is analogous to a vendor who receives credit-cards first checking online with the credit-card issuer to find if a given card has been reported lost or stolen. Of course, with stolen key pairs, the theft is often discovered only after the secret key's use, e.g., to sign a bogus certificate for espionage purpose.
Note that these authentication, non-repudiation etc. properties rely on the secret key {{em|not having been revoked}} prior to its usage. Public [[certificate revocation|revocation]] of a key-pair is a required ability, else leaked secret keys would continue to implicate the claimed owner of the key-pair. Checking revocation status requires an "online" check; e.g., checking a [[certificate revocation list]] or via the [[Online Certificate Status Protocol]].<ref name="CryptomathicDigSigServicesAshiqJA">{{cite web|last1=JA|first1=Ashiq|title=Recommendations for Providing Digital Signature Services|url=http://www.cryptomathic.com/news-events/blog/recommendations-for-providing-digital-signature-services|publisher=Cryptomathic|access-date=7 January 2016|archive-date=9 February 2016|archive-url=https://web.archive.org/web/20160209203856/http://www.cryptomathic.com/news-events/blog/recommendations-for-providing-digital-signature-services|url-status=live}}</ref>  Very roughly this is analogous to a vendor who receives credit-cards first checking online with the credit-card issuer to find if a given card has been reported lost or stolen. Of course, with stolen key pairs, the theft is often discovered only after the secret key's use, e.g., to sign a bogus certificate for espionage purpose.


==Notions of security==
==Notions of security==
Line 250: Line 300:
===WYSIWYS===
===WYSIWYS===
{{Main|WYSIWYS}}
{{Main|WYSIWYS}}
Technically speaking, a digital signature applies to a string of bits, whereas humans and applications "believe" that they sign the semantic interpretation of those bits. In order to be semantically interpreted, the bit string must be transformed into a form that is meaningful for humans and applications, and this is done through a combination of hardware and software based processes on a computer system. The problem is that the semantic interpretation of bits can change as a function of the processes used to transform the bits into semantic content. It is relatively easy to change the interpretation of a digital document by implementing changes on the computer system where the document is being processed. From a semantic perspective this creates uncertainty about what exactly has been signed. WYSIWYS (What You See Is What You Sign)<ref name="WYSIWYS_SeminalPaper">{{cite journal|last1=Landrock|first1=Peter|last2=Pedersen|first2=Torben|title=WYSIWYS? – What you see is what you sign?|journal=Information Security Technical Report|date=1998|volume=3|issue=2|pages=55–61|doi=10.1016/S0167-4048(98)80005-8}}</ref> means that the semantic interpretation of a signed message cannot be changed. In particular this also means that a message cannot contain hidden information that the signer is unaware of, and that can be revealed after the signature has been applied. WYSIWYS is a requirement for the validity of digital signatures, but this requirement is difficult to guarantee because of the increasing complexity of modern computer systems. The term WYSIWYS was coined by [[Peter Landrock]] and [[Cryptomathic|Torben Pedersen]] to describe some of the principles in delivering secure and legally binding digital signatures for Pan-European projects.<ref name="WYSIWYS_SeminalPaper" />
Technically speaking, a digital signature applies to a string of bits, whereas humans and applications "believe" that they sign the semantic interpretation of those bits. In order to be semantically interpreted, the bit string must be transformed into a form that is meaningful for humans and applications, and this is done through a combination of hardware and software based processes on a computer system. The problem is that the semantic interpretation of bits can change as a function of the processes used to transform the bits into semantic content. It is relatively easy to change the interpretation of a digital document by implementing changes on the computer system where the document is being processed. From a semantic perspective this creates uncertainty about what exactly has been signed. [[WYSIWYS]] (What You See Is What You Sign)<ref name="WYSIWYS_SeminalPaper">{{cite journal|last1=Landrock|first1=Peter|last2=Pedersen|first2=Torben|title=WYSIWYS? – What you see is what you sign?|journal=Information Security Technical Report|date=1998|volume=3|issue=2|pages=55–61|doi=10.1016/S0167-4048(98)80005-8}}</ref> means that the semantic interpretation of a signed message cannot be changed. In particular this also means that a message cannot contain hidden information that the signer is unaware of, and that can be revealed after the signature has been applied. WYSIWYS is a requirement for the validity of digital signatures, but this requirement is difficult to guarantee because of the increasing complexity of modern computer systems. The term WYSIWYS was coined by [[Peter Landrock]] and [[Cryptomathic|Torben Pedersen]] to describe some of the principles in delivering secure and legally binding digital signatures for Pan-European projects.<ref name="WYSIWYS_SeminalPaper" />


===Digital signatures versus ink on paper signatures===
===Digital signatures versus ink on paper signatures===
Line 303: Line 353:
===Using separate key pairs for signing and encryption===
===Using separate key pairs for signing and encryption===
In several countries, a digital signature has a status somewhat like that of a traditional pen and paper signature, as in the
In several countries, a digital signature has a status somewhat like that of a traditional pen and paper signature, as in the
[[Electronic Signatures Directive|1999 EU digital signature directive]] and [[EIDAS|2014 EU follow-on legislation]].<ref name="Cryptomathic_MajorStandardsDigSig" /> Generally, these provisions mean that anything digitally signed legally binds the signer of the document to the terms therein. For that reason, it is often thought best to use separate key pairs for encrypting and signing. Using the encryption key pair, a person can engage in an encrypted conversation (e.g., regarding a real estate transaction), but the encryption does not legally sign every message he or she sends. Only when both parties come to an agreement do they sign a contract with their signing keys, and only then are they legally bound by the terms of a specific document. After signing, the document can be sent over the encrypted link.  If a signing key is lost or compromised, it can be revoked to mitigate any future transactions.  If an encryption key is lost, a backup or [[key escrow]] should be utilized to continue viewing encrypted content.  Signing keys should never be backed up or escrowed unless the backup destination is securely encrypted.
[[Electronic Signatures Directive|1999 EU digital signature directive]] and [[EIDAS|2014 EU follow-on legislation]].<ref name="Cryptomathic_MajorStandardsDigSig">{{cite web|last1=Turner|first1=Dawn|title=Major Standards and Compliance of Digital Signatures – A World-Wide Consideration|url=http://www.cryptomathic.com/news-events/blog/major-standards-and-compliance-of-digital-signatures-a-world-wide-consideration|publisher=Cryptomathic|access-date=7 January 2016|archive-date=9 February 2016|archive-url=https://web.archive.org/web/20160209203857/http://www.cryptomathic.com/news-events/blog/major-standards-and-compliance-of-digital-signatures-a-world-wide-consideration|url-status=live}}</ref> Generally, these provisions mean that anything digitally signed legally binds the signer of the document to the terms therein. For that reason, it is often thought best to use separate key pairs for encrypting and signing. Using the encryption key pair, a person can engage in an encrypted conversation (e.g., regarding a real estate transaction), but the encryption does not legally sign every message he or she sends. Only when both parties come to an agreement do they sign a contract with their signing keys, and only then are they legally bound by the terms of a specific document. After signing, the document can be sent over the encrypted link.  If a signing key is lost or compromised, it can be revoked to mitigate any future transactions.  If an encryption key is lost, a backup or [[key escrow]] should be utilized to continue viewing encrypted content.  Signing keys should never be backed up or escrowed unless the backup destination is securely encrypted.


==See also==
==See also==
{{wikiversity|Digital Signature}}
* [[21 CFR 11]]
* [[21 CFR 11]]
* [[X.509]]
* [[X.509]]
Line 338: Line 389:
* Jeremiah S. Buckley, John P. Kromer, Margo H. K. Tank, and R. David Whitaker, The Law of Electronic Signatures (3rd Edition, West Publishing, 2010).
* Jeremiah S. Buckley, John P. Kromer, Margo H. K. Tank, and R. David Whitaker, The Law of Electronic Signatures (3rd Edition, West Publishing, 2010).
* [http://journals.sas.ac.uk/deeslr/ ''Digital Evidence and Electronic Signature Law Review''] Free open source
* [http://journals.sas.ac.uk/deeslr/ ''Digital Evidence and Electronic Signature Law Review''] Free open source
* [https://www.proofpoint.com/us/threat-reference/digital-signature Benefits of Using Digital Signatures]


{{Cryptography navbox | public-key}}
{{Cryptography navbox | public-key}}

Latest revision as of 09:43, 14 November 2025

Template:Short description Script error: No such module "about".

Alice signs a message—"Hello Bob!"—by appending a signature which is computed from the message and her private key. Bob receives the message, including the signature, and using Alice's public key, verifies the authenticity of the signed message.
Alice signs a message—"Hello Bob!"—by appending a signature which is computed from the message and her private key. Bob receives both the message and signature. He uses Alice's public key to verify the authenticity of the signed message.

A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature on a message gives a recipient confidence that the message came from a sender known to the recipient.[1][2]

Digital signatures are a type of public-key cryptography, and are commonly used for software distribution,[3][4][5] financial transactions,Script error: No such module "Unsubst". contract management software,Script error: No such module "Unsubst". and in other cases where it is important to detect forgery or tampering.

A digital signature on a message or document is similar to a handwritten signature on paper, but it is not restricted to a physical medium like paper—any bitstring can be digitally signed—and while a handwritten signature on paper could be copied onto other paper in a forgery, a digital signature on a message is mathematically bound to the content of the message so that it is infeasible for anyone to forge a valid digital signature on any other message.[6]

Digital signatures are often used to implement electronic signatures, which include any electronic data that carries the intent of a signature,[7] but not all electronic signatures use digital signatures.[8][9]

Definition

A digital signature scheme consists of three algorithms:[6][10]

  • A key generation algorithm that selects a private key at random from a set of possible private keys. The algorithm outputs the private key and a corresponding public key.
  • A signing algorithm that, given a message and a private key, produces a signature.
  • A signature verifying algorithm that, given the message, public key and signature, either accepts or rejects the message's claim to authenticity.

Two main properties are required:

  1. Correctness: Signatures produced by the signing algorithm with a private key pass the verification algorithm with the corresponding public key.
  2. Security (existential unforgeability under chosen-message attack, or EUF-CMA): It should be computationally infeasible to generate a valid signature for a party without knowing that party's private key.

Formally, a digital signature scheme is a triple of probabilistic polynomial-time algorithms, (G, S, V), satisfying:

  • G (key-generator) generates a public key (pk), and a corresponding private key (sk), on input 1n, where n is the security parameter.
  • S (signing) returns a tag, t, on the inputs: the private key (sk), and a string (x).
  • V (verifying) outputs accepted or rejected on the inputs: the public key (pk), a string (x), and a tag (t).

Here 1n refers to a unary number in the formalism of computational complexity theory.

For correctness, S and V must satisfy

Pr [(pk, sk) ← G(1n), V(pk, x, S(sk, x)) = accepted] = 1.[11]

A digital signature scheme is secure if for every non-uniform probabilistic polynomial time adversary A,

Pr [(pk, sk) ← G(1n), (x, t) ← AS(sk, · )(pk, 1n), xQ, V(pk, x, t) = accepted] < negl(n),

where AS(sk, · ) denotes that A has access to the oracle, S(sk, · ), Q denotes the set of the queries on S made by A, which knows the public key, pk, and the security parameter, n, and xQ denotes that the adversary may not directly query the string, x, on S.[11][12]

History

In 1976, Whitfield Diffie and Martin Hellman first described the notion of a digital signature scheme, although they only conjectured that such schemes existed based on functions that are trapdoor one-way permutations.[13][14] Soon afterwards, Ronald Rivest, Adi Shamir, and Len Adleman invented the RSA algorithm, which could be used to produce primitive digital signatures[15] (although only as a proof-of-concept – "plain" RSA signatures are not secure[16]). The first widely marketed software package to offer digital signature was Lotus Notes 1.0, released in 1989, which used the RSA algorithm.[17]

Other digital signature schemes were soon developed after RSA, the earliest being Lamport signatures,[18] Merkle signatures (also known as "Merkle trees" or simply "Hash trees"),[19] and Rabin signatures.[20]

In 1988, Shafi Goldwasser, Silvio Micali, and Ronald Rivest became the first to rigorously define the security requirements of digital signature schemes.[21] They described a hierarchy of attack models for signature schemes, and also presented the GMR signature scheme, the first that could be proved to prevent even an existential forgery against a chosen message attack, which is the currently accepted security definition for signature schemes.[21] The first such scheme which is not built on trapdoor functions but rather on a family of function with a much weaker required property of one-way permutation was presented by Moni Naor and Moti Yung.[22]

Method

Template:More citations needed One digital signature scheme (of many) is based on RSA. To create signature keys, generate an RSA key pair containing a modulus, N, that is the product of two random secret distinct large primes, along with integers, e and d, such that e d  1 (mod φ(N)), where φ is Euler's totient function. The signer's public key consists of N and e, and the signer's secret key contains d.

Used directly, this type of signature scheme is vulnerable to key-only existential forgery attack. To create a forgery, the attacker picks a random signature σ and uses the verification procedure to determine the message, m, corresponding to that signature.[23] In practice, however, this type of signature is not used directly, but rather, the message to be signed is first hashed to produce a short digest, that is then padded to larger width comparable to N, then signed with the reverse trapdoor function.[24] This forgery attack, then, only produces the padded hash function output that corresponds to σ, but not a message that leads to that value, which does not lead to an attack. In the random oracle model, hash-then-sign (an idealized version of that practice where hash and padding combined have close to N possible outputs), this form of signature is existentially unforgeable, even against a chosen-plaintext attack.[14]Template:Clarify[25]

There are several reasons to sign such a hash (or message digest) instead of the whole document.

For efficiency
The signature will be much shorter and thus save time since hashing is generally much faster than signing in practice.
For compatibility
Messages are typically bit strings, but some signature schemes operate on other domains (such as, in the case of RSA, numbers modulo a composite number N). A hash function can be used to convert an arbitrary input into the proper format.
For integrity
Without the hash function, the text "to be signed" may have to be split (separated) in blocks small enough for the signature scheme to act on them directly. However, the receiver of the signed blocks is not able to recognize if all the blocks are present and in the appropriate order.

Applications

As organizations move away from paper documents with ink signatures or authenticity stamps, digital signatures can provide added assurances of the evidence to provenance, identity, and status of an electronic document as well as acknowledging informed consent and approval by a signatory.Script error: No such module "Unsubst". The United States Government Printing Office (GPO) publishes electronic versions of the budget, public and private laws, and congressional bills with digital signatures.Script error: No such module "Unsubst". Universities including Penn State, University of Chicago, and Stanford are publishing electronic student transcripts with digital signatures.Script error: No such module "Unsubst".

Below are some common reasons for applying a digital signature to communications:

Authentication

A message may have letterhead or a handwritten signature identifying its sender, but letterheads and handwritten signatures can be copied and pasted onto forged messages. Even legitimate messages may be modified in transit.[6]

If a bank's central office receives a letter claiming to be from a branch office with instructions to change the balance of an account, the central bankers need to be sure, before acting on the instructions, that they were actually sent by a branch banker, and not forged—whether a forger fabricated the whole letter, or just modified an existing letter in transit by adding some digits.

With a digital signature scheme, the central office can arrange beforehand to have a public key on file whose private key is known only to the branch office. The branch office can later sign a message and the central office can use the public key to verify the signed message was not a forgery before acting on it. A forger who doesn't know the sender's private key can't sign a different message, or even change a single digit in an existing message without making the recipient's signature verification fail.[6][1][2]

Encryption can hide the content of the message from an eavesdropper, but encryption on its own may not let recipient verify the message's authenticity, or even detect selective modifications like changing a digit—if the bank's offices simply encrypted the messages they exchange, they could still be vulnerable to forgery. In other applications, such as software updates, the messages are not secret—when a software author publishes a patch for all existing installations of the software to apply, the patch itself is not secret, but computers running the software must verify the authenticity of the patch before applying it, lest they become victims to malware.[2]

Limitations

Replays. A digital signature scheme on its own does not prevent a valid signed message from being recorded and then maliciously reused in a replay attack. For example, the branch office may legitimately request that bank transfer be issued once in a signed message. If the bank doesn't use a system of transaction IDs in their messages to detect which transfers have already happened, someone could illegitimately reuse the same signed message many times to drain an account.[6]

Uniqueness and malleability of signatures. A signature itself cannot be used to uniquely identify the message it signs—in some signature schemes, every message has a large number of possible valid signatures from the same signer, and it may be easy, even without knowledge of the private key, to transform one valid signature into another.[26] If signatures are misused as transaction IDs in an attempt by a bank-like system such as a Bitcoin exchange to detect replays, this can be exploited to replay transactions.[27]

Authenticating a public key. Prior knowledge of a public key can be used to verify authenticity of a signed message, but not the other way around—prior knowledge of a signed message cannot be used to verify authenticity of a public key. In some signature schemes, given a signed message, it is easy to construct a public key under which the signed message will pass verification, even without knowledge of the private key that was used to make the signed message in the first place.[28]

Non-repudiation

Non-repudiation, or more specifically non-repudiation of origin, is an important aspect of digital signatures. By this property, an entity that has signed some information cannot at a later time deny having signed it. Similarly, access to the public key only does not enable a fraudulent party to fake a valid signature.

Note that these authentication, non-repudiation etc. properties rely on the secret key Template:Em prior to its usage. Public revocation of a key-pair is a required ability, else leaked secret keys would continue to implicate the claimed owner of the key-pair. Checking revocation status requires an "online" check; e.g., checking a certificate revocation list or via the Online Certificate Status Protocol.[29] Very roughly this is analogous to a vendor who receives credit-cards first checking online with the credit-card issuer to find if a given card has been reported lost or stolen. Of course, with stolen key pairs, the theft is often discovered only after the secret key's use, e.g., to sign a bogus certificate for espionage purpose.

Notions of security

In their foundational paper, Goldwasser, Micali, and Rivest lay out a hierarchy of attack models against digital signatures:[21]

  1. In a key-only attack, the attacker is only given the public verification key.
  2. In a known message attack, the attacker is given valid signatures for a variety of messages known by the attacker but not chosen by the attacker.
  3. In an adaptive chosen message attack, the attacker first learns signatures on arbitrary messages of the attacker's choice.

They also describe a hierarchy of attack results:[21]

  1. A total break results in the recovery of the signing key.
  2. A universal forgery attack results in the ability to forge signatures for any message.
  3. A selective forgery attack results in a signature on a message of the adversary's choice.
  4. An existential forgery merely results in some valid message/signature pair not already known to the adversary.

The strongest notion of security, therefore, is security against existential forgery under an adaptive chosen message attack.

Additional security precautions

Putting the private key on a smart card

All public key / private key cryptosystems depend entirely on keeping the private key secret. A private key can be stored on a user's computer, and protected by a local password, but this has two disadvantages:

  • the user can only sign documents on that particular computer
  • the security of the private key depends entirely on the security of the computer

A more secure alternative is to store the private key on a smart card. Many smart cards are designed to be tamper-resistant (although some designs have been broken, notably by Ross Anderson and his students[30]). In a typical digital signature implementation, the hash calculated from the document is sent to the smart card, whose CPU signs the hash using the stored private key of the user, and then returns the signed hash. Typically, a user must activate their smart card by entering a personal identification number or PIN code (thus providing two-factor authentication). It can be arranged that the private key never leaves the smart card, although this is not always implemented. If the smart card is stolen, the thief will still need the PIN code to generate a digital signature. This reduces the security of the scheme to that of the PIN system, although it still requires an attacker to possess the card. A mitigating factor is that private keys, if generated and stored on smart cards, are usually regarded as difficult to copy, and are assumed to exist in exactly one copy. Thus, the loss of the smart card may be detected by the owner and the corresponding certificate can be immediately revoked. Private keys that are protected by software only may be easier to copy, and such compromises are far more difficult to detect.

Using smart card readers with a separate keyboard

Entering a PIN code to activate the smart card commonly requires a numeric keypad. Some card readers have their own numeric keypad. This is safer than using a card reader integrated into a PC, and then entering the PIN using that computer's keyboard. Readers with a numeric keypad are meant to circumvent the eavesdropping threat where the computer might be running a keystroke logger, potentially compromising the PIN code. Specialized card readers are also less vulnerable to tampering with their software or hardware and are often EAL3 certified.

Other smart card designs

Smart card design is an active field, and there are smart card schemes which are intended to avoid these particular problems, despite having few security proofs so far.

Using digital signatures only with trusted applications

One of the main differences between a digital signature and a written signature is that the user does not "see" what they sign. The user application presents a hash code to be signed by the digital signing algorithm using the private key. An attacker who gains control of the user's PC can possibly replace the user application with a foreign substitute, in effect replacing the user's own communications with those of the attacker. This could allow a malicious application to trick a user into signing any document by displaying the user's original on-screen, but presenting the attacker's own documents to the signing application.

To protect against this scenario, an authentication system can be set up between the user's application (word processor, email client, etc.) and the signing application. The general idea is to provide some means for both the user application and signing application to verify each other's integrity. For example, the signing application may require all requests to come from digitally signed binaries.

Using a network attached hardware security module

One of the main differences between a cloud based digital signature service and a locally provided one is risk. Many risk averse companies, including governments, financial and medical institutions, and payment processors require more secure standards, like FIPS 140-2 level 3 and FIPS 201 certification, to ensure the signature is validated and secure.

WYSIWYS

Script error: No such module "Labelled list hatnote". Technically speaking, a digital signature applies to a string of bits, whereas humans and applications "believe" that they sign the semantic interpretation of those bits. In order to be semantically interpreted, the bit string must be transformed into a form that is meaningful for humans and applications, and this is done through a combination of hardware and software based processes on a computer system. The problem is that the semantic interpretation of bits can change as a function of the processes used to transform the bits into semantic content. It is relatively easy to change the interpretation of a digital document by implementing changes on the computer system where the document is being processed. From a semantic perspective this creates uncertainty about what exactly has been signed. WYSIWYS (What You See Is What You Sign)[31] means that the semantic interpretation of a signed message cannot be changed. In particular this also means that a message cannot contain hidden information that the signer is unaware of, and that can be revealed after the signature has been applied. WYSIWYS is a requirement for the validity of digital signatures, but this requirement is difficult to guarantee because of the increasing complexity of modern computer systems. The term WYSIWYS was coined by Peter Landrock and Torben Pedersen to describe some of the principles in delivering secure and legally binding digital signatures for Pan-European projects.[31]

Digital signatures versus ink on paper signatures

An ink signature could be replicated from one document to another by copying the image manually or digitally, but to have credible signature copies that can resist some scrutiny is a significant manual or technical skill, and to produce ink signature copies that resist professional scrutiny is very difficult.

Digital signatures cryptographically bind an electronic identity to an electronic document and the digital signature cannot be copied to another document. Paper contracts sometimes have the ink signature block on the last page, and the previous pages may be replaced after a signature is applied. Digital signatures can be applied to an entire document, such that the digital signature on the last page will indicate tampering if any data on any of the pages have been altered, but this can also be achieved by signing with ink and numbering all pages of the contract.

Some digital signature algorithms

The current state of use – legal and practical

Script error: No such module "Hatnote". Most digital signature schemes share the following goals regardless of cryptographic theory or legal provision:

  1. Quality algorithms: Some public-key algorithms are known to be insecure, as practical attacks against them have been discovered.
  2. Quality implementations: An implementation of a good algorithm (or protocol) with mistake(s) will not work.
  3. Users (and their software) must carry out the signature protocol properly.
  4. The private key must remain private: If the private key becomes known to any other party, that party can produce perfect digital signatures of anything.
  5. The public key owner must be verifiable: A public key associated with Bob actually came from Bob. This is commonly done using a public key infrastructure (PKI) and the public key↔user association is attested by the operator of the PKI (called a certificate authority). For 'open' PKIs in which anyone can request such an attestation (universally embodied in a cryptographically protected public key certificate), the possibility of mistaken attestation is non-trivial. Commercial PKI operators have suffered several publicly known problems. Such mistakes could lead to falsely signed, and thus wrongly attributed, documents. 'Closed' PKI systems are more expensive, but less easily subverted in this way.

Only if all of these conditions are met will a digital signature actually be any evidence of who sent the message, and therefore of their assent to its contents. Legal enactment cannot change this reality of the existing engineering possibilities, though some such have not reflected this actuality.

Legislatures, being importuned by businesses expecting to profit from operating a PKI, or by the technological avant-garde advocating new solutions to old problems, have enacted statutes and/or regulations in many jurisdictions authorizing, endorsing, encouraging, or permitting digital signatures and providing for (or limiting) their legal effect. The first appears to have been in Utah in the United States, followed closely by the states Massachusetts and California. Other countries have also passed statutes or issued regulations in this area as well and the UN has had an active model law project for some time. These enactments (or proposed enactments) vary from place to place, have typically embodied expectations at variance (optimistically or pessimistically) with the state of the underlying cryptographic engineering, and have had the net effect of confusing potential users and specifiers, nearly all of whom are not cryptographically knowledgeable.

Adoption of technical standards for digital signatures have lagged behind much of the legislation, delaying a more or less unified engineering position on interoperability, algorithm choice, key lengths, and so on what the engineering is attempting to provide.

Script error: No such module "Labelled list hatnote".

Industry standards

Script error: No such module "Unsubst". Some industries have established common interoperability standards for the use of digital signatures between members of the industry and with regulators. These include the Automotive Network Exchange for the automobile industry and the SAFE-BioPharma Association for the healthcare industry.

Using separate key pairs for signing and encryption

In several countries, a digital signature has a status somewhat like that of a traditional pen and paper signature, as in the 1999 EU digital signature directive and 2014 EU follow-on legislation.[34] Generally, these provisions mean that anything digitally signed legally binds the signer of the document to the terms therein. For that reason, it is often thought best to use separate key pairs for encrypting and signing. Using the encryption key pair, a person can engage in an encrypted conversation (e.g., regarding a real estate transaction), but the encryption does not legally sign every message he or she sends. Only when both parties come to an agreement do they sign a contract with their signing keys, and only then are they legally bound by the terms of a specific document. After signing, the document can be sent over the encrypted link. If a signing key is lost or compromised, it can be revoked to mitigate any future transactions. If an encryption key is lost, a backup or key escrow should be utilized to continue viewing encrypted content. Signing keys should never be backed up or escrowed unless the backup destination is securely encrypted.

See also

Template:Sister project

Notes

Template:Reflist

References

  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".

Further reading

  • J. Katz and Y. Lindell, "Introduction to Modern Cryptography" (Chapman & Hall/CRC Press, 2007)
  • Lorna Brazell, Electronic Signatures and Identities Law and Regulation (2nd edn, London: Sweet & Maxwell, 2008)
  • Dennis Campbell, editor, E-Commerce and the Law of Digital Signatures (Oceana Publications, 2005)
  • M. H. M Schellenkens, Electronic Signatures Authentication Technology from a Legal Perspective, (TMC Asser Press, 2004)
  • Jeremiah S. Buckley, John P. Kromer, Margo H. K. Tank, and R. David Whitaker, The Law of Electronic Signatures (3rd Edition, West Publishing, 2010).
  • Digital Evidence and Electronic Signature Law Review Free open source
  • Benefits of Using Digital Signatures

Template:Cryptography navbox Template:Authority control

  1. a b Script error: No such module "citation/CS1".
  2. a b c Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. a b c d e Script error: No such module "citation/CS1".
  7. Script error: No such module "citation/CS1".
  8. State of WI Template:Webarchive
  9. National Archives of Australia Template:Webarchive
  10. Script error: No such module "citation/CS1".
  11. a b Pass, def 135.1
  12. Goldreich's FoC, vol. 2, def 6.1.2. Pass, def 135.2
  13. Script error: No such module "Citation/CS1".
  14. a b "Signature Schemes and Applications to Cryptographic Protocol Design Template:Webarchive", Anna Lysyanskaya, PhD thesis, MIT, 2002.
  15. Script error: No such module "Citation/CS1".
  16. For example any integer, r, "signs" m=re and the product, s1s2, of any two valid signatures, s1, s2 of m1, m2 is a valid signature of the product, m1m2.
  17. Script error: No such module "citation/CS1".
  18. "Constructing digital signatures from a one-way function.", Leslie Lamport, Technical Report CSL-98, SRI International, Oct. 1979.
  19. Script error: No such module "citation/CS1".
  20. Script error: No such module "citation/CS1".
  21. a b c d Script error: No such module "Citation/CS1".
  22. Script error: No such module "citation/CS1".
  23. "Modern Cryptography: Theory & Practice", Wenbo Mao, Prentice Hall Professional Technical Reference, New Jersey, 2004, pg. 308. Template:ISBN
  24. Handbook of Applied Cryptography by Alfred J. Menezes, Paul C. van Oorschot, Scott A. Vanstone. Fifth Printing (August 2001) page 445.
  25. Script error: No such module "citation/CS1".
  26. Script error: No such module "citation/CS1".
  27. Script error: No such module "citation/CS1".
  28. Template:Cite mailing list
  29. Script error: No such module "citation/CS1".
  30. Script error: No such module "citation/CS1".
  31. a b Script error: No such module "Citation/CS1".
  32. RFC 5758
  33. Script error: No such module "citation/CS1".
  34. Script error: No such module "citation/CS1".