CN115378609A - Electronic certificate display method, verification method, terminal and server - Google Patents
Electronic certificate display method, verification method, terminal and server Download PDFInfo
- Publication number
- CN115378609A CN115378609A CN202210999984.3A CN202210999984A CN115378609A CN 115378609 A CN115378609 A CN 115378609A CN 202210999984 A CN202210999984 A CN 202210999984A CN 115378609 A CN115378609 A CN 115378609A
- Authority
- CN
- China
- Prior art keywords
- user
- digital signature
- information
- certificate
- result
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K17/00—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
- G06K17/0022—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
- G06K17/0029—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device the arrangement being specially adapted for wireless interrogation of grouped or bundled articles tagged with wireless record carriers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3263—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/72—Signcrypting, i.e. digital signing and encrypting simultaneously
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本申请实施例提供了一种电子证件展示方法、核验方法、终端及服务器,涉及电子证件技术领域。该方法包括:响应于用户的电子证件出示操作,向服务器发送信息获取请求,指示服务器获取用户的用户信息,返回用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书签名对用户信息和数字签名时间签名生成的;接收并解密加密结果,获得用户信息、数字签名结果和数字签名时间;根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件。本申请实施例可以生成动态安全的电子证件,防止被拍照、拷贝冒用,基于密码技术对证件信息保护,防止被篡改,且无需专用核验设备。
Embodiments of the present application provide an electronic certificate display method, a verification method, a terminal, and a server, and relate to the technical field of electronic certificates. The method includes: in response to the user's electronic certificate presentation operation, sending an information acquisition request to the server, instructing the server to obtain the user's user information, and returning the user information, digital signature result and encryption result generated by the digital signature time. The digital signature result is obtained by the server according to Institutional digital certificate signature generates user information and digital signature time signature; receives and decrypts the encrypted result, obtains user information, digital signature result and digital signature time; generates and digital signature result, digital signature time according to the preset QR code template The QR code corresponding to the user ID generates and displays the electronic certificate. The embodiment of the present application can generate a dynamic and secure electronic certificate, prevent it from being photographed and copied, protect the certificate information based on cryptographic technology, and prevent it from being tampered with, and does not require special verification equipment.
Description
技术领域technical field
本申请涉及电子证件技术领域,具体而言,本申请涉及一种电子证件展示方法、核验方法、终端、服务器、电子设备及计算机可读存储介质。The present application relates to the technical field of electronic certificates. Specifically, the present application relates to an electronic certificate display method, a verification method, a terminal, a server, an electronic device, and a computer-readable storage medium.
背景技术Background technique
随着移动互联网的普及,越来越多的业务迁移到移动端,逐步实现电子化、数字化,用户仅需要通过联网的移动终端就可以完成业务操作,给用户带来极大的便利。证件电子化技术也不断发展,常见的证件电子化技术有:图片、版式文件、版式文件结合数字签名以及录入生物特征,以上方式均属于静态的电子证件,具有易被恶意篡改、难以辨认真伪、拷贝冒用的风险,部分电子证件核验时只能使用专用的硬件设备进行在线核验,另一部分通过生物特核验时受角度、光照等因素影响,核验失败几率较高。With the popularization of the mobile Internet, more and more services are migrated to the mobile terminal, gradually realizing electronic and digitalization. Users only need to complete business operations through networked mobile terminals, which brings great convenience to users. Electronic certificate technology is also developing continuously. Common electronic certificate technologies include: pictures, format files, format files combined with digital signatures and biometric entry. The above methods are all static electronic certificates, which are easy to be maliciously tampered with and difficult to identify authenticity. , The risk of copying and fraudulent use, some electronic certificates can only be verified online with dedicated hardware equipment, and the other part is affected by factors such as angles and lighting when passing biometric verification, and the probability of verification failure is high.
发明内容Contents of the invention
本申请实施例提供了一种电子证件展示方法、核验方法、终端、服务器、电子设备及计算机可读存储介质,可以解决上述问题。技术方案如下:Embodiments of the present application provide an electronic certificate display method, a verification method, a terminal, a server, an electronic device, and a computer-readable storage medium, which can solve the above problems. The technical solution is as follows:
根据本申请实施例的一个方面,提供了一种电子证件展示方法,应用于第一终端,该方法包括:According to an aspect of an embodiment of the present application, there is provided a method for presenting an electronic certificate, which is applied to a first terminal, and the method includes:
响应于第一用户的电子证件出示操作,向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识,以指示服务器执行以下操作:In response to the operation of presenting the electronic certificate of the first user, an information acquisition request is sent to the server, and the information acquisition request includes the user identification of the first user to instruct the server to perform the following operations:
根据用户标识获取第一用户的用户信息,以及返回通过个人数字证书加密用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书对用户信息和数字签名时间签名后生成的,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;Obtain the user information of the first user according to the user ID, and return the encryption result generated by encrypting the user information, digital signature result and digital signature time through the personal digital certificate. The digital signature result is that the server signs the user information and digital signature time according to the organization's digital certificate Generated later, the digital signature time is the time when the user information and digital signature time are signed according to the organization's digital certificate;
接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名结果和数字签名时间;Receive the encrypted result returned by the server, decrypt the encrypted result according to the personal digital certificate, and obtain user information, digital signature result and digital signature time;
根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。Generate a QR code corresponding to the digital signature result, digital signature time and user identification according to the preset QR code template, generate and display an electronic certificate, and the electronic certificate includes user information and a QR code.
作为一种可选实施例,响应于第一用户的电子证件出示操作,之前还包括:As an optional embodiment, in response to the operation of presenting the electronic certificate of the first user, the method also includes:
响应于第一用户的注册操作,将第一用户的基本信息传送至服务器,以指示服务器执行以下操作:In response to the registration operation of the first user, the basic information of the first user is transmitted to the server, so as to instruct the server to perform the following operations:
从预设的数据库中获取并生成第一用户的实体证件信息,将基本信息与实体证件信息作为用户信息并确定第一用户的用户标识、建立用户标识与用户信息间的对应关系以及将用户标识返回第一终端。Obtain and generate the first user’s physical certificate information from the preset database, use the basic information and physical certificate information as user information, determine the first user’s user ID, establish the correspondence between the user ID and user information, and store the user ID Return to the first terminal.
根据本申请实施例的第二个方面,提供了一种电子证件核验方法,应用于第二终端,包括:According to the second aspect of the embodiments of the present application, there is provided an electronic certificate verification method applied to a second terminal, including:
扫描并解析第一终端的待核验的电子证件中的二维码,获得待核验的数字签名结果、数字签名时间和用户标识;Scanning and analyzing the QR code in the electronic certificate to be verified by the first terminal to obtain the digital signature result to be verified, digital signature time and user identification;
向服务器发送核验请求,核验请求包括数字签名结果、数字签名时间和用户标识,以指示服务器查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并返回核验结果;Send a verification request to the server, the verification request includes the digital signature result, digital signature time and user ID, to instruct the server to query the user information corresponding to the user ID, verify and return according to the digital signature result, digital signature time and the queried user information verification results;
接收并展示核验结果。Receive and display verification results.
根据本申请实施例的第三个方面,提供了一种信息处理方法,应用于服务器,包括:According to a third aspect of the embodiments of the present application, there is provided an information processing method applied to a server, including:
接收第一终端响应于第一用户的电子证件出示操作发送的信息获取请求,信息获取请求中包括第一用户的用户标识;receiving an information acquisition request sent by the first terminal in response to the first user's electronic certificate presentation operation, where the information acquisition request includes the user identification of the first user;
根据用户标识获取第一用户的用户信息,根据机构数字证书对用户信息和数字签名时间签名后生成数字签名结果,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;Obtain the user information of the first user according to the user identification, and generate a digital signature result after signing the user information and the digital signature time according to the organization's digital certificate, and the digital signature time is the time when the user information and the digital signature time are signed according to the organization's digital certificate;
通过个人数字证书加密用户信息、数字签名结果和数字签名时间,生成加密结果;Encrypt user information, digital signature results and digital signature time through personal digital certificates to generate encrypted results;
将加密结果返回第一终端。return the encryption result to the first terminal.
作为一种可选实施例,接收第一终端发送信息获取请求,之前还包括:As an optional embodiment, before receiving the information acquisition request sent by the first terminal, it also includes:
响应于第一用户的注册操作,接收第一终端发送的第一用户的基本信息,根据第一用户的基本信息从预设的数据库中获取并生成第一用户的实体证件信息;Responding to the registration operation of the first user, receiving the basic information of the first user sent by the first terminal, acquiring and generating the physical certificate information of the first user from a preset database according to the basic information of the first user;
将基本信息与实体证件信息作为用户信息,确定第一用户的用户标识;Using basic information and physical certificate information as user information to determine the user identification of the first user;
建立用户标识与用户信息间的对应关系,将用户标识返回第一终端。A corresponding relationship between the user identifier and the user information is established, and the user identifier is returned to the first terminal.
作为一种可选实施例,接收第二终端发送的核验请求,核验请求包括数字签名结果、数字签名时间和用户标识;As an optional embodiment, the verification request sent by the second terminal is received, and the verification request includes a digital signature result, a digital signature time and a user identifier;
根据用户标识查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并将核验结果返回至第二终端;Querying the user information corresponding to the user ID according to the user ID, performing verification according to the digital signature result, the digital signature time and the queried user information, and returning the verification result to the second terminal;
其中,若确定第一用户的用户信息真实有效且数字签名结果验证通过,则核验结果为核验成功;Wherein, if it is determined that the user information of the first user is authentic and valid and the digital signature result is verified, the verification result is a verification success;
其中,核验请求是第二终端扫描并解析待核验的电子证件中的二维码后发送的。Wherein, the verification request is sent by the second terminal after scanning and analyzing the two-dimensional code in the electronic certificate to be verified.
根据本申请实施例的第四个方面,提供了一种第一终端,包括:According to a fourth aspect of the embodiments of the present application, a first terminal is provided, including:
获取模块,用于响应于第一用户的电子证件出示操作,向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识,以指示服务器执行以下操作:The acquisition module is configured to send an information acquisition request to the server in response to the first user's electronic certificate presentation operation, and the information acquisition request includes the user identification of the first user to instruct the server to perform the following operations:
根据用户标识获取第一用户的用户信息,以及返回通过个人数字证书加密用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书对用户信息和数字签名时间签名后生成的,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;Obtain the user information of the first user according to the user ID, and return the encryption result generated by encrypting the user information, digital signature result and digital signature time through the personal digital certificate. The digital signature result is that the server signs the user information and digital signature time according to the organization's digital certificate Generated later, the digital signature time is the time when the user information and digital signature time are signed according to the organization's digital certificate;
接收模块,用于接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名结果和数字签名时间;The receiving module is used to receive the encrypted result returned by the server, decrypt the encrypted result according to the personal digital certificate, and obtain user information, digital signature result and digital signature time;
展示模块,用于根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。The display module is used to generate a two-dimensional code corresponding to the digital signature result, digital signature time and user identification according to the preset two-dimensional code template, generate and display an electronic certificate, and the electronic certificate includes user information and a two-dimensional code.
作为一种可选实施例,响应于第一用户的电子证件出示操作,之前还包括:As an optional embodiment, in response to the operation of presenting the electronic certificate of the first user, the method also includes:
注册发起模块,用于响应于第一用户的注册操作,将第一用户的基本信息传送至服务器,以指示服务器执行以下操作:The registration initiating module is configured to transmit the basic information of the first user to the server in response to the registration operation of the first user, so as to instruct the server to perform the following operations:
从预设的数据库中获取并生成第一用户的实体证件信息,将基本信息与实体证件信息作为用户信息并确定第一用户的用户标识、建立用户标识与用户信息间的对应关系以及将用户标识返回第一终端。Obtain and generate the first user’s physical certificate information from the preset database, use the basic information and physical certificate information as user information, determine the first user’s user ID, establish the correspondence between the user ID and user information, and store the user ID Return to the first terminal.
根据本申请实施例的第五个方面,提供了一种第二终端,包括:According to a fifth aspect of the embodiments of the present application, a second terminal is provided, including:
扫描解析模块,用于扫描并解析第一终端的待核验的电子证件中的二维码,获得待核验的数字签名结果、数字签名时间和用户标识;The scanning analysis module is used to scan and analyze the two-dimensional code in the electronic certificate to be verified of the first terminal, and obtain the digital signature result to be verified, the digital signature time and the user identification;
请求发送模块,用于向服务器发送核验请求,核验请求包括数字签名结果、数字签名时间和用户标识,以指示服务器查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并返回核验结果;The request sending module is used to send a verification request to the server. The verification request includes a digital signature result, a digital signature time and a user ID to instruct the server to query the user information corresponding to the user ID. According to the digital signature result, the digital signature time and the queried Verify the user information and return the verification result;
接收展示模块,用于接收并展示核验结果。The receiving display module is used to receive and display the verification results.
根据本申请实施例的第六个方面,提供了一种服务器,包括:According to a sixth aspect of the embodiments of the present application, a server is provided, including:
请求接收模块,用于接收第一终端响应于第一用户的电子证件出示操作发送的信息获取请求,信息获取请求中包括第一用户的用户标识;A request receiving module, configured to receive an information acquisition request sent by the first terminal in response to the first user's electronic certificate presentation operation, where the information acquisition request includes the user identification of the first user;
签名运算模块,用于根据用户标识获取第一用户的用户信息,根据机构数字证书对用户信息和数字签名时间签名后生成数字签名结果,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;The signature calculation module is used to obtain the user information of the first user according to the user identification, and generate a digital signature result after signing the user information and digital signature time according to the organization's digital certificate, and the digital signature time is the user information and digital signature time according to the organization's digital certificate the time the signature was made;
加密模块,用于通过个人数字证书加密用户信息、数字签名结果和数字签名时间,生成加密结果;The encryption module is used to encrypt user information, digital signature results and digital signature time through personal digital certificates to generate encrypted results;
发送模块,用于将加密结果返回第一终端。A sending module, configured to return the encryption result to the first terminal.
作为一种可选实施例,接收第一终端发送信息获取请求,之前还包括:As an optional embodiment, before receiving the information acquisition request sent by the first terminal, it also includes:
信息获取模块,用于响应于第一用户的注册操作,接收第一终端发送的第一用户的基本信息,根据第一用户的基本信息从预设的数据库中获取并生成第一用户的实体证件信息;The information acquisition module is configured to receive the basic information of the first user sent by the first terminal in response to the registration operation of the first user, and obtain and generate the physical certificate of the first user from a preset database according to the basic information of the first user information;
信息处理模块,用于将基本信息与实体证件信息作为用户信息,确定第一用户的用户标识;An information processing module, configured to use basic information and entity certificate information as user information to determine the user identifier of the first user;
关系建立模块,用于建立用户标识与用户信息间的对应关系,将用户标识返回第一终端。The relationship establishing module is configured to establish a corresponding relationship between the user identifier and the user information, and return the user identifier to the first terminal.
作为一种可选实施例,还包括:As an optional embodiment, it also includes:
核验请求接收模块,用于接收第二终端发送的核验请求,核验请求包括数字签名结果、数字签名时间和用户标识;A verification request receiving module, configured to receive a verification request sent by the second terminal, where the verification request includes a digital signature result, a digital signature time and a user ID;
信息核验模块,用于根据用户标识查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并将核验结果返回至第二终端;The information verification module is used to query the user information corresponding to the user identification according to the user identification, perform verification according to the digital signature result, the digital signature time and the queried user information, and return the verification result to the second terminal;
其中,若确定第一用户的用户信息真实有效且数字签名结果验证通过,则核验结果为核验成功;Wherein, if it is determined that the user information of the first user is authentic and valid and the digital signature result is verified, the verification result is a verification success;
其中,核验请求是第二终端扫描并解析待核验的电子证件中的二维码后发送的。Wherein, the verification request is sent by the second terminal after scanning and analyzing the two-dimensional code in the electronic certificate to be verified.
根据本申请实施例的第七个方面,提供了一种电子设备,该电子设备包括:存储器、处理器及存储在存储器上的计算机程序,处理器执行计算机程序以实现上述任一方面方法的步骤。According to a seventh aspect of the embodiments of the present application, there is provided an electronic device, the electronic device includes: a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement the steps of any one of the methods described above .
根据本申请实施例的第八个方面,提供了一种计算机可读存储介质,一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述任一方面方法的步骤。According to an eighth aspect of the embodiments of the present application, there is provided a computer-readable storage medium, a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method of any one of the above-mentioned aspects is implemented. step.
本申请实施例提供的技术方案带来的有益效果是:响应于第一用户的电子证件出示操作,向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识,以指示服务器根据用户标识获取第一用户的用户信息,以及返回通过个人数字证书加密用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书对用户信息和数字签名时间签名后生成的;接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名结果和数字签名时间;根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。实现了终端、服务器合作生成一张安全的、动态的电子证件,防止被拍照、拷贝冒用,在证件核验时,无需使用专用设备,仅需在通用的移动设备上安装APP,通过扫码方式安全的完成基于密码的身份信息验证。The beneficial effect of the technical solution provided by the embodiment of the present application is: in response to the first user’s electronic certificate presentation operation, an information acquisition request is sent to the server, and the information acquisition request includes the user identification of the first user to instruct the server to Identify and obtain the user information of the first user, and return the encryption result generated by encrypting the user information, digital signature result and digital signature time through the personal digital certificate. The digital signature result is generated after the server signs the user information and digital signature time according to the organization's digital certificate Receive the encrypted result returned by the server, decrypt the encrypted result according to the personal digital certificate, and obtain user information, digital signature result and digital signature time; generate and digital signature result, digital signature time and user information according to the preset QR code template Identify the corresponding QR code, generate and display an electronic certificate, which includes user information and a QR code. It realizes the cooperation between the terminal and the server to generate a safe and dynamic electronic certificate, which prevents it from being photographed or copied for fraudulent use. When verifying the certificate, it is not necessary to use special equipment. It is only necessary to install the APP on the general mobile device and scan the code. Securely complete password-based authentication of identity information.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings that need to be used in the description of the embodiments of the present application.
图1为本申请实施例提供的实现电子证件出示及核验的系统架构示意图;Figure 1 is a schematic diagram of the system architecture for realizing electronic certificate presentation and verification provided by the embodiment of the present application;
图2为本申请实施例提供的一种电子证件展示方法的流程示意图;FIG. 2 is a schematic flowchart of a method for displaying an electronic certificate provided in an embodiment of the present application;
图3为本申请实施例提供的一种电子证件核验方法的流程示意图;FIG. 3 is a schematic flow diagram of an electronic certificate verification method provided in an embodiment of the present application;
图4为本申请实施例提供的一种信息处理方法的流程的示意图;FIG. 4 is a schematic diagram of a flow of an information processing method provided in an embodiment of the present application;
图5为本申请实施例提供的一种第一用户从注册到电子证件出示的流程图;Fig. 5 is a flow chart of a first user from registration to electronic certificate presentation provided by the embodiment of this application;
图6为本申请实施例提供的一种第一终端的结构示意图;FIG. 6 is a schematic structural diagram of a first terminal provided in an embodiment of the present application;
图7为本申请实施例提供的一种第二终端的结构示意图;FIG. 7 is a schematic structural diagram of a second terminal provided in an embodiment of the present application;
图8为本申请实施例提供的一种服务器的结构示意图;FIG. 8 is a schematic structural diagram of a server provided by an embodiment of the present application;
图9为本申请实施例提供的一种电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请中的附图描述本申请的实施例。应理解,下面结合附图所阐述的实施方式,是用于解释本申请实施例的技术方案的示例性描述,对本申请实施例的技术方案不构成限制。Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the implementation manner described below in conjunction with the accompanying drawings is an exemplary description for explaining the technical solutions of the embodiments of the present application, and does not limit the technical solutions of the embodiments of the present application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”和“该”也可包括复数形式。应该进一步理解的是,本申请实施例所使用的术语“包括”以及“包含”是指相应特征可以实现为所呈现的特征、信息、数据、步骤、操作、元件和/或组件,但不排除实现为本技术领域所支持其他特征、信息、数据、步骤、操作、元件、组件和/或它们的组合等。应该理解,当我们称一个元件被“连接”或“耦接”到另一元件时,该一个元件可以直接连接或耦接到另一元件,也可以指该一个元件和另一元件通过中间元件建立连接关系。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的术语“和/或”指示该术语所限定的项目中的至少一个,例如“A和/或B”可以实现为“A”,或者实现为“B”,或者实现为“A和B”。Those skilled in the art will understand that the singular forms "a", "an" and "the" used herein may also include plural forms unless otherwise stated. It should be further understood that the terms "comprising" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and/or components, but do not exclude The realization is other features, information, data, steps, operations, elements, components and/or their combinations etc. supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and another element pass through intermediate elements. Establish a connection relationship. Additionally, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The term "and/or" used herein indicates at least one of the items defined by the term, for example, "A and/or B" can be implemented as "A", or as "B", or as "A and B ".
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.
本申请提供的一种电子证件展示方法、核验方法、终端、服务器、电子设备及计算机可读存储介质,旨在解决现有技术的如上技术问题。The present application provides an electronic certificate display method, a verification method, a terminal, a server, an electronic device, and a computer-readable storage medium, aiming to solve the above technical problems in the prior art.
下面通过对几个示例性实施方式的描述,对本申请实施例的技术方案以及本申请的技术方案产生的技术效果进行说明。需要指出的是,下述实施方式之间可以相互参考、借鉴或结合,对于不同实施方式中相同的术语、相似的特征以及相似的实施步骤等,不再重复描述。The following describes the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application by describing several exemplary implementations. It should be pointed out that the following embodiments may refer to, learn from or combine with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be described repeatedly.
图1为本申请实施例提供的实现电子证件的展示、核验的系统架构示意图,该系统包括第一终端110、第二终端120和服务器130。FIG. 1 is a schematic diagram of a system architecture for displaying and verifying electronic certificates provided by an embodiment of the present application. The system includes a
第一终端110安装和运行电子证件亮证程序111,当第一终端110运行应用程序111时,第一终端110的屏幕上可以显示电子证件亮证程序111的注册界面、登录界面和用户界面等。The
第一终端110是第一用户使用的终端,电子证件亮证程序111可以响应于第一用户的注册操作,将第一用户的信息存储到服务器130并申请个人数字证书;可以向服务器发130送身份认证运算请求;可以根据第一用户的出示操作,向服务器130发送信息获取请求,在获得信息并进行处理后,第一终端110的屏幕上可以显示电子证件亮证程序111中的电子证件界面。The
第二终端120安装和运行电子证件核验程序112,当第二终端120运行电子证件核验程序112时,第二终端120的屏幕上可以显示电子证件核验程序112的核验界面。The
第二终端120是第二用户使用的终端,电子证件核验程序112可以响应于用户的核验操作,扫描电子证件二维码,获得用户信息,并向服务器130发送核验请求,接收核验结果并显示在界面。The
可选地,第一终端110、第二终端120的设备类型包括:智能手机、平板电脑等任意Android、iOS的设备。Optionally, the device types of the
图1中仅示出了两个终端,但在不同实施例中存在多个其它终端可以接入服务器130。可选地,还存在一个或多个终端是开发者对应的终端,在该终端上安装应用程序的开发和编辑平台,开发者可在该终端上对应用程序进行编辑和更新,并将更新后的应用程序安装包通过有线或无线网络传输至服务器130,第一终端110、第二终端120可从服务器130下载应用程序安装包实现对应用程序的更新。Only two terminals are shown in FIG. 1 , but there are many other terminals that can access the server 130 in different embodiments. Optionally, there are also one or more terminals corresponding to the developer, on which the application development and editing platform is installed, and the developer can edit and update the application on the terminal, and the updated The application installation package is transmitted to the server 130 through a wired or wireless network, and the
服务器130可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。The server 130 can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, and can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, Cloud servers for basic cloud computing services such as middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
本申请实施例中提供了一种电子证件展示的方法,如图2所示,该方法包括:An embodiment of the present application provides a method for displaying an electronic certificate, as shown in Figure 2, the method includes:
S101、响应于第一用户的电子证件出示操作,向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识,以指示服务器执行以下操作:S101. In response to the first user's electronic certificate presentation operation, send an information acquisition request to the server, where the information acquisition request includes the user identification of the first user, so as to instruct the server to perform the following operations:
根据用户标识获取第一用户的用户信息,以及返回通过个人数字证书加密用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书对用户信息和数字签名时间签名后生成的,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;Obtain the user information of the first user according to the user ID, and return the encryption result generated by encrypting the user information, digital signature result and digital signature time through the personal digital certificate. The digital signature result is that the server signs the user information and digital signature time according to the organization's digital certificate Generated later, the digital signature time is the time when the user information and digital signature time are signed according to the organization's digital certificate;
在本申请实施例中,第一用户选择电子证件出示功能后,第一终端基于SSL数据安全传输通道向服务器发送信息获取请求,其中,信息获取请求中包括第一用户对应的用户标识,服务器基于SSL数据安全传输通道获得信息获取请求和第一用户对应的用户标识后,根据第一用户对应的用户标识获取对应的第一用户的用户信息,例如当用户张三选择电子证件出示功能后,第一终端基于SSL数据安全传输通道向服务器发送信息获取请求以及该请求中包含的张三的用户标识“123”,服务器在基于SSL数据安全传输通道接收该信息后,根据用户标识“123”,查找到张三的姓名、电话号、身份证件号等用户信息。In this embodiment of the application, after the first user selects the electronic certificate presentation function, the first terminal sends an information acquisition request to the server based on the SSL data secure transmission channel, wherein the information acquisition request includes the user identification corresponding to the first user, and the server based on After the SSL data secure transmission channel obtains the information acquisition request and the user ID corresponding to the first user, the user information of the corresponding first user is obtained according to the user ID corresponding to the first user. For example, when user Zhang San selects the electronic certificate presentation function, the second A terminal sends an information acquisition request to the server based on the SSL data secure transmission channel and Zhang San's user ID "123" included in the request. After receiving the information based on the SSL data secure transmission channel, the server searches for the information based on the user ID "123". Get Zhang San's name, phone number, ID number and other user information.
服务器使用机构数字证书对该用户信息和数字签名时间进行数字签名运算生成数字签名结果,然后使用个人数字证书对上述第一用户的用户信息、数字签名结果和数字签名时间进行加密处理,生成加密结果后,将加密结果发送回第一终端。The server uses an organization digital certificate to perform digital signature operations on the user information and digital signature time to generate a digital signature result, and then uses a personal digital certificate to encrypt the user information, digital signature result and digital signature time of the above-mentioned first user to generate an encrypted result After that, the encryption result is sent back to the first terminal.
S102、接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名结果和数字签名时间;S102. Receive the encrypted result returned by the server, decrypt the encrypted result according to the personal digital certificate, and obtain user information, digital signature result and digital signature time;
第一终端基于SSL数据安全传输通道接收上述S101步骤中得到的加密结果,并且使用个人数字证书对加密结果进行解密运算,得到第一用户的用户信息、数字签名结果等明文数据;其中,用户信息包括用户可信身份、还可以包括电子证件状态,用户可信身份包括基本信息和实体证件信息,例如获得张三的姓名、电话号、身份证件号等信息。The first terminal receives the encryption result obtained in the above step S101 based on the SSL data secure transmission channel, and uses a personal digital certificate to perform decryption operation on the encryption result to obtain the first user's user information, digital signature results and other plaintext data; wherein, the user information It includes the user's trusted identity, and can also include the status of the electronic certificate. The user's trusted identity includes basic information and physical certificate information, such as obtaining Zhang San's name, phone number, ID number and other information.
S103、根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。S103. Generate a QR code corresponding to the digital signature result, digital signature time and user ID according to the preset QR code template, generate and display an electronic certificate, the electronic certificate includes user information and a QR code.
根据预设的二维码模板,根据数字签名结果、数字签名时间和用户标识动态实时生成电子证件二维码,并且将用户可信身份、电子证件状态,电子证件二维码数据进行组装,最终显示完整的电子证件。According to the preset QR code template, according to the digital signature result, digital signature time and user identification, the QR code of the electronic certificate is dynamically generated in real time, and the user's trusted identity, status of the electronic certificate, and the data of the QR code of the electronic certificate are assembled, and finally Show full electronic certificate.
即本申请中电子证件包括用户信息、电子证件二维码;电子证件二维码中包括用户标识、数字签名结果以及数字签名时间,在出示阶段动态实时生成。其中数字签名时间为服务器根据机构数字证书对所属用户信息、数字签名时间进行签名时的时间。That is, in this application, the electronic certificate includes user information and the QR code of the electronic certificate; the QR code of the electronic certificate includes the user identification, digital signature result and digital signature time, which are dynamically generated in real time during the presentation stage. The digital signature time is the time when the server signs the user information and digital signature time according to the organization's digital certificate.
本申请的实施例中电子证件的用户信息涵盖的内容包括但不限于:基本信息,实体证件信息以及电子证件状态。其中基本信息涵盖的内容包括但不限于:姓名,手机号码,身份证号码,本人近期免冠证件照等;实体证件信息涵盖的内容包括但不限于:证件颁发机构,证件类型,证件号码,证件有效期等;电子证件状态为电子证件的当前状态,例如可以是正常、过期、冻结、注销等。The content covered by the user information of the electronic certificate in the embodiment of this application includes but not limited to: basic information, physical certificate information and electronic certificate status. The content covered by the basic information includes but is not limited to: name, mobile phone number, ID card number, recent passport photo of the person without a hat, etc.; the content covered by the physical certificate information includes but not limited to: certificate issuing agency, certificate type, certificate number, certificate validity period etc.; the status of the electronic certificate is the current status of the electronic certificate, for example, it can be normal, expired, frozen, cancelled, etc.
本申请实施例通过响应于第一用户的电子证件出示操作,向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识,以指示服务器根据用户标识获取第一用户的用户信息,以及返回通过个人数字证书加密用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书对用户信息和数字签名时间签名后生成的;接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名结果和数字签名时间;根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。实现了终端、服务器合作生成一张安全的、动态的电子证件,防止被拍照、拷贝冒用,在证件核验时,无需使用专用设备,仅需在通用的移动设备上安装APP,通过扫码方式安全的完成基于密码的身份信息验证。In this embodiment of the present application, an information acquisition request is sent to the server in response to the operation of presenting the electronic certificate of the first user, and the information acquisition request includes the user identification of the first user to instruct the server to obtain the user information of the first user according to the user identification, and Returns the encryption result generated by encrypting user information, digital signature result and digital signature time through the personal digital certificate. The digital signature result is generated by the server after signing the user information and digital signature time according to the organization's digital certificate; receiving the encrypted result returned by the server, according to The personal digital certificate decrypts the encrypted result, obtains user information, digital signature result and digital signature time; generates and displays the QR code corresponding to the digital signature result, digital signature time and user ID according to the preset QR code template Electronic certificates, electronic certificates include user information and QR codes. It realizes the cooperation between the terminal and the server to generate a safe and dynamic electronic certificate, which prevents it from being photographed or copied for fraudulent use. When verifying the certificate, it is not necessary to use special equipment. It is only necessary to install the APP on the general mobile device and scan the code. Securely complete password-based authentication of identity information.
在上述各实施例的基础上,作为一种可选实施例,响应于第一用户的电子证件出示操作,之前还包括:On the basis of the above-mentioned embodiments, as an optional embodiment, in response to the operation of presenting the electronic certificate of the first user, the previous steps also include:
注册发起模块,用于响应于第一用户的注册操作,将第一用户的基本信息传送至服务器,以指示服务器执行以下操作:The registration initiating module is configured to transmit the basic information of the first user to the server in response to the registration operation of the first user, so as to instruct the server to perform the following operations:
从预设的数据库中获取并生成第一用户的实体证件信息,将基本信息与实体证件信息作为用户信息并确定第一用户的用户标识、建立用户标识与用户信息间的对应关系以及将用户标识返回第一终端。Obtain and generate the first user’s physical certificate information from the preset database, use the basic information and physical certificate information as user information, determine the first user’s user ID, establish the correspondence between the user ID and user information, and store the user ID Return to the first terminal.
在本申请实施例中,第一用户想要生成电子证件,需要先进行用户注册,用户将基本信息和实体证件信息发送给服务器,服务器将接收到的基本信息和实体证件信息作为用户可信身份,本申请实施例中用户信息可包括用户可信身份、电子证件状态;In the embodiment of this application, if the first user wants to generate an electronic certificate, he needs to register as a user first, and the user sends the basic information and physical certificate information to the server, and the server takes the received basic information and physical certificate information as the user's trusted identity , the user information in this embodiment of the application may include the trusted identity of the user and the status of the electronic certificate;
生成该用户的用户标识,并建立用户标识和用户信息间的对应关系,然后把创建出的用户标识发送给第一终端。A user ID of the user is generated, and a corresponding relationship between the user ID and user information is established, and then the created user ID is sent to the first terminal.
在上述各实施例的基础上,作为一种可选实施例,响应于第一用户的电子证件出示操作,之前还包括:On the basis of the above-mentioned embodiments, as an optional embodiment, in response to the operation of presenting the electronic certificate of the first user, the previous steps also include:
响应于注册操作完成,展示弹窗,弹窗中包括待填写的输入框;In response to the completion of the registration operation, a pop-up window is displayed, and the pop-up window includes an input box to be filled;
响应于针对输入框的输入操作,根据输入的加密信息生成PIN口令;In response to the input operation for the input box, generate a PIN password according to the input encrypted information;
本申请实施例中,用户在输入基本信息、实体证件信息后,可以根据第一终端弹出的弹窗设置符合规范的PIN口令,PIN口令可作为用户后续成功登录的条件之一,之后第一终端向服务器发送数字证书申请,并获得服务器生成的个人数字证书。In this embodiment of the application, after the user enters the basic information and physical certificate information, he can set a PIN password that meets the specifications according to the pop-up window popped up by the first terminal. The PIN password can be used as one of the conditions for the user to log in successfully. Send a digital certificate application to the server and obtain a personal digital certificate generated by the server.
根据已生成PIN口令,向服务器发送证书申请请求,证书申请请求用于指示服务器生成并返回第一用户的个人数字证书;Send a certificate application request to the server according to the generated PIN password, and the certificate application request is used to instruct the server to generate and return the personal digital certificate of the first user;
接收服务器返回的个人数字证书;Receive the personal digital certificate returned by the server;
响应于第一用户的登录操作,若确定登录操作输入正确的PIN口令,则基于个人数字证书向服务器发送连接请求,以指示服务器基于个人数字证书建立与第一终端间的SSL数据安全传输通道;In response to the login operation of the first user, if it is determined that the login operation inputs the correct PIN password, a connection request is sent to the server based on the personal digital certificate to instruct the server to establish a secure SSL data transmission channel with the first terminal based on the personal digital certificate;
基于SSL通道向服务器发送身份认证运算请求,以指示服务器生成并返回针对个人数字证书的认证结果。Send an identity authentication operation request to the server based on the SSL channel to instruct the server to generate and return an authentication result for the personal digital certificate.
具体的,用户想要在注册成功之后,需要进行登录。在接收服务器返回的个人数字证书后,首先需要输入正确的PIN口令,并且可以基于个人数字证书向服务器发送连接请求,从而建立起与服务器之间的SSL数据安全传输通道,以使得终端和服务器之间的数据可以安全传递,本申请实施例中的电子证件出示阶段以及电子证件核验阶段的第一、第二终端与服务器之间的数据传输都是基于SSL数据安全传输通道实现的。Specifically, the user needs to log in after successfully registering. After receiving the personal digital certificate returned by the server, you first need to enter the correct PIN password, and you can send a connection request to the server based on the personal digital certificate, thereby establishing a secure SSL data transmission channel with the server, so that the terminal and the server The data between them can be transmitted safely. The data transmission between the first and second terminals and the server in the electronic certificate presentation stage and the electronic certificate verification stage in the embodiment of this application are all realized based on the SSL data secure transmission channel.
本申请实施例中电子证件根据用户所知内容即PIN口令进行验证,PIN口令可以与人脸、指纹等生物信息绑定,同时可以对姓名、手机号码、身份证号码等敏感信息进行脱敏处理,不存在隐私泄漏的风险。例如超过两个字的姓名保留第一个字和最后一个字,两个字的姓名保留最后一个字;手机号码的第4-7位数字以“*”显示;身份证号码中的出生日期以“*”显示。In the embodiment of this application, the electronic certificate is verified according to the content known to the user, that is, the PIN password. The PIN password can be bound to biological information such as face and fingerprint, and at the same time, sensitive information such as name, mobile phone number, and ID number can be desensitized. , there is no risk of privacy leakage. For example, the first and last characters of a name with more than two characters are reserved, and the last character of a name with two characters is reserved; the 4th to 7th digits of a mobile phone number are displayed with "*"; "*"show.
在SSL通道建立之后,基于该SSL通道向服务器发送身份认证运算请求,并获得服务器的认证结果。After the SSL channel is established, an identity authentication operation request is sent to the server based on the SSL channel, and an authentication result of the server is obtained.
本申请实施例中电子证件PIN口令和个人数字证书方式实现双因子身份认证,对使用者身份进行核验,确保使用者身份真实有效。In the embodiment of the present application, the electronic certificate PIN password and the personal digital certificate realize two-factor identity authentication, and verify the identity of the user to ensure that the identity of the user is true and valid.
可选地,可以对设备信息进行验证,验证通过后方可正常使用电子证件,进一步提高了电子证件的安全性,使得电子证件不易被破解。Optionally, the device information can be verified, and the electronic certificate can be used normally only after the verification is passed, which further improves the security of the electronic certificate and makes the electronic certificate difficult to be cracked.
作为一种可选实施例,第二终端核验人员进行登录时也可以实现上述方法。As an optional embodiment, the above method may also be implemented when the verification personnel of the second terminal log in.
本申请实施例中提供了一种电子证件核验的方法,如图3所示,该方法包括:An embodiment of the present application provides a method for electronic certificate verification, as shown in Figure 3, the method includes:
S201、扫描并解析第一终端的待核验的电子证件中的二维码,获得待核验的数字签名结果、数字签名时间和用户标识;S201. Scan and analyze the QR code in the electronic certificate to be verified by the first terminal, and obtain the digital signature result to be verified, digital signature time and user identification;
在本申请实施例中,第一终端根据预设的二维码模板,动态实时生成与用户标识、数字签名结果和数字签名时间相对应的电子证件二维码,并且将用户可信身份、电子证件状态,电子证件二维码数据进行组装,最终显示完整的电子证件后,将其展示给核验人员。In this embodiment of the application, the first terminal dynamically generates a QR code corresponding to the user ID, digital signature result, and digital signature time in real time according to the preset QR code template, and stores the user's trusted identity, electronic The status of the certificate, the QR code data of the electronic certificate are assembled, and after the complete electronic certificate is finally displayed, it is displayed to the verification personnel.
核验人员所持第二终端扫描第一终端中展示的电子证件的二维码,对该二维码解析获得对应的用户标识、数字签名结果和数字签名时间。例如张三在生成自己的电子证件后,向核验人员出示其电子证件,核验人员使用第二终端扫描其电子证件二维码,获得对应的用户标识“123”和对张三的包括姓名、电话号、身份证件号、电子证件为“正常”状态等”的用户信息的数字签名结果以及数字签名时间例如“2022年7月28日16时23分23秒”。The second terminal held by the verifier scans the two-dimensional code of the electronic certificate displayed on the first terminal, and analyzes the two-dimensional code to obtain the corresponding user identification, digital signature result and digital signature time. For example, after Zhang San generates his own electronic certificate, he presents his electronic certificate to the verification personnel. The verification personnel use the second terminal to scan the QR code of his electronic certificate, and obtain the corresponding user ID "123" and the information about Zhang San, including his name and phone number. No., ID card number, electronic certificate in "normal" state, etc." the digital signature result and digital signature time of user information, such as "July 28, 2022 16:23:23".
S202、向服务器发送核验请求,核验请求包括数字签名结果、数字签名时间和用户标识,以指示服务器查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并返回核验结果;S202. Send a verification request to the server, the verification request includes the digital signature result, digital signature time and user ID, to instruct the server to query the user information corresponding to the user ID, and perform verification according to the digital signature result, digital signature time and the queried user information And return the verification result;
第二终端在解析出上述二维码中包含的信息后,基于已经建立的SSL安全传输通道,将用户标识、数字签名结果和数字签名时间发送到服务器,服务器在接收到用户标识、数字签名结果和数字签名时间后,首先根据用户标识查询对应的用户信息判断用户信息是否真实有效,然后基于用户信息、数字签名结果和数字签名时间进行签名验证,进而完成对电子证件的核验,服务器基于已经建立的SSL安全传输通道将实时核验结果返回给第二终端。After the second terminal parses out the information contained in the above two-dimensional code, based on the established SSL secure transmission channel, it sends the user identification, digital signature result and digital signature time to the server, and the server receives the user identification, digital signature result and the digital signature time, first check the corresponding user information according to the user ID to determine whether the user information is authentic and valid, and then perform signature verification based on the user information, digital signature result and digital signature time, and then complete the verification of the electronic certificate. The SSL secure transmission channel returns the real-time verification result to the second terminal.
S203、接收并展示核验结果。S203. Receive and display the verification result.
第二终端接收服务器得出的核验结果,并将该核验结果显示。例如,当对张三的电子证件核验通过后,第二终端界面会显示:“验证成功”。The second terminal receives the verification result obtained by the server, and displays the verification result. For example, after the verification of Zhang San's electronic certificate is passed, the second terminal interface will display: "Verification succeeded".
本申请实施例中的第二终端可以安装电子证件核验程序112,核验APP基于密码技术完成证件信息和签名信息的核验,电子证件核验程序112表现形式为可执行应用程序,支持APP、SDK两种模式,具体表现为智能移动终端上可安装的APP软件或集成到第三方应用APP软件,可以根据实际需求部署在Android、iOS移动终端上,对终端设备的要求仅为可安装APP软件即可,并不需要提供专用的核验设备,电子证件核验SDK也可以集成到考勤机、闸机等硬件设备中,通过考勤机、闸机等核验电子证件,在节省成本的同时又便于使用,方便易用,提高了用户体验。The second terminal in the embodiment of this application can install the electronic certificate verification program 112. The verification APP completes the verification of certificate information and signature information based on cryptographic technology. The electronic certificate verification program 112 is expressed as an executable application program and supports both APP and SDK. Mode, specifically manifested as APP software that can be installed on smart mobile terminals or integrated into third-party application APP software, can be deployed on Android and iOS mobile terminals according to actual needs, and the requirement for terminal equipment is only that APP software can be installed. There is no need to provide special verification equipment. The electronic document verification SDK can also be integrated into hardware devices such as time attendance machines and gates. Electronic documents can be verified through time attendance machines and gates. It is easy to use while saving costs. , improving the user experience.
并且,采用密码技术对电子证件出示、核验等业务数据传输过程以及业务数据完整性、保密性进行保护,保证通信过程中信息的安全。In addition, encryption technology is used to protect the business data transmission process such as electronic certificate presentation and verification, as well as the integrity and confidentiality of business data, so as to ensure the security of information in the communication process.
本申请实施例中提供了一种信息处理方法,应用于服务器,如图4所示,该方法包括:An information processing method is provided in an embodiment of the present application, which is applied to a server, as shown in FIG. 4 , the method includes:
S301、接收第一终端响应于第一用户的电子证件出示操作发送的信息获取请求,信息获取请求中包括第一用户的用户标识;S301. Receive an information acquisition request sent by the first terminal in response to the first user's electronic certificate presentation operation, where the information acquisition request includes the user identifier of the first user;
在本申请实施例中,第一用户选择电子证件出示功能后,第一终端向服务器发送信息获取请求,其中,信息获取请求中包括第一用户对应的用户标识,服务器在获得信息获取请求和第一用户对应的用户标识。例如张三使用第一终端发送一信息获取请求,请求中包括张三的用户标识“123”,服务器就可以获得上述信息获取请求和用户标识“123”。In this embodiment of the application, after the first user selects the electronic certificate presentation function, the first terminal sends an information acquisition request to the server, wherein the information acquisition request includes the user identification corresponding to the first user, and the server obtains the information acquisition request and the second A user ID corresponding to a user. For example, Zhang San uses the first terminal to send an information acquisition request, and the request includes Zhang San's user ID "123", and the server can obtain the information acquisition request and the user ID "123".
S302、根据用户标识获取第一用户的用户信息,根据机构数字证书对用户信息和数字签名时间签名后生成数字签名结果,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;S302. Obtain the user information of the first user according to the user identification, and generate a digital signature result after signing the user information and the digital signature time according to the organization's digital certificate, and the digital signature time is the time when the user information and the digital signature time are signed according to the organization's digital certificate ;
服务器根据第一用户对应的用户标识获取对应的第一用户的用户信息,通过机构数字证书对该用户信息和数字签名时间进行数字签名运算生成签名结果。其中,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间。例如当用户张三选择电子证件出示功能后,第一终端向服务器发送信息获取请求以及该请求中包含的张三的用户标识“123”,服务器在接收该信息后,根据用户标识“123”,查找到张三的姓名、电话号、身份证件号等用户信息,服务器通过机构数字证书对上述信息和数字签名时间例如“2022年7月28日16时23分23秒”进行签名生成数字签名结果。The server obtains the user information of the corresponding first user according to the user identification corresponding to the first user, and performs digital signature calculation on the user information and digital signature time through the organization digital certificate to generate a signature result. Wherein, the digital signature time is the time when the user information and the digital signature time are signed according to the organization's digital certificate. For example, when user Zhang San selects the electronic certificate presentation function, the first terminal sends an information acquisition request to the server and Zhang San's user ID "123" included in the request. After receiving the information, the server, according to the user ID "123", Find Zhang San's name, phone number, ID number and other user information, and the server signs the above information and digital signature time, such as "July 28, 2022 16:23:23" through the organization's digital certificate to generate a digital signature result .
S303、通过个人数字证书加密用户信息、数字签名结果和数字签名时间,生成加密结果;S303. Encrypt the user information, digital signature result and digital signature time with the personal digital certificate to generate an encrypted result;
S304、将加密结果返回第一终端。S304. Return the encryption result to the first terminal.
服务器使用个人数字证书对上述第一用户的用户信息,数字签名结果和数字签名时间进行加密处理,生成加密结果后,将加密结果发送回第一终端。The server uses the personal digital certificate to encrypt the user information of the first user, the digital signature result and the digital signature time, and after generating the encrypted result, sends the encrypted result back to the first terminal.
在上述各实施例的基础上,作为一种可选实施例,接收第一终端发送信息获取请求,之前还包括:On the basis of the foregoing embodiments, as an optional embodiment, receiving the information acquisition request sent by the first terminal also includes:
响应于第一用户的注册操作,接收第一终端发送的第一用户的基本信息,根据第一用户的基本信息从预设的数据库中获取并生成第一用户的实体证件信息;Responding to the registration operation of the first user, receiving the basic information of the first user sent by the first terminal, acquiring and generating the entity certificate information of the first user from a preset database according to the basic information of the first user;
将基本信息与实体证件信息作为用户信息,确定第一用户的用户标识;Using basic information and physical certificate information as user information to determine the user identification of the first user;
建立用户标识与用户信息间的对应关系,将用户标识返回第一终端。在本申请实施例中,服务器将接收到的基本信息和实体证件信息作为第一用户的用户信息,并在此时生成该用户的用户标识,建立用户标识和用户信息间的对应关系,然后把创建出的用户标识发送给第一终端。此外,用户信息还可以包括电子证件状态。A corresponding relationship between the user identifier and the user information is established, and the user identifier is returned to the first terminal. In this embodiment of the application, the server takes the received basic information and physical certificate information as the user information of the first user, and at this time generates the user ID of the user, establishes the correspondence between the user ID and user information, and then sends the The created user ID is sent to the first terminal. In addition, the user information may also include the status of the electronic certificate.
在上述各实施例的基础上,作为一种可选实施例,接收第一终端发送信息获取请求,之前还包括:On the basis of the foregoing embodiments, as an optional embodiment, receiving the information acquisition request sent by the first terminal also includes:
接收第一终端发送信息获取请求,之前还包括:Receiving the information acquisition request sent by the first terminal also includes:
接收第一终端发送的证书申请请求,证书申请请求包括用户标识;receiving a certificate application request sent by the first terminal, where the certificate application request includes a user identifier;
根据用户标识对应的用户信息,生成第一用户的个人数字证书并将个人数字证书发送至第一终端;According to the user information corresponding to the user identification, generate a personal digital certificate of the first user and send the personal digital certificate to the first terminal;
其中,证书申请请求是第一终端响应于第一用户针对待填写的输入框的输入操作,根据输入的加密信息生成PIN口令后发送的;Wherein, the certificate application request is sent by the first terminal after generating a PIN password according to the input encrypted information in response to the first user's input operation on the input box to be filled;
接收第一终端发送的连接请求,根据个人数字证书建立与第一终端间的SSL数据安全传输通道;receiving a connection request sent by the first terminal, and establishing a secure SSL data transmission channel with the first terminal according to the personal digital certificate;
接收第一终端发送的身份认证运算请求,基于SSL通道对个人数字证书进行验证生成验证结果,将认证结果发送至第一终端;receiving the identity authentication operation request sent by the first terminal, verifying the personal digital certificate based on the SSL channel to generate a verification result, and sending the verification result to the first terminal;
其中,连接请求是第一终端响应于第一用户的登录操作,确定登录操作输入正确的PIN口令后发送的。Wherein, the connection request is sent by the first terminal after confirming that a correct PIN password is entered in the login operation in response to the first user's login operation.
在上述各实施例的基础上,作为一种可选实施例,接收第一终端发送信息获取请求,之前还包括:On the basis of the foregoing embodiments, as an optional embodiment, receiving the information acquisition request sent by the first terminal also includes:
接收第一终端发送的身份认证运算请求,身份认证运算请求包括个人数字证书;receiving an identity authentication operation request sent by the first terminal, where the identity authentication operation request includes a personal digital certificate;
对接收到的个人数字证书进行验证生成验证结果,将认证结果发送至第一终端;Verifying the received personal digital certificate to generate a verification result, and sending the verification result to the first terminal;
接收第一终端发送的连接请求,根据个人数字证书建立与第一终端间的SSL数据安全传输通道;receiving a connection request sent by the first terminal, and establishing a secure SSL data transmission channel with the first terminal according to the personal digital certificate;
其中,身份认证运算请求是第一终端响应于第一用户的登录操作,确定登录操作输入正确的PIN口令后发送的。Wherein, the identity authentication operation request is sent by the first terminal after confirming that a correct PIN password is entered in the login operation in response to the first user's login operation.
本申请实施例中电子证件PIN口令和个人数字证书方式实现双因子身份认证,可选地,可以对设备信息进行验证,验证通过后方可正常使用电子证件,进一步提高了电子证件的安全性,使得电子证件不易被破解。In the embodiment of this application, the PIN password of the electronic certificate and the personal digital certificate realize two-factor identity authentication. Optionally, the device information can be verified, and the electronic certificate can be used normally only after the verification is passed, which further improves the security of the electronic certificate, making Electronic documents are not easily cracked.
在上述各实施例的基础上,作为一种可选实施例,包括:On the basis of the foregoing embodiments, an optional embodiment includes:
接收第二终端发送的核验请求,核验请求包括数字签名结果、数字签名时间和用户标识;receiving a verification request sent by the second terminal, where the verification request includes a digital signature result, a digital signature time and a user ID;
根据用户标识查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并将核验结果返回至第二终端;Querying the user information corresponding to the user ID according to the user ID, performing verification according to the digital signature result, the digital signature time and the queried user information, and returning the verification result to the second terminal;
其中,若确定第一用户的用户信息真实有效且数字签名结果验证通过,则核验结果为核验成功;Wherein, if it is determined that the user information of the first user is authentic and valid and the digital signature result is verified, the verification result is a verification success;
其中,核验请求是第二终端扫描并解析待核验的电子证件中的二维码后发送的。Wherein, the verification request is sent by the second terminal after scanning and analyzing the two-dimensional code in the electronic certificate to be verified.
具体的,服务器首先根据用户标识查询对应的用户信息,判断用户信息是否真实有效,然后基于用户信息、数字签名结果和数字签名时间进行验签,进而完成对电子证件的核验,服务器将实时核验结果返回给第二终端。Specifically, the server first queries the corresponding user information based on the user ID to determine whether the user information is authentic and valid, and then performs signature verification based on the user information, digital signature result and digital signature time, and then completes the verification of the electronic certificate. The server will verify the result in real time Return to the second terminal.
本申请实施例中的核验过程分为两步,第一步是根据用户标识查询用户的用户信息是否真实有效,第二步是对用户信息和数字签名结果进行验签,只有两步的验证结果均通过时,本次电子证件核验才成功,核验时在线、实时对服务器内存储的用户信息和数字签名结果内的用户信息进行比对,同时将用户信息和数字签名时间作为待签名原文参与核验过程,可以有效的分辨用户的信息是否被篡改,可以确保用户信息的真实性、完整性和不可否认性。The verification process in the embodiment of this application is divided into two steps. The first step is to check whether the user information of the user is authentic and valid according to the user ID. The second step is to verify the user information and digital signature results. There are only two steps of verification results. When all pass, the verification of the electronic certificate is successful. During the verification, the user information stored in the server and the user information in the digital signature result are compared online and in real time. At the same time, the user information and digital signature time are used as the original text to be signed to participate in the verification The process can effectively distinguish whether the user's information has been tampered with, and can ensure the authenticity, integrity and non-repudiation of the user's information.
请参见图5,图5示例性的展示了本申请一个实施例的第一用户从注册到电子证件出示的流程图:Please refer to Figure 5, which schematically shows the flow chart of the first user from registration to electronic certificate presentation in an embodiment of the present application:
S401、第一用户执行注册操作,输入基本信息;S401. The first user performs a registration operation and inputs basic information;
S402、第一终端将第一用户的基本信息传送至服务器;S402. The first terminal transmits the basic information of the first user to the server;
S403、服务器接收第一用户的基本信息,根据基本信息从预设数据库获取实体证件信息,将基本信息和实体证件信息作为用户信息,确定第一用户的用户标识,并建立用户标识与用户信息间的对应关系;S403. The server receives the basic information of the first user, obtains the entity certificate information from the preset database according to the basic information, uses the basic information and the entity certificate information as user information, determines the user identifier of the first user, and establishes a relationship between the user identifier and the user information corresponding relationship;
S404、服务器将用户标识返回第一终端;S404. The server returns the user identifier to the first terminal;
S405、第一用户根据第一终端的弹窗设置PIN口令;S405. The first user sets a PIN password according to the pop-up window of the first terminal;
S406、第一终端完成设置的PIN口令后,向服务器发送证书申请请求,证书申请请求包括用户标识;S406. After completing the setting of the PIN password, the first terminal sends a certificate application request to the server, where the certificate application request includes the user ID;
S407、服务器接收第一终端发送的证书申请请求,根据用户标识对应的用户信息,生成第一用户的个人数字证书;S407. The server receives the certificate application request sent by the first terminal, and generates the personal digital certificate of the first user according to the user information corresponding to the user identifier;
S408、第一用户执行登录操作、输入正确PIN口令;S408. The first user performs a login operation and enters a correct PIN password;
S409、第一终端基于个人数字证书向服务器发送连接请求;S409. The first terminal sends a connection request to the server based on the personal digital certificate;
S410、服务器基于个人数字证书建立与第一终端间的SSL数据安全传输通道;S410. The server establishes an SSL data secure transmission channel with the first terminal based on the personal digital certificate;
S411、第一终端向服务器发送身份认证运算请求;S411. The first terminal sends an identity authentication operation request to the server;
S412、服务器进行身份认证运算,并向第一终端返回身份认证结果;S412. The server performs an identity authentication operation, and returns an identity authentication result to the first terminal;
S413、第一用户执行电子证件出示操作;S413. The first user performs an operation of presenting an electronic certificate;
S414、第一终端向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识;S414. The first terminal sends an information acquisition request to the server, where the information acquisition request includes the user identifier of the first user;
S415、服务器接收信息获取请求,服务器根据用户标识获取第一用户的用户信息,使用机构数字证书对用户信息、数字签名时间签名后生成数字签名结果;服务器通过个人数字证书加密用户信息、数字签名时间以及数字签名结果,生成加密结果;S415. The server receives the information acquisition request, the server acquires the user information of the first user according to the user identification, and generates a digital signature result after signing the user information and digital signature time with an organization digital certificate; the server encrypts the user information and digital signature time with the personal digital certificate And digital signature result, generate encryption result;
S416、服务器将加密结果返回第一终端;S416. The server returns the encryption result to the first terminal;
S417、第一终端接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名时间以及数字签名结果;S417. The first terminal receives the encrypted result returned by the server, decrypts the encrypted result according to the personal digital certificate, and obtains user information, digital signature time and digital signature result;
S418、第一终端根据预设的二维码模板生成与数字签名和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。S418. The first terminal generates a two-dimensional code corresponding to the digital signature and the user ID according to the preset two-dimensional code template, generates and displays an electronic certificate, and the electronic certificate includes user information and a two-dimensional code.
在一个可选的应用场景中,例如张三要生成电子证件,核验人员李四对张三的电子证件进行核验。In an optional application scenario, for example, Zhang San wants to generate an electronic certificate, and the verifier Li Si verifies Zhang San's electronic certificate.
张三在第一终端第一用户执行注册操作,输入姓名“张三”、身份证号码430xxxxx123、手机号码156xxxx和本人近期免冠证件照等基本信息,第一终端将上述基本信息发送至服务器,服务器接收后,从预设的数据库中获取并生成张三的实体证件信息,例如可以包括:证件颁发机构“L机构”,证件类型例如“员工证件”,证件有效期“2022年5月-2025年5月”;Zhang San performs the registration operation on the first user of the first terminal, and enters basic information such as name "Zhang San", ID number 430xxxxx123, mobile phone number 156xxxx, and his recent bareheaded ID photo. The first terminal sends the above basic information to the server, and the server After receiving, obtain and generate Zhang San's physical certificate information from the preset database, for example, it can include: certificate issuing authority "L organization", certificate type such as "employee certificate", certificate validity period "May 2022-2025 May moon";
此外,服务器还可以判断获得张三的电子证件状态为“正常”;In addition, the server can also judge that the status of Zhang San's electronic certificate is "normal";
服务器生成张三的用户标识,例如“123”,并建立用户标识“123”与张三的用户信息的对应关系,并将标识“123”返回第一终端;The server generates Zhang San's user identifier, such as "123", and establishes a corresponding relationship between the user identifier "123" and Zhang San's user information, and returns the identifier "123" to the first terminal;
张三根据第一终端显示的弹窗,设置符合预设规范的PIN口令“abc123”,并向服务器发送证书申请请求,证书申请请求包括张三的用户标识“123”;According to the pop-up window displayed by the first terminal, Zhang San sets the PIN password "abc123" that conforms to the preset specification, and sends a certificate application request to the server. The certificate application request includes Zhang San's user ID "123";
服务器接收第一终端发送的证书申请请求,根据张三的用户标识“123”对应的用户信息,生成并返回张三的个人数字证书;The server receives the certificate application request sent by the first terminal, generates and returns Zhang San's personal digital certificate according to the user information corresponding to Zhang San's user ID "123";
第一终端接收上述数据后,张三执行登录操作,输入PIN口令“abc123”,第一终端判断PIN口令输入正确,则向服务器发送连接请求,服务器基于个人数字证书建立与第一终端间的SSL数据安全传输通道;之后,向服务器发送身份认证运算请求,服务器进行身份认证运算;After the first terminal receives the above data, Zhang San performs the login operation and enters the PIN password "abc123". The first terminal judges that the PIN password is entered correctly, then sends a connection request to the server, and the server establishes an SSL with the first terminal based on the personal digital certificate. Data security transmission channel; after that, send an identity authentication operation request to the server, and the server performs identity authentication operation;
若身份认证运算通过,则成功登录,登录成功后,张三执行电子证件出示操作,第一终端向服务器发送信息获取请求,信息获取请求中包括张三的用户标识“123”;If the identity authentication operation passes, the login is successful. After the login is successful, Zhang San performs the operation of presenting the electronic certificate, and the first terminal sends an information acquisition request to the server. The information acquisition request includes Zhang San's user identification "123";
服务器根据上述请求和用户标识“123”获取张三的用户信息,使用机构数字证书对用户信息、数字签名时间签名后生成数字签名结果,通过个人数字证书加密用户信息、数字签名时间“2022年7月28日16时23分23秒”以及数字签名结果,生成加密结果并发送给第一终端;The server obtains Zhang San’s user information according to the above request and the user ID “123”, signs the user information and digital signature time with the organization’s digital certificate to generate a digital signature result, and encrypts the user information and digital signature time “July 2022” with the personal digital certificate 16:23:23 on March 28" and the digital signature result, generate an encrypted result and send it to the first terminal;
第一终端接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得上述用户信息、数字签名时间以及数字签名结果,并根据预设的二维码模板生成与数字签名结果、数字签名时间“2022年7月28日16时23分23秒”和张三的用户标识“123”对应的二维码,生成并展示张三的电子证件,该电子证件包括:电子证件二维码、姓名“张三”、身份证号码430xxxxx123、手机号码156xxxx和张三的近期免冠证件照等基本信息,证件颁发机构“L机构”,证件类型例如“员工证件”,证件有效期“2022年5月-2025年5月”等实体证件信息以及电子证件状态为“正常”。The first terminal receives the encryption result returned by the server, decrypts the encryption result according to the personal digital certificate, obtains the above user information, digital signature time and digital signature result, and generates the digital signature result and digital signature according to the preset QR code template The time "July 28, 2022 16:23:23" and the QR code corresponding to Zhang San's user ID "123" generate and display Zhang San's electronic certificate, which includes: electronic certificate QR code, Basic information such as name "Zhang San", ID number 430xxxxx123, mobile phone number 156xxxx, and Zhang San's recent passport photo without hat, the certificate issuing agency "L institution", the type of certificate such as "employee certificate", and the validity period of the certificate "May 2022- May 2025" and other physical certificate information and electronic certificate status are "normal".
核验人员李四使用第二终端,扫描并解析待核验张三的电子证件中的二维码,获得张三的用户标识“123”、数字签名时间“2022年7月28日16时23分23秒”和数字签名结果;Verifier Li Si used the second terminal to scan and analyze the QR code in Zhang San's electronic certificate to be verified, and obtained Zhang San's user ID "123" and digital signature time "July 28, 2022 16:23:23 seconds" and digital signature results;
第二终端向服务器发送核验请求,核验请求包括张三的用户标识“123”、数字签名时间“2022年7月28日16时23分23秒”和数字签名结果,服务器查询与用户标识“123”对应的用户信息,判断张三的用户信息是否真实有效,并对用户信息、数字签名时间、数字签名结果进行验签,两步的验证结果均通过时,本次电子证件核验成功;The second terminal sends a verification request to the server. The verification request includes Zhang San's user ID "123", the digital signature time "July 28, 2022 16:23:23" and the digital signature result. The server query and user ID "123 "Corresponding user information, determine whether Zhang San's user information is authentic and valid, and verify the user information, digital signature time, and digital signature results. When the two-step verification results pass, the electronic certificate verification is successful;
服务器将核验结果返回第二终端,第二终端接收并展示结果为“核验通过”。The server returns the verification result to the second terminal, and the second terminal receives and displays the result as "verification passed".
作为一种可选实施例,第一用户在第一终端已成功申请个人数字证书的基础上,也可以采用PIN口令进行身份验证,同时对用户身份信息、设备信息等进行比对核验,验证通过后才能使用电子证件。As an optional embodiment, on the basis that the first terminal has successfully applied for a personal digital certificate, the first user can also use the PIN password for identity verification, and at the same time compare and verify the user identity information, device information, etc., and pass the verification Only then can the electronic certificate be used.
可选地,若加密和签名过程中涉及到密钥的使用或证书的申请,PIN口令还可以参与密钥生成、证书申请过程,作为保护因子参与密钥生成、证书申请运算,使用密钥、证书时需要经过身份认证、设备验证,通过后才能调用进行签名运算,保证对使用者身份进行实时核验。Optionally, if the encryption and signature process involves the use of the key or the application of the certificate, the PIN password can also participate in the key generation and certificate application process, and participate in the key generation and certificate application operations as a protection factor. The certificate needs to go through identity authentication and device verification, and then it can be called for signature calculation to ensure real-time verification of the user's identity.
本申请实施例提供了一种第一终端,如图6所示,该终端可以包括:获取模块601、接收602以及展示模块603,其中:The embodiment of the present application provides a first terminal. As shown in FIG. 6, the terminal may include: an acquiring
获取模块601,用于响应于第一用户的电子证件出示操作,向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识,以指示服务器执行以下操作:The
根据用户标识获取第一用户的用户信息,以及返回通过个人数字证书加密用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书对用户信息和数字签名时间签名后生成的,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;Obtain the user information of the first user according to the user ID, and return the encryption result generated by encrypting the user information, digital signature result and digital signature time through the personal digital certificate. The digital signature result is that the server signs the user information and digital signature time according to the organization's digital certificate Generated later, the digital signature time is the time when the user information and digital signature time are signed according to the organization's digital certificate;
接收模块602,用于接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名结果和数字签名时间;The receiving
展示模块603,用于根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。The
本申请实施例的终端可执行本申请实施例所提供的方法,其实现原理相类似,本申请各实施例的终端、服务器中的各模块所执行的动作是与本申请各实施例的方法中的步骤相对应的,对于装置的各模块的详细功能描述具体可以参见前文中所示的对应方法中的描述,此处不再赘述。The terminal in the embodiment of the present application can execute the method provided in the embodiment of the present application, and its realization principle is similar. Corresponding to the steps, for the detailed function description of each module of the device, please refer to the description in the corresponding method shown above, which will not be repeated here.
作为一种可选实施例,响应于第一用户的电子证件出示操作,之前还包括:As an optional embodiment, in response to the operation of presenting the electronic certificate of the first user, the method also includes:
注册发起模块,用于响应于第一用户的注册操作,将第一用户的基本信息传送至服务器,以指示服务器执行以下操作:The registration initiating module is configured to transmit the basic information of the first user to the server in response to the registration operation of the first user, so as to instruct the server to perform the following operations:
从预设的数据库中获取并生成第一用户的实体证件信息,将基本信息与实体证件信息作为用户信息并确定第一用户的用户标识、建立用户标识与用户信息间的对应关系以及将用户标识返回第一终端。Obtain and generate the first user’s physical certificate information from the preset database, use the basic information and physical certificate information as user information, determine the first user’s user ID, establish the correspondence between the user ID and user information, and store the user ID Return to the first terminal.
本申请实施例提供了一种第二终端,如图7所示,该终端可以包括扫描解析模块701、请求发送模块702以及接收展示模块603,其中:The embodiment of the present application provides a second terminal. As shown in FIG. 7, the terminal may include a
扫描解析模块701,用于扫描并解析第一终端的待核验的电子证件中的二维码,获得待核验的数字签名结果、数字签名时间和用户标识;The
请求发送模块702,用于向服务器发送核验请求,核验请求包括数字签名结果、数字签名时间和用户标识,以指示服务器查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并返回核验结果;The
接收展示模块703,用于接收并展示核验结果。The receiving and displaying
本申请实施例提供了一种服务器,如图8所示,该服务器可以包括请求接收模块801、签名运算模块802、加密模块803以及接收发送模块804,其中:The embodiment of this application provides a server. As shown in FIG. 8, the server may include a
请求接收模块801,用于接收第一终端响应于第一用户的电子证件出示操作发送的信息获取请求,信息获取请求中包括第一用户的用户标识;A
签名运算模块802,用于根据用户标识获取第一用户的用户信息,根据机构数字证书对用户信息和数字签名时间签名后生成数字签名结果,数字签名时间为根据机构数字证书对用户信息和数字签名时间进行签名的时间;The
加密模块803,用于通过个人数字证书加密用户信息、数字签名结果和数字签名时间,生成加密结果;The
发送模块804,用于将加密结果返回第一终端。A sending
作为一种可选实施例,接收第一终端发送信息获取请求,之前还包括:As an optional embodiment, before receiving the information acquisition request sent by the first terminal, it also includes:
信息获取模块,用于响应于第一用户的注册操作,接收第一终端发送的第一用户的基本信息,根据第一用户的基本信息从预设的数据库中获取并生成第一用户的实体证件信息;The information acquisition module is configured to receive the basic information of the first user sent by the first terminal in response to the registration operation of the first user, and obtain and generate the physical certificate of the first user from a preset database according to the basic information of the first user information;
信息处理模块,用于将基本信息与实体证件信息作为用户信息,确定第一用户的用户标识;An information processing module, configured to use basic information and entity certificate information as user information to determine the user identifier of the first user;
关系建立模块,用于建立用户标识与用户信息间的对应关系,将用户标识返回第一终端。The relationship establishing module is configured to establish a corresponding relationship between the user identifier and the user information, and return the user identifier to the first terminal.
作为一种可选实施例,还包括:As an optional embodiment, it also includes:
核验请求接收模块,用于接收第二终端发送的核验请求,核验请求包括数字签名结果、数字签名时间和用户标识;A verification request receiving module, configured to receive a verification request sent by the second terminal, where the verification request includes a digital signature result, a digital signature time and a user ID;
信息核验模块,用于根据用户标识查询与用户标识对应的用户信息,根据数字签名结果、数字签名时间和查询到的用户信息进行核验并将核验结果返回至第二终端;The information verification module is used to query the user information corresponding to the user identification according to the user identification, perform verification according to the digital signature result, the digital signature time and the queried user information, and return the verification result to the second terminal;
其中,若确定第一用户的用户信息真实有效且数字签名结果验证通过,则核验结果为核验成功;Wherein, if it is determined that the user information of the first user is authentic and valid and the digital signature result is verified, the verification result is a verification success;
其中,核验请求是第二终端扫描并解析待核验的电子证件中的二维码后发送的。Wherein, the verification request is sent by the second terminal after scanning and analyzing the two-dimensional code in the electronic certificate to be verified.
本申请实施例中提供了一种电子设备,包括存储器、处理器及存储在存储器上的计算机程序,该处理器执行上述计算机程序以实现上述的步骤,与相关技术相比可实现:通过响应于第一用户的电子证件出示操作,向服务器发送信息获取请求,信息获取请求中包括第一用户的用户标识,以指示服务器根据用户标识获取第一用户的用户信息,以及返回通过个人数字证书加密用户信息、数字签名结果和数字签名时间生成的加密结果,数字签名结果是服务器根据机构数字证书对用户信息和数字签名时间签名后生成的;接收服务器返回的加密结果,根据个人数字证书对加密结果进行解密,获得用户信息、数字签名结果和数字签名时间;根据预设的二维码模板生成与数字签名结果、数字签名时间和用户标识对应的二维码,生成并展示电子证件,电子证件包括用户信息和二维码。实现了终端、服务器合作生成一张安全的、动态的电子证件,防止被拍照、拷贝冒用,在证件核验时,无需使用专用设备,仅需在通用的移动设备上安装APP,通过扫码方式安全的完成基于密码的身份信息验证。An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory. The processor executes the above computer program to implement the above steps. Compared with related technologies, it can be realized: by responding to The operation of presenting the electronic certificate of the first user sends an information acquisition request to the server, and the information acquisition request includes the user identification of the first user to instruct the server to obtain the user information of the first user according to the user identification, and returns the encrypted information of the user through the personal digital certificate The encryption result generated by the information, digital signature result and digital signature time. The digital signature result is generated by the server after signing the user information and digital signature time according to the organization's digital certificate; receiving the encrypted result returned by the server, and performing encryption on the encrypted result according to the personal digital certificate Decrypt to obtain user information, digital signature results and digital signature time; generate a QR code corresponding to the digital signature result, digital signature time and user ID according to the preset QR code template, generate and display electronic certificates, including user information and QR codes. It realizes the cooperation between the terminal and the server to generate a safe and dynamic electronic certificate, which prevents it from being photographed or copied for fraudulent use. When verifying the certificate, it is not necessary to use special equipment. It is only necessary to install the APP on the general mobile device and scan the code. Securely complete password-based authentication of identity information.
在一个可选实施例中提供了一种电子设备,如图9所示,图9所示的电子设备4000包括:处理器4001和存储器4003。其中,处理器4001和存储器4003相连,如通过总线4002相连。可选地,电子设备4000还可以包括收发器4004,收发器4004可以用于该电子设备与其他电子设备之间的数据交互,如数据的发送和/或数据的接收等。需要说明的是,实际应用中收发器4004不限于一个,该电子设备4000的结构并不构成对本申请实施例的限定。An electronic device is provided in an optional embodiment. As shown in FIG. 9 , the
处理器4001可以是CPU(Central Processing Unit,中央处理器),通用处理器,DSP(Digital Signal Processor,数据信号处理器),ASIC(Application SpecificIntegrated Circuit,专用集成电路),FPGA(Field Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器4001也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。The
总线4002可包括一通路,在上述组件之间传送信息。总线4002可以是PCI(Peripheral Component Interconnect,外设部件互连标准)总线或EISA(ExtendedIndustry Standard Architecture,扩展工业标准结构)总线等。总线4002可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器4003可以是ROM(Read Only Memory,只读存储器)或可存储静态信息和指令的其他类型的静态存储设备,RAM(Random Access Memory,随机存取存储器)或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM(Electrically ErasableProgrammable Read Only Memory,电可擦可编程只读存储器)、CD-ROM(Compact DiscRead Only Memory,只读光盘)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质、其他磁存储设备、或者能够用于携带或存储计算机程序并能够由计算机读取的任何其他介质,在此不做限定。
存储器4003用于存储执行本申请实施例的计算机程序,并由处理器4001来控制执行。处理器4001用于执行存储器4003中存储的计算机程序,以实现前述方法实施例所示的步骤。The
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现前述方法实施例的步骤及相应内容。An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiments can be realized.
本申请实施例还提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时可实现前述方法实施例的步骤及相应内容。The embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps and corresponding content of the aforementioned method embodiments can be realized.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”、“1”、“2”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除图示或文字描述以外的顺序实施。The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the description and claims of this application and the above drawings are used for Distinguishes between similar objects and does not necessarily describe a particular order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described in writing.
应该理解的是,虽然本申请实施例的流程图中通过箭头指示各个操作步骤,但是这些步骤的实施顺序并不受限于箭头所指示的顺序。除非本文中有明确的说明,否则在本申请实施例的一些实施场景中,各流程图中的实施步骤可以按照需求以其他的顺序执行。此外,各流程图中的部分或全部步骤基于实际的实施场景,可以包括多个子步骤或者多个阶段。这些子步骤或者阶段中的部分或全部可以在同一时刻被执行,这些子步骤或者阶段中的每个子步骤或者阶段也可以分别在不同的时刻被执行。在执行时刻不同的场景下,这些子步骤或者阶段的执行顺序可以根据需求灵活配置,本申请实施例对此不限制。It should be understood that although arrows indicate various operation steps in the flow chart of the embodiment of the present application, the execution order of these steps is not limited to the order indicated by the arrows. Unless otherwise specified herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart may be performed in other orders as required. In addition, part or all of the steps in each flow chart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each of these sub-steps or stages may also be executed at different times. In scenarios where execution times are different, the execution order of these sub-steps or stages can be flexibly configured according to requirements, which is not limited in this embodiment of the present application.
以上仅是本申请部分实施场景的可选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请的方案技术构思的前提下,采用基于本申请技术思想的其他类似实施手段,同样属于本申请实施例的保护范畴。The above are only optional implementations of some implementation scenarios of this application. It should be pointed out that for those of ordinary skill in the art, on the premise of not departing from the technical concept of this application, other similar methods based on the technical ideas of this application can be adopted. The means of implementation also belong to the scope of protection of the embodiments of the present application.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210999984.3A CN115378609A (en) | 2022-08-19 | 2022-08-19 | Electronic certificate display method, verification method, terminal and server |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210999984.3A CN115378609A (en) | 2022-08-19 | 2022-08-19 | Electronic certificate display method, verification method, terminal and server |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115378609A true CN115378609A (en) | 2022-11-22 |
Family
ID=84065864
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210999984.3A Pending CN115378609A (en) | 2022-08-19 | 2022-08-19 | Electronic certificate display method, verification method, terminal and server |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115378609A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116112178A (en) * | 2023-01-05 | 2023-05-12 | 博雅中科(北京)信息技术有限公司 | Verification mark generation method, system, electronic device and storage medium |
| CN116542679A (en) * | 2023-03-15 | 2023-08-04 | 国家珠宝玉石首饰检验集团有限公司 | Data processing method and device for digital certificate |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015101310A1 (en) * | 2013-12-31 | 2015-07-09 | 腾讯科技(深圳)有限公司 | Service processing method, device and system |
| CN105095728A (en) * | 2015-06-15 | 2015-11-25 | 南京市信息中心 | Two-dimensional code identification method based on digital signatures and timestamps |
| CN107665399A (en) * | 2017-09-06 | 2018-02-06 | 北京联合大学 | A Method for Personnel File Storage and Credible Electronic File Management Based on Digital Signature Technology |
| CN109684801A (en) * | 2018-11-16 | 2019-04-26 | 阿里巴巴集团控股有限公司 | The generation of electronic certificate is signed and issued and verification method and device |
| CN110378091A (en) * | 2019-07-24 | 2019-10-25 | 阿里巴巴集团控股有限公司 | Identity verification method, device and equipment |
| CN112307495A (en) * | 2020-10-26 | 2021-02-02 | 浪潮云信息技术股份公司 | Electronic certificate sharing application model and method based on certificate two-dimensional code |
-
2022
- 2022-08-19 CN CN202210999984.3A patent/CN115378609A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015101310A1 (en) * | 2013-12-31 | 2015-07-09 | 腾讯科技(深圳)有限公司 | Service processing method, device and system |
| CN105095728A (en) * | 2015-06-15 | 2015-11-25 | 南京市信息中心 | Two-dimensional code identification method based on digital signatures and timestamps |
| CN107665399A (en) * | 2017-09-06 | 2018-02-06 | 北京联合大学 | A Method for Personnel File Storage and Credible Electronic File Management Based on Digital Signature Technology |
| CN109684801A (en) * | 2018-11-16 | 2019-04-26 | 阿里巴巴集团控股有限公司 | The generation of electronic certificate is signed and issued and verification method and device |
| CN110378091A (en) * | 2019-07-24 | 2019-10-25 | 阿里巴巴集团控股有限公司 | Identity verification method, device and equipment |
| CN112307495A (en) * | 2020-10-26 | 2021-02-02 | 浪潮云信息技术股份公司 | Electronic certificate sharing application model and method based on certificate two-dimensional code |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116112178A (en) * | 2023-01-05 | 2023-05-12 | 博雅中科(北京)信息技术有限公司 | Verification mark generation method, system, electronic device and storage medium |
| CN116112178B (en) * | 2023-01-05 | 2025-07-25 | 博雅中科(北京)信息技术有限公司 | Verification identifier generation method, system, electronic device and storage medium |
| CN116542679A (en) * | 2023-03-15 | 2023-08-04 | 国家珠宝玉石首饰检验集团有限公司 | Data processing method and device for digital certificate |
| CN116542679B (en) * | 2023-03-15 | 2024-05-14 | 国家珠宝玉石首饰检验集团有限公司 | A data processing method and device for digital certificate |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12160515B2 (en) | Non-fungible token authentication | |
| US12323529B2 (en) | Compact recordation protocol | |
| US11394712B2 (en) | Secure account access | |
| CN105429760B (en) | A TEE-based digital certificate authentication method and system | |
| CN105516104B (en) | A TEE-based dynamic password authentication method and system | |
| US11539690B2 (en) | Authentication system, authentication method, and application providing method | |
| CN106063182B (en) | Electronic signature method, system and equipment | |
| CN108173659B (en) | Certificate management method and system based on UKEY equipment and terminal equipment | |
| US20140172741A1 (en) | Method and system for security information interaction based on internet | |
| US20140095863A1 (en) | Internet based security information interaction apparatus and method | |
| CN109922027B (en) | Credible identity authentication method, terminal and storage medium | |
| CN108038388B (en) | Method for realizing Web page seal, client and server | |
| CN115378609A (en) | Electronic certificate display method, verification method, terminal and server | |
| US12032663B2 (en) | Cross-session issuance of verifiable credential | |
| CN120050046A (en) | System comprising TEE (terminal equipment), SE (secure element) electronic signature module and electronic signature system | |
| WO2022073336A1 (en) | Secure payment method and apparatus, electronic device, and storage medium | |
| WO2015109958A1 (en) | Data processing method based on negotiation key, and mobile phone | |
| CN119072898A (en) | Blockchain data processing method, platform, system, device and electronic device | |
| CN115150072A (en) | Cloud network issuance and authentication method, equipment, device and storage medium | |
| JP7677005B2 (en) | Information management system, information management method, server device, and program | |
| WO2016165662A1 (en) | Mobile phone quasi-digital certificate subsystem, and system and method thereof | |
| CN113645239B (en) | Application login method and device, user terminal and storage medium | |
| CN110852756A (en) | A data processing method and device | |
| CN113111283B (en) | Forensic server, forensic server method, storage medium, and program product | |
| KR102123405B1 (en) | System and method for providing security membership and login hosting service |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |
