pdf数字签名方法
如何在 PDF 文件中添加日期和数字签名字段说明书

How to Add Date and Digital Signature Fields to a Portable Document Format (PDF) FileDate FieldIn Adobe Acrobat Pro DC, open the PDF.Click the Tools tab and under Prepare Form, click Open.At the screen stating: “Select a file or scan a document to begin” Adobe should alreadydisplay the file you have opened in Step 1. If you need to change the file, then click on“Change File” and browse to the correct file.a.Do not check the box next to: “This document requires signatures” (it changes whichsignature field options are available).b.Recommendation: Change the Form Field auto detection to OFF by clicking“Change” and unchecking the last box in General for: “Automatically detect formfields,” especially if the files you are adding the digital signature field to are notforms. If you choose to keep the “Form field auto detection is ON” you may get formfields detected in error. If this happens, click on the fields you do not need and deletethem. Do not leave fields that you do not need in the file because this will affectaccessibility and compliance with Section 508.c.You may get a message: “No form fields detected.” This is fine, especially if thedocument is correspondence or the file is not a “form.”Your mouse will turn into a light blue box for you to Left mouse click (and hold) > Draga box > Release mouse button (This is where you want the date stamp field in your document).Using the leader lines Release the date field under the letterhead even and centered on“OFFICE OF THE SECRETARY.” You will standardize the placement and size of box you create in Step 11.Within the Field Name properties box, enter “Date Signed” and check the box next to:“Required field.” In the bottom, right corner, click on the blue hyperlink “All Properties.”Click on the Appearance Tab and ensure the text font and font size matches your document.a.Note: Most DOI documents will be in Times New Roman and 12-point.Click on the Position Tab and ensure the Position Width is 2 inches and the PositionHeight is 0.25 inches. Click the box “Do not change height and width when changing the position.” This grays out the Width and Height fields. You may click and drag the box to center it under the Office of the Secretary, Washington, DC 20240 on the electronic letterhead, as necessary.Click on the Options Tab and change the Alignment Field to “Center” by clicking on thedrop-down menu arrow.Click on the Format Tab and scroll down to highlight “mmm d, yyyy”. Your date willappear in the “Example of current format:” field. Click Close.Close the Prepare Form Tool by clicking Close in the upper-right corner. Your date fieldappears as a light blue box. Hover your cursor in the blue date field box and the Tooltip appears, “Click to date stamp.” Again, you may click and drag to adjust placement of the field, as necessary.If you are date stamping the document, please continue to Steps 16 and 17. Otherwise,you are done creating the Date Stamp field. Proceed to “How to Add a Signature Field to a PDF”.Click in the date field and a drop-down menu arrow appears. Click on the drop-downarrow for a calendar to choose your date.Congratulations! You have date stamped your document. Now, proceed to adding adigital signature field to your PDF file.Digital Signature FieldIn the Digital Signature Properties, dialog box, click on the General Tab enter “Click toClick on the Appearance Tab, leave the font size default to Auto. The font defaults to Helvitica. You can scroll down to change the font to Times New Roman.If you just added the Date Field, Adobe remembers… Uncheck the box “Do not changeheight and width when changing the position.” On the Position Tab ensure the Position Width is 3 inches and the Position Height is 0.40 inches. Recheck the box “Do notchange height and width when changing the position.” This grays out the Width and Height fields. Click Close.a.NOTE: If you have more than one signature in your file (e.g., a “Through” line), youmust give each digital signature field a unique name. Repeat Steps 5-11 for eachsignature required. Click Close after adding each signature field.8.Close the Prepare Form Tool by clicking Close in the upper-right corner. Your signaturefield appears as a light blue box with the red “Sign here” flag. Hover your cursor in the blue date field box and the Tool Tip appears, “Click to sign, check box to lock document (Click to sign)”. Again, you may click and drag to adjust placement of the field, asnecessary.Congratulations! You have added a digital signature field.Save your document, adjusting the file name by adding “ready for signature”. Thisassists with version control.Run the Accessibility Checker Click Start Checking.The Accessibility Checker Menu appears on the left side of the document.Open all the arrows next to headings in bold, which indicates accessibility issues.You must address all issues marked with a question mark and red “X”.To correct the “Title Failed”, right click on it and click FixIn the Description Window, uncheck “Leave As Is” and enter the document Title. Youcan repeat for Subject, Author and Keywords if you wish. Click OK.The Title Failed changes to Title Passed.To correct the Tagged annotations – Failed, click on the Tag panel, highlight the main“Tags” at the top, right-click and select FindIn the Find Element dialog box, click on the dropdown menu, select “UnmarkedAnnotations,” then select the radio button next to Search Document, and click “Find.”The date field you added is highlighted. Click “Tag Element,” select “Form” in the“Type” field, and click OK. The next, if any, unmarked annotated field is automatically highlighted. As you can see, the digital signature field you added is now highlighted. The Find Element dialog box remains open until you close it; therefore, click “Tag Element” and “Form” should already be selected, then click OK. The Find Complete dialog box opens. Click OK and click Close in the Find Element dialog box.Rerun the Accessibility Checker by selecting “Full Check” and clicking “StartChecking.” Three manual checks should be displayed: Logical Reading Order – Needs manual check, Color contrast – Needs manual check, and Navigation links – Needs manual check. The logical reading order and color contrast will be in the Document heading and Navigation links will be in the Page heading. Click Close to close the Accessibility tool. Click the “X” in the upper-right corner of the Accessibility Checker to close the report.Save the file and continue to the “Fixing Reading Order for the Date and DigitalSignature Fields” to finalize the PDF file for digital signature.Fixing Reading Order for Date and Digital Signature FieldsThe Reading Order panel opens. Make sure the box next to: “Display like elements in a single block” is unchecked.You will notice tagged items in the PDF file are displayed in grey blocks with acorresponding number in the upper-left corner to the number listed in the Order panel. The date and digital signature fields are at the bottom of the order for Page 1. In this example, they are numbers 29 and 30. The fields need to be moved so a user using assistive technology has the date field read after the letterhead and the digital signature field read after the full name of the signatory official. To move the date field, you will hold your left mouse button and drag it above the word, “Memorandum” and release your left mouse button.Repeat the same steps for moving the digital signature before the signatory official’s title.Close the Reading Order dialog box by clicking “Close,” then close the Order panel byclicking the “X” in the upper-right corner.Save your file. It is recommended to add “Ready for Signature” to your filename toensure version control and decipher the final PDF to send to the signatory official. Congratulations! Your PDF file is ready for the signatory official’s digital signature. Asa reminder, the signatory official will select the date she or he is signing the PDF filefirst, then click on the digital signature field to digitally sign and click “Lock document after signing.”。
PDF怎么添加数字签名?这款编辑器软件很多人都说好用

PDF怎么添加数字签名?这款编辑器软件很多人都说好用PDF文件怎么添加数字签名?其实,要给PDF文件添加数字签名,我们可以选择把这份文件转换成PDF格式的文件,再通过PDF编辑器给这份PDF文件添加数字签名。
那么,给PDF文件添加数字签名,我们可以选择哪一款PDF编辑器呢?另外,我们又该如何使用PDF编辑器给PDF文件添加数字签名呢?试试“迅捷PDF编辑器”,这款PDF编辑器软件很多人都说好用。
接下来,我们就以“迅捷PDF编辑器”为例子,往下找寻给PDF文件添加数字签名的具体方法步骤吧。
必备工具:迅捷PDF编辑器获取方法:在电脑百度上输入“迅捷PDF编辑器”并搜索,进入软件官网就可以免费获取第一步:在电脑上下载、安装好“迅捷PDF编辑器”后,双击运行该软件。
打开软件后,点击页面左上方的【文件】-【打开】,在弹出来的框中找到需要添加数字签名的PDF文件。
点击框中的【打开】按钮,把PDF文件打开。
第二步:需要添加数字签名的PDF文件在“迅捷PDF编辑器”中打开后,点击页面上方菜单栏处的【文档】。
在【文档】下拉框中找到【数字签名】,点击其中的【放置签名】以创建新的签名域并签名。
●第三步:点击【放置签名】后,点击并拉动鼠标,创建新的签名域。
●第四步:松开鼠标后,会弹出一个签名文档的设置页面。
在这里,完成对数字签名的各项设置。
完成设置后,点击设置页面的【确定】按钮,如此便完成数字签名的设置啦(或者直接点击【数字签名】中的【签名文档】,完成设置)。
第五步:最后,把已经添加数字签名的PDF文件保存起来就可以啦。
看完小编的分享内容,各位小伙伴是否已经知道如何使用“迅捷PDF编辑器”给PDF文件“迅捷PDF编辑器”还有更多其它PDF编辑功能哦。
添加数字签名了呢?除了添加数字签名,对这款软件感兴趣的小伙伴们,记得到软件官网下载、安装下来哦。
PDF签名及数字证书配置详细教程

PDF签名及数字证书配置详细教程数字签名与传统的手写签名一样,必须验证签署文件中签名人身份的真实性。
采用数字签名文件必须确认以下两点:一是文件的确是由签名者签署;二是文件内容自签发后到收到为止未曾作过任何修改。
在Acrobat中,如果需要对某个文档进行数字签名,那签名人必须首先具有一个指定的数字身份,数字身份就像身份证一样,这个数字身份可以自己创建,也可以由可信的第三方供应商提供。
在Acrobat中提供了三种数字证书的创建方法:第一种方法:使用缺省的安全证书方式自行创建数字身份,创建的数字身份文件被存储成后缀为.Pfx文件,在这种方式下,可以选择由密码来保护数字身份文件,这种方式只适合小规模企业,在大的环境中,验证签名的证书交换存在问题;第二种方法:由Windows的安全授权机构提供的数字身份,主要特点是申请管理证书及验证签名比较方便,无需重新投入费用,但只适合在企业内部使用,与其它企业建立相互信任关系比较困难;第三种方法:由可信的数字证书认证中心来提供。
一般官方场合使用的数字身份都是由可信的数字证书认证中心发放的。
数字证书认证中心会发放一个私钥文件 (Sk)和一个数字身份文件。
数字身份文件包含身份拥有者的公共密钥(公钥Pk)、名称,发证机构名称、数字身份证号,以及发证机构的数字签名等信息,但每年的投入费用相当昂贵。
1、申请个人数字证书备注:个人数字证书由公司证书服务器统一颁发,通过域帐号进行申请,要养成离开电脑后锁定计算机的习惯,域密码必须妥善保管,以防止被他人冒用申请证书;证书同样也必须妥善保管,以防被他人盗用;个人数字证书有限期为2年,过期后需要重新申请(Windows XP之后版本的操作系统证书过期后会自动续订更新证书)。
Windows XP之后版本的操作系统通过公司域登录后会自动注册个人数字证书,Windows 2000版本操作系统必须手工申请公司颁发的个人数字证书,查看数字证书是否注册成功,方法如下:打开IE浏览器,在“菜单”->“Internet选项”->“工具”->“内容”点击“证书”如果在个人证书列表中没有你以你域帐号描述的证书,请使用以下方法手工申请证书。
PDF线性化、优化、保护、数字签名好帮手—PLOP

PDF线性化、优化、保护、数字签名好帮⼿—PLOP DS您是不是还在为PDF⽂件的线性化和优化发愁呢?您是不是还在为如何为PDF⽂件的保护和数字签名苦恼呢?如果是,那么请您了解⼀下PDFlib公司的PDFlib PLOP DS吧。
PLOP DS是⼀个基于PDFlib PLOP的多功能⼯具,它可以对PDF⽂档进⾏线性化,优化,修复,分析及加密、解密等操作。
扩展版本的PLOP DS新增了对PDF⽂档进⾏数字签名的功能。
PDF数字签名可以使⽤Adobe Acrobat 及Adobe Reader进⾏验证,⽽不需要额外的校验软件。
PDFlib PLOP DS数字签名技术介绍:由于PDFlib PLOP DS使⽤PDF标准格式的签名,从⽽可以直接通过Adobe Reader或Acrobat验证。
PLOP DS的签名⽀持如下功能:PLOP DS可以从内存、磁盘⽂件或⼀个固定的硬件标识符中,读取签名者的数字ID(即证书和对应的专⽤密匙)。
这个数字ID可以为PDF⽂档⽣成⼀个密码签名。
PLOP DS可以在现有的签名字段中创建签名或是⽣成新的签名字段。
该签名可设置为不可见,也可显⽰在在页⾯中的特定位置。
在Acrobat中,还可以显⽰签名的多个基本属性,例如签名原因,位置,联系信息等。
PLOP DS⽀持Acrobat 9及以下的所有PDF版本。
它可以使签名与加密相结合(⽤户密码,主密码或许可)PLOP使⽤了SHA-1数字签名加密算法来⽣成签名,并⽀持RSA和DSA签名算法,其密匙长度可达4096位。
PDFlib PLOP DS功能亮点:多重加密引擎PLOP DS最⼤程度的⽀持多重加密引擎,即⽣成数字签名的组件:内置的引擎可⽤于所有的平台。
它在PLOP DS中实现了所需的加密功能,⽽不依赖任何的外部设备。
这个内置引擎⽀持基于软件的数字ID,并同时具有PKCS#12和PFX两种证书格式。
在Windows系统中PLOP DS使⽤了Microsoft Cryptographic API (CAPI)作为加密引擎,因此可以使⽤Windows提供的加密基础结构。
pdf签署标准

pdf签署标准
PDF 签署标准是指用于确保数字文档的真实性、完整性和不可否认性的一组规范和要求。
以下是PDF 签署标准的一些基本要求:1. 数字证书:签署PDF 文件需要使用数字证书,数字证书是由证书颁发机构(CA)颁发的电子证书,用于验证签署者的身份和数字签名的有效性。
2. 哈希值:PDF 签署标准要求对文档进行哈希计算,生成唯一的哈希值。
哈希值是一种数字指纹,用于确保文档的完整性。
3. 数字签名:数字签名是一种电子签名,用于证明签署者对文档的认可和同意。
数字签名包括签署者的身份信息、签署日期和时间等。
4. 时间戳:PDF 签署标准要求使用时间戳来记录签署日期和时间。
时间戳是一种数字证明,用于证明签名的时间和日期。
5. 验证:PDF 签署标准要求对数字签名进行验证,以确保签名的有效性和真实性。
验证包括检查数字证书的有效性、哈希值的完整性和数字签名的正确性等。
6. 存储:签署后的PDF 文件需要妥善存储,以确保其安全性和可用性。
存储方式包括本地存储、云端存储等。
PDF 签署标准是一组严格的规范和要求,用于确保数字文档的真实性、完整性和不可否认性。
在使用PDF 签署时,应遵循相关的标准和规范,以确保签署的有效性和可靠性。
密信电子文档全自动数字签名和加密解决方案

密信电子文档全自动数字签名和加密解决方案彻底解决电子文档(电子合同)的可信和安全问题!现状分析1992年Adobe公司正式发布了PDF格式文件并大力推广文档电子化,1999年Adobe Acrobat和Adobe阅读器开始支持数字签名技术,意在推广电子文档的可信化。
根据Adobe官网介绍,英文Electronic Signature(电子签名)是一个泛术语,准确的中文全称应为:电子方式签名,指的是表明接受协议或记录的任何电子过程,典型的电子方式签名常见的身份验证方法是验证电子邮件地址,如果需要提高安全性,则需要使用多因素身份验证。
电子方式签名应该使用安全流程控制来证明签名过程,用户收到的已签名文档应包含签名过程审计报告。
如果用户设置了使用手写签名图样,电子方式签名存在一个无法验证手写签名或图章的图片是否的确是签名者本人的签名或是否的确是该单位的图章的问题。
合同签署各方只能要么相信此签名图片,要么通过其他方式去验证签名图片的真实性。
这是电子方式签名的不足之处。
而英文Digital Signature(数字签名)则是Electronic Signature(电子签名)的一种特定类型,可以说是一种改进型的更加可信的电子方式签名,准确的中文全称应为:数字方式签名,简称:数字签名,以区分电子方式签名。
数字签名是使用数字证书来验证签名者的身份,并通过密码算法将签名者身份绑定到文档中来证明签名行为的不可否认,已签名文档无需包含签名过程审计报告,签名者的身份验证则由证书颁发机构(CA)或信任服务提供商(TSP)完成。
总之,数字签名是一种基于证书的电子签名,符合最严格的法律法规-并为签名者的身份提供最高级别的保证。
目前国外主流的厂商如DocuSign和Adobe Sign都是采用电子方式签名实现合同在线签署,仅验证签署各方电子邮件地址后就可以完成合同签署,但是为了保证签名后的合同电子文件不会被篡改,用户签署完成后再用签名服务平台的PDF签名证书对合同文件进行数字签名。
JavaPDF添加数字签名的实现方法

JavaPDF添加数字签名的实现⽅法经过数字签名的⽂档,能够使作者之外的⼈⽆法对其进⾏修改。
因此,在PDF⽂档中添加数字签名可以保证其安全性和真实性。
同时根据添加内容的差异性,数字签名可分为⽂本数字签名、图⽚数字签名、图⽚及⽂本数字签名。
本⽂将通过Spire.PDF for Java来演⽰如何在PDF⽂档中添加数字签名。
使⽤⼯具:Jar⽂件获取及导⼊:⽅法1:通过获取Jar包。
下载后,解压⽂件,并将lib⽂件夹下的Spire.Pdf.jar⽂件导⼊Java程序。
(如下图)⽅法2:通过maven仓库安装导⼊。
具体安装教程详见此⽹页。
⽰例1:添加⽂本数字签名import com.spire.pdf.PdfDocument;import com.spire.pdf.graphics.PdfTrueTypeFont;import com.spire.pdf.security.GraphicMode;import com.spire.pdf.security.PdfCertificate;import com.spire.pdf.security.PdfCertificationFlags;import com.spire.pdf.security.PdfSignature;import java.awt.*;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;public class TextSignature {public static void main(String[] args) {//加载PDF⽂档PdfDocument doc = new PdfDocument();doc.loadFromFile("C:\\Users\\Test1\\Desktop\\Sample.pdf");//加载pfx证书PdfCertificate cert = new PdfCertificate("C:\\Users\\Test1\\Desktop\\gary.pfx", "abc123");//添加数字签名,设置其位置和⼤⼩PdfSignature signature = new PdfSignature(doc, doc.getPages().get(doc.getPages().getCount()-1), cert, "MySignature");Rectangle2D rect = new Rectangle2D.Float();rect.setFrame(new Point2D.Float((float) doc.getPages().get(0).getActualSize().getWidth() - 270, (float) doc.getPages().get(0).getActualSize().getHeight() - 300), new Dimension(200, 110)); signature.setBounds(rect);//设置签名为⽂本形式signature.setGraphicMode(GraphicMode.Sign_Detail);//设置签名的内容signature.setNameLabel("签字者:");signature.setName("Gary");signature.setContactInfoLabel("联系电话:");signature.setContactInfo("010333555");signature.setDateLabel("⽇期:");signature.setDate(new java.util.Date());signature.setLocationInfoLabel("地点:");signature.setLocationInfo("US");signature.setReasonLabel("原因:");signature.setReason("我是⽂档所有者");signature.setDistinguishedNameLabel("DN: ");signature.setDistinguishedName(signature.getCertificate().get_IssuerName().getName());//设置签名的字体signature.setSignDetailsFont(new PdfTrueTypeFont(new Font("Arial Unicode MS", Font.PLAIN, 11)));//设置⽂档权限为禁⽌更改signature.setDocumentPermissions(PdfCertificationFlags.Forbid_Changes);signature.setCertificated(true);//保存⽂档doc.saveToFile("output/TextSignature.pdf");doc.close();}}⽂本数字签名效果:⽰例2:添加图⽚数字签名import com.spire.pdf.PdfDocument;import com.spire.pdf.graphics.PdfImage;import com.spire.pdf.graphics.PdfTrueTypeFont;import com.spire.pdf.security.GraphicMode;import com.spire.pdf.security.PdfCertificate;import com.spire.pdf.security.PdfCertificationFlags;import com.spire.pdf.security.PdfSignature;import java.awt.*;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;public class ImageSignature {public static void main(String[] args) {//加载PDF⽂档PdfDocument doc = new PdfDocument();doc.loadFromFile("C:\\Users\\Test1\\Desktop\\Sample.pdf");//加载pfx证书PdfCertificate cert = new PdfCertificate("C:\\Users\\Test1\\Desktop\\gary.pfx", "abc123");//添加数字签名,设置其位置和⼤⼩PdfSignature signature = new PdfSignature(doc, doc.getPages().get(doc.getPages().getCount()-1), cert, "MySignature");Rectangle2D rect = new Rectangle2D.Float();rect.setFrame(new Point2D.Float((float) doc.getPages().get(0).getActualSize().getWidth() - 250, (float) doc.getPages().get(0).getActualSize().getHeight() - 300), new Dimension(170, 150)); signature.setBounds(rect);//设置签名为图⽚形式signature.setGraphicMode(GraphicMode.Sign_Image_Only);signature.setSignImageSource(PdfImage.fromFile("C:\\Users\\Test1\\Desktop\\Image.png"));//设置签名的字体signature.setSignDetailsFont(new PdfTrueTypeFont(new Font("Arial Unicode MS", Font.PLAIN, 11)));//设置⽂档权限为禁⽌更改signature.setDocumentPermissions(PdfCertificationFlags.Forbid_Changes);signature.setCertificated(true);//保存⽂档doc.saveToFile("output/ImageSignature.pdf");doc.close();}}图⽚数字签名效果:⽰例3:添加图⽚及⽂本数字签名import com.spire.pdf.PdfDocument;import com.spire.pdf.graphics.*;import com.spire.pdf.security.GraphicMode;import com.spire.pdf.security.PdfCertificate;import com.spire.pdf.security.PdfCertificationFlags;import com.spire.pdf.security.PdfSignature;import java.awt.*;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;public class TextAndImageSignature {public static void main(String[] args) {//加载PDF⽂档PdfDocument doc = new PdfDocument();doc.loadFromFile("C:\\Users\\Test1\\Desktop\\Sample.pdf");//加载pfx证书PdfCertificate cert = new PdfCertificate("C:\\Users\\Test1\\Desktop\\gary.pfx", "abc123");//添加数字签名,设置其位置和⼤⼩PdfSignature signature = new PdfSignature(doc, doc.getPages().get(doc.getPages().getCount()-1), cert, "MySignature");Rectangle2D rect = new Rectangle2D.Float();rect.setFrame(new Point2D.Float((float) doc.getPages().get(0).getActualSize().getWidth() - 350, (float) doc.getPages().get(0).getActualSize().getHeight() - 170), new Dimension(300, 170)); signature.setBounds(rect);//设置签名为图⽚加⽂本模式signature.setGraphicMode(GraphicMode.Sign_Image_And_Sign_Detail);//设置签名的内容signature.setNameLabel("签字者:");signature.setName("Gary");signature.setContactInfoLabel("联系电话:");signature.setContactInfo("010333555");signature.setDateLabel("⽇期:");signature.setDate(new java.util.Date());signature.setLocationInfoLabel("地点:");signature.setLocationInfo("US");signature.setReasonLabel("原因:");signature.setReason("我是⽂档所有者");signature.setDistinguishedNameLabel("DN: ");signature.setDistinguishedName(signature.getCertificate().get_IssuerName().getName());signature.setSignImageSource(PdfImage.fromFile("C:\\Users\\Test1\\Desktop\\Image.png"));//设置签名的字体 signature.setSignDetailsFont(new PdfTrueTypeFont(new Font("Arial Unicode MS", Font.PLAIN, 11)));//设置⽂档权限为禁⽌更改signature.setDocumentPermissions(PdfCertificationFlags.Forbid_Changes);signature.setCertificated(true);//保存⽂档doc.saveToFile("output/TextAndImageSignature.pdf");doc.close();}}图⽚及⽂本数字签名效果:以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。
PDF数字签名解析

公钥基础设施(PKI)
PKI标准化
公钥加密标准PKCS(Public Key Cryptography Standards)
由RSA公司制定,定义了许多基本PKI部件,包括数字签名和证书请求格式等
PKCS系列标准
PKCS是由美国RSA数据安全公司及其合作伙伴制定的一组公钥密码学 标准,其中包括证书申请、证书更新、证书作废表发布、扩展证书内 容以及数字签名、数字信封的格式等方面的一系列相关协议。
PKCS#7
定义一种通用的消息语法,包括数字签名和加密等用于增强的加密机制
公钥基础设施(PKI)
支付宝个人数字证书实例
公钥(public key):可以对任何人公开的密钥,用于加密消息或验证签名。 私钥(private key):只能由用户私存,用于解密消息或签名。
非对称 公开密钥与私有密钥是一对,如果用公开密钥对数据进行加密,只有用对应 的私有密钥才能解密;如果用私有密钥对数据进行加密,那么只有用对应的 公开密钥才能解密。
公钥基础设施(PKI)
数字证书
包含用户标识、用户公钥及其它信息、CA签名,是网络用户的身份证明 ,相当于现实生活中的个人身份证。
证书颁发机构CA
它向用户颁发数字证书,证书中含有用户名、公开密钥以及其他身份信 息,并由证书颁发机构对之进行了数字签名,即证书的拥有者是被证 书机构所信任的。
若信任证书机构 信任证书拥有者
两种行为
1. 对pdf文档进行数字签名 2 . 验证签名是否有效
PDF标准定义的数字签名
签名的标准类型
1. 最多一个认证签名 (certification signature) 2. 一个或多个审批签名(approval signature)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
X X
7
直接数字签名的安全性
• 方案的安全性依赖于发送方X私有密钥的安全 性。
– 发送方可以声称自己的私有密钥丢失或被盗用,而 否认其发送过某个报文。 改进:每个签名报文中包含一个时间戳。 问题: X 的私有密钥确实在时间 T 被窃取; 攻击者窃取 X 的密钥后,则可能发送带有 X 的签 名报文,附上一个等于 T 的时间戳,接受者无法 判别。
• 可分为两类:
– 直接数字签名方案; – 基于仲裁的数字签名方案。
6
9.1.2.1 直接数字签名
• 实现比较简单,在技术上仅涉及到通信的源点 X和终点Y双方。 • 终点Y需要了解源点X的公开密钥 KU • 发送方X可以使用其私有密钥 KR 对整个消息报 文进行加密来生成数字签名。 • 更好的方法是使用 KR 对消息报文的散列码进密钥加密的相互鉴别
• 问题:过期的会话密钥
– X可冒充A,使用过期密钥,并重放第3步的报文, 就可以欺骗B。
•
改进 :
1. 增加时间戳机制 :需要通信各方周期性地与KDC 通信进行时钟校准。 2. 通信时使用现时握手。 3. 1,2结合。
17
基于对称密钥加密的相互鉴别
• 改进后的协议过程 (增加时间戳):
• 目的: KDC 为通信双方A、B产生短期的会话密钥 Ks 。 • 工作过程:
(1) (2) (3) (4) (5) A KDC: KDC A: A B: B A: A B: IDA || IDB || N1 EKa[ Ks || IDB || N1 || EKb (Ks || IDA) ] EKb [ Ks || IDA ] EKs [N2] EKs [ f (N2)]
• 特征:
– DS 的构成:IDx 和消息密文的散列码用 Kax 加密。 – DS 的验证:A 解密签名,用散列码验证消息。
• A 只能验证消息的密文,而不能读取其内容。
– A 将来自 X 的所有信息加上时间戳并用 Kay 加密后发送给Y 。
• 问题:
– A 和发送方 X 联手可以否认签名的信息。 – A和接收方 Y 联手可以伪造发送方 X 的签名。
IDA‖IDB CA‖CB CA‖CB ‖EKUb(EKRa(Ks‖T))
19
基于公开密钥加密的相互鉴别
• 改进(使用现时值N代替时间戳)
(1) A → KDC :IDA‖IDB (2) KDC → A :EKRk ( IDB‖KUb) (3) A → B: EKUb ( Na‖IDA ) (4) B → KDC :IDB‖IDA‖EKUk( Na ) (5) KDC → B: EKRk ( IDA‖KUa)‖EKUb ( EKRk (Na‖Ks‖IDB )) (6) B → A : EKUa( EKRk (Na‖Ks‖IDB )‖Nb ) (7) A → B : EKs ( Nb )
12
基于仲裁的数字签名—公开密钥加密方式
• 特点:仲裁者看不见消息的内容 • 过程:
– X 对报文 M 进行两次加密。 – 经过双重加密后,报文 M 只有 Y 能够阅读,A 不能读取 XA: IDx || EKRx [ IDx || EKUy [ EKRx(M) ] ] – A 能进行外层的解密,从而证实报文确实是来自 X 的
22
9.4 身份认证技术及协议
• 数字签名和鉴别技术的一个最主要的应 用领域就是身份认证。
23
9.4.1 纯认证系统模型
• 认证的基本思想是通过验证称谓者的一个或多个参数的 真实性和有效性,以验证其是否名副其实。 • 身份认证是系统对网络主体进行验证的过程,用户必须 证明他是谁。
24
基本的身份认证方法
26
Kerberos 的设计目标
• 安全性
– 能够有效防止攻击者假扮成另一个合法的授权用户。
• 可靠性
– 分布式服务器体系结构,提供相互备份。
• 对用户透明性 • 可伸缩
– 能够支持大数量的客户和服务器。
27
Kerberos的设计思路(1)
• 基本思路:
– 使用一个(或一组)独立的认证服务器(AS — Authentication Server),来为网络中的客户提供 身份认证服务; – 认证服务器 (AS),用户口令由 AS 保存在数据库中; – AS 与每个服务器共享一个惟一保密密钥(已被安 全分发)。
9
基于仲裁的数字签名--对称密钥加密方式 • 发送方X和仲裁A共享一个密钥Kax 。 • 接收方Y和仲裁A共享一个密钥Kay • 数字签名由X的标识符IDx和报文的散列码H(M) 构成 ,用密钥Kax进行加密。 • 过程:
(1)X → A :M‖ EKax( IDx‖H(M) )。 (2)A → Y :EK ( IDx‖M‖EKax( IDx‖H(M) )‖T )。 (3) Y存储报文M及签名。
29
Kerberos中的票据
• 两种票据
– 服务许可票据(Service granting ticket)
• 是客户访问服务器时需要提供的票据; • 用 TicketV 表示访问应用服务器 V 的票据。 • TicketV 定义为 Ekv [ IDC‖ADC‖IDV‖TS2‖LT2 ]。 • 客户访问 TGS 服务器需要提供的票据,目的是为了申请 某一个应用服务器的 “服务许可票据”; • 票据许可票据由 AS 发放; • 用 Tickettgs 表示访问 TGS 服务器的票据; • Tickettgs 在用户登录时向 AS 申请一次,可多次重复使用; • Tickettgs 定义为 EKtgs [ IDC‖ADC‖IDtgs‖TS1‖LT1 ]。
• 数字签名技术为此提供了一种解决方案。
4
数字签名的功能
• 是对现实生活中笔迹签名的功能模拟。
– 必须能够用来证实签名的作者和签名的时间。
• 对消息进行签名时,必须能够对消息的内容进 行鉴别。 • 签名应具有法律效力,必须能被第三方证实用 以解决争端。 • 必须包含对签名进行鉴别的功能。
5
9.1.2 数字签名的解决方案
– 密钥交换的机密性和时效性。
• 机密性
– 防止会话密钥被篡改或和泄露; – 用户身份信息和会话密钥都必须以密文形式交换; – 前提:通信各方与事先保存一个密钥(共享或公开 密钥)。
• 时效性
– 为了防止消息的重放攻击。
15
9.2.1.1基于对称密钥加密的相互鉴别
• 须具备的条件
– 可信的密钥分配中心(KDC); – 通信各方都与 KDC 共享一个主密钥; – 主密钥 Ka 和 Kb 是安全。
• Y 相信 A 已对消息认证,X 不能否认其签名; • X 信任 A 没有暴露 Kax,无人可伪造 签名; • 双方都信任 A 处理争议是公正。
– 问题:
• 报文 M 明文传送给A ,有可能被窃听。
11
基于仲裁的数字签名--对称密钥加密方式
• 明文加密的方案
– (1)X → A :IDx‖EKxy (M)‖EKax( IDx‖H (EKxy(M)) )。 – (2)A → Y :EKay( IDx‖EKxy (M)‖EKax( IDx‖H (EKxy(M))‖T )。
3
9.1.1 不可否认性的应用需求
• 网络通信中,希望有效防止通信双方的欺骗和 抵赖行为。 • 简单的报文鉴别技术只能使通信免受来自第三 方的攻击,无法防止通信双方之间的互相攻击。
• Y 伪造一个不同的消息,但声称是从 X 收到的; • X可以否认发过该消息,Y 无法证明 X 确实发了 该消息; • 原因:鉴别技术基于秘密共享。
20
9.2.2单向鉴别
• One-Way Authentication。 • 主要用于电子邮件认证等应用。 • 特点:发方和收方无需同时在线。
– 鉴别时收发方不能在线交互。
21
9.3 数字签名标准(DSS)
• 美国国家标准技术研究所(NIST)公布的美 国联邦信息处理标准FIPS PUB 186。 • DSS最早发表于1991年,并于1993年和1996年 进行了修改。 • DSS基于安全散列算法(SHA)并设计了一种 新的数字签名技术,即DSA(数字签名算法)。
28
Kerberos的设计思路 (2)
• 问题:
– 用户希望输入口令的次数最少。 – 口令以明文传送会被窃听。
• 解决办法
– 票据重用(ticket reusable)。 – 引入票据许可服务器(TGS - ticket-granting server)
• 用于向用户分发服务器的访问票据; • 认证服务器 AS 并不直接向客户发放访问应用服务器的票 据,而是由 TGS 服务器来向客户发放。
其中,C 本地时间, t1 时钟偏差, t2 网络时延。
18
9.2.1.2 基于公开密钥加密的相互鉴别
• 过程
(1) A → AS : (2) AS → A : (3) A → B : 其中:
A 的公钥和私钥分别为 KUa 和 KRa ; B 的公钥和私钥分别为 KUb 和 KRb ; AS(鉴别中心) 的公钥和私钥分别为 KUas 和 KRas ; CA = EKRas(IDA‖KUa‖T),A 的公开密钥证书; CB = EKRas(IDB‖KUb‖T),B 的公开密钥证书。
– 用于 PPP(点对点)协议的身份认证协议,明文口令传输。
• CHAP 协议(Challenge Handshake Authentication Protocol)
– 不在网络上传送口令信息, 比 PAP 具有更强的安全性。
25
身份认证协议 —— Kerberos
• 是美国麻省理工学院(MIT)开发的一种身份鉴 别服务。 • “Kerberos”的本意是希腊神话中守护地狱之门的 守护者。 • Kerberos提供了一个集中式的认证服务器结构, 认证服务器的功能是实现用户与其访问的服务器 间的相互鉴别。 • Kerberos建立的是一个实现身份认证的框架结构。 • 其实现采用的是对称密钥加密技术,而未采用公 开密钥加密。 • 公开发布的Kerberos版本包括版本4和版本5。