WO2023060935A1 - 基于沙盒内签名和非对称加密技术的离线检测票务*** - Google Patents

基于沙盒内签名和非对称加密技术的离线检测票务*** Download PDF

Info

Publication number
WO2023060935A1
WO2023060935A1 PCT/CN2022/100980 CN2022100980W WO2023060935A1 WO 2023060935 A1 WO2023060935 A1 WO 2023060935A1 CN 2022100980 W CN2022100980 W CN 2022100980W WO 2023060935 A1 WO2023060935 A1 WO 2023060935A1
Authority
WO
WIPO (PCT)
Prior art keywords
ticket
signature
module
value
information
Prior art date
Application number
PCT/CN2022/100980
Other languages
English (en)
French (fr)
Inventor
张卫平
丁烨
张浩宇
Original Assignee
环球数科集团有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 环球数科集团有限公司 filed Critical 环球数科集团有限公司
Publication of WO2023060935A1 publication Critical patent/WO2023060935A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic 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/3247Cryptographic 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
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B11/00Apparatus for validating or cancelling issued tickets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • H04L63/0442Network 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 wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption

Definitions

  • the invention relates to the technical field of information processing, in particular to an offline detection ticketing system based on sandbox signature and asymmetric encryption technology.
  • the invention provides a ticket system that can check tickets in an offline state and has high anti-counterfeit performance.
  • the methods include: the ticket includes interactive information, and the interactive information includes Check-in information and address of the check-in service.
  • the ticket checking device reads the interaction information of the ticket, and requests the ticket checking service corresponding to the ticket checking service address according to the ticket checking service address included in the interaction information.
  • the ticket inspection service address can be a combination of multiple ticket inspection addresses, thus realizing a variety of different combinations of ticket inspection services, such as ticket inspection services provided by various ticket agents, ticket inspection services jointly provided by ticket agents, unified ticket inspection services, and classified ticket inspection services.
  • the ticket checking service address is the link and bridge of the system, linking the ticketing agent, the ticketing terminal and the ticket checking service.
  • the object of the present invention is, aiming at existing deficiency, has proposed the off-line detection ticketing system based on signature and asymmetric encryption technology in the sandbox,
  • the present invention adopts following technical scheme:
  • An offline detection ticketing system based on signature and asymmetric encryption technology in the sandbox including a signature module, a ticket issuing module and a ticket checking module, the ticket issuing module is used to generate a ticket number, and the signature module and the ticket checking module are respectively equipped with
  • the public key and private key in the asymmetric encryption technology the signature module and the ticket checking module contain the same intermediate number generator, the signature module generates the intermediate number according to the ticket number information and the intermediate number generator, and uses the public key to The intermediate number is encrypted to obtain a signature, and the ticket checking module decrypts the signature with a private key to obtain an intermediate number.
  • the ticket checking module generates an intermediate number according to the ticket number and the intermediate number generator, and checks the two intermediate numbers. If it is correct, the ticket check is successful;
  • the intermediate number generator first generates a large number Z according to the ticket number information and time information:
  • P1 and P2 are two numbers obtained from ticket number information
  • arrays a[i] and b[j] are two arrays obtained from time information
  • n 1 is the length of array a[i]
  • n 2 is The length of the array b[j];
  • ⁇ u i ⁇ is the sequence of prime numbers arranged in ascending order, x i is the number of a certain prime number u i contained in the large number Z, r is the remaining number, and m is the number of prime numbers;
  • the Long() function indicates the number of digits to fetch, and L is the length of the intermediate number
  • the ticket number generated by the ticket issuing module includes two fields, the first field is used to indicate the type of ticket number, and the second part is used to represent the sequence of ticket numbers.
  • the ticket number is generated in the network state
  • the ticket number The type is a continuous ticket, and its ticket number sequence is continuous with the previous ticket number sequence.
  • the ticket number type is a random ticket, and its ticket number sequence is randomly generated;
  • the ticket checking module includes an identification unit and a decryption unit, the identification unit obtains the ticket number information and signature information by identifying the image on the electronic ticket or paper ticket, and the decryption unit decrypts the signature information to obtain the intermediate number;
  • the intermediate number generator is in a sandbox environment, and the internal logic of the intermediate number generator cannot be known by reading the code;
  • the signature module of this system encrypts and signs the ticket number, and the ticket checking module decrypts the signature, so as to achieve high anti-counterfeiting offline detection effect, which is suitable for some remote scenic spots, and can also reduce the network equipment at the ticket checking end and reduce deployment costs.
  • the concept of intermediate numbers is added.
  • the intermediate numbers are related to the ticket number and time, and the generation logic of the intermediate numbers and the encryption and decryption logic of the public and private keys must be mastered at the same time to pass the ticket inspection, which increases the security performance.
  • the ticketing module can also work in disconnected mode, which is convenient for tourists to obtain the ticket number under special circumstances.
  • Figure 1 is a schematic diagram of the overall structural framework
  • Figure 2 is a schematic diagram of the principle of offline ticket checking
  • FIG. 3 is a schematic diagram of the construction example of P1 and P2;
  • Figure 4 is a schematic diagram of the tourist operation process
  • Fig. 5 is a schematic diagram of the processing flow for the same ticket number in ticket checking.
  • This embodiment provides an offline detection ticketing system based on signature and asymmetric encryption technology in the sandbox, in conjunction with Fig. 1 and Fig. 2, including a signature module, a ticket issuing module and a ticket checking module, the ticket issuing module is used to generate a ticket number,
  • the signature module and the ticket checking module are respectively provided with a public key and a private key in asymmetric encryption technology, and the signature module and the ticket checking module contain the same intermediate number generator, and the signature module is based on the ticket number information and
  • the intermediate number generator generates an intermediate number, and encrypts the intermediate number with a public key to obtain a signature, and the ticket checking module decrypts the signature with a private key to obtain an intermediate number, and the ticket checking module generates an intermediate number according to the ticket number and the intermediate number generator. number, and check the two middle numbers, if the check is correct, the ticket check is successful;
  • the intermediate number generator first generates a large number Z according to the ticket number information and time information:
  • P1 and P2 are two numbers obtained from ticket number information
  • arrays a[i] and b[j] are two arrays obtained from time information
  • n 1 is the length of array a[i]
  • n 2 is The length of the array b[j];
  • ⁇ u i ⁇ is the sequence of prime numbers arranged in ascending order, x i is the number of a certain prime number u i contained in the large number Z, r is the remaining number, and m is the number of prime numbers;
  • the Long() function indicates the number of digits to fetch, and L is the length of the intermediate number
  • the ticket number generated by the ticket issuing module includes two fields, the first field is used to represent the ticket number type, and the second part is used to represent the ticket number sequence.
  • the ticket number type is continuous Ticket
  • its ticket number sequence is continuous with the previous ticket number sequence
  • the ticket number type is a random ticket
  • its ticket number sequence is randomly generated;
  • the ticket checking module includes an identification unit and a decryption unit, the identification unit obtains ticket number information and signature information by identifying the image on the electronic ticket or paper ticket, and the decryption unit decrypts the signature information to obtain an intermediate number;
  • the intermediate number generator is in a sandbox environment, and the internal logic of the intermediate number generator cannot be known by reading the code;
  • This embodiment includes all the content of Embodiment 1.
  • This embodiment provides an offline detection ticketing system based on sandbox signature and asymmetric encryption technology, including a signature module, a ticket issuing module and a ticket checking module.
  • the ticket issuing module uses To generate a ticket number, the signature module generates signature information according to the ticket number, and the ticket checking module verifies the signature information and the ticket number. Sexuality, will not affect the system in which it is located;
  • the ticket number generated by the ticketing module has two parts of information, one is the ticket number feature, and the other is the ticket number sequence.
  • the ticket number feature is divided into two parts: There are two types of continuous tickets and random tickets. It is the first digit of the ticket number, which is represented by two different numbers.
  • the ticketing module on the APP and the ticketing module on the website When the APP is connected to the Internet, the ticketing module on the APP and the ticketing module on the website generate It is a continuous ticket, and the ticket number sequence on the continuous ticket is a continuous sequence according to the order of ticket issuance.
  • the ticket issuing module on the APP When the APP is disconnected from the network, the ticket issuing module on the APP generates a random ticket, and the number on the random ticket
  • the ticket number sequence is a random discontinuous sequence, when the tourist gets the ticket number, it represents the reservation status;
  • the signature module is installed on the website or on the signature machine located at the scenic spot.
  • the signature module will generate signature information after receiving the ticket number information and payment information, and will generate a ticket after signing.
  • the ticket contains ticket number information and signature Information, the ticket number information is displayed as numbers, and the signature information is displayed as graphics, including but not limited to barcodes.
  • Tourists can print tickets by themselves, or generate electronic tickets on the APP, or print out tickets on the signature machine. It should be noted that after logging into the APP, it needs to be connected to the Internet to generate payment information.
  • the APP will automatically connect to the signature module on the website to sign. Public key, when the tourist obtains the ticket, it indicates the valid state of ticket purchase;
  • the ticket checking module is installed on a ticket checking machine located at a scenic spot.
  • the ticket checking module includes an identification unit and a decryption unit.
  • the identification unit can identify the ticket number information and signature information on the ticket.
  • the decryption unit contains a private key, The decryption unit uses the private key to process the signature information to obtain the ticket number information, and checks with the ticket number information on the identification unit, and the ticket check is successful after the verification is correct;
  • the public key on the signature module and the private key on the ticket checking module are paired when leaving the factory;
  • the method for signing by the signature module includes the following steps:
  • the signature module reads the ticket number information and converts it into a value n(P), and the value n(P) is a number with a length of 32 bits;
  • the signature module reads the time information and converts it into a value n(T).
  • the n(T) is 0:00:00:00:00:00:00 on January 1, 1970, when the ticket number becomes effective the difference in seconds between
  • the signature module processes the ticket number information and the time information to obtain an intermediate number n(N) whose length is L;
  • the signature module encrypts the intermediate number with a public key to obtain a signature
  • the concrete process that obtains intermediate number n (N) in the step S3 comprises the following steps:
  • the number of prime numbers u i , r is the remaining number, and m is the number of prime numbers. It should be noted that when the factors of a large number do not contain a certain prime number u i , the corresponding x i will be recorded as zero instead of Skip the factor directly;
  • the Long() function indicates the number of digits to fetch
  • the intermediate number is converted into a signature through public key encryption as a plaintext, and the signature is converted into an intermediate number through a private key in the ticket checking module as a ciphertext. These two processes are irreversible.
  • the information and time information are carried out from step S1 to step S3 to obtain the intermediate number, and the ticket checking module compares the two intermediate numbers, and passes the ticket checking after the comparison is correct;
  • the encryption and decryption process is represented by the following formula:
  • the code used to generate the intermediate number in the signature module and the ticket checking module is in a sandbox environment and is unreadable, so the correct signature cannot be obtained only based on the ticket number information and time information, which strengthens the anti-counterfeiting security;
  • the ticket checking module can only pass ticket checking once for the same ticket number information and signature information in the same day, so multiple valid tickets cannot be obtained by copying valid ticket numbers and signature information;
  • the asymmetric encryption algorithm based on the public and private keys uses one of the existing algorithms, but since the intermediate number is not exposed to the outside world, it is impossible for the outside world to analyze which algorithm is used;
  • the signature module When the signature module signs in the network mode, it can confirm that all continuous ticket numbers are not repeated through the network. If it is found that the random ticket numbers are the same, it will modify the ticket number of the random ticket signed later to ensure that the random ticket number is not repeated. The ticket number is also different;
  • the signature module when the signature module on the signature machine signs in the disconnected mode, the signature module will add label information to the signature information, and in step S1, the value n(P) is reversed, and if it is found to be the same When the random ticket number is selected, add 1 to the value n(P) arranged in reverse order;
  • the ticket checking device When the ticket checking device detects the marking information, when calculating the intermediate number according to the ticket number information and time information, it will also first arrange the value n(P) in reverse order, and then check the intermediate number. If the check is invalid, then After adding 1 to the logarithmic value n(P), recalculate the intermediate number and check it;

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明提供了基于沙盒内签名和非对称加密技术的离线检测票务***,包括签名模块、出票模块和检票模块,所述出票模块用于产生票号,所述签名模块和所述检票模块各自设有非对称加密技术中的公钥和私钥,所述签名模块和所述检票模块含有相同的中间数生成器,所述签名模块根据票号信息和中间数生成器生成中间数,并用公钥对所述中间数进行加密得到签名,所述检票模块对签名用私钥进行解密得到中间数,所述检票模块根据票号和中间数生成器生成中间数,并将两个中间数进行核对,核对无误后则检票成功;该***保障安全性的前提下能够在离线状态下进行检票,降低在一些偏远地区的景区对网络的依赖度,降低部署检票机的复杂度。

Description

基于沙盒内签名和非对称加密技术的离线检测票务*** 技术领域
本发明涉及信息处理技术领域,尤其涉及基于沙盒内签名和非对称加密技术的离线检测票务***。
背景技术
当前景区的票务***大部分是联网的,能够保证门票的真实性,但在一些网络不完善的景区,通过人工检票来识别门票的真实性,但这种方法存在安全漏洞,无法识别伪装程度高的假票,本发明提供了一种能够在离线状态下进行检票,同时具有高防伪性的票务***。
现在已经开发出了很多票务***,经过我们大量的检索与参考,发现现有的票务***有如公开号为KR100184696B1,KR100646066B1、CN107578479B和KR100263937B1所公开的***,方法包括:票包括交互信息,交互信息包括检票信息和检票服务地址。检票装置读取票的交互信息,根据交互信息包括的检票服务地址,请求检票服务地址对应的检票服务。检票服务地址可以是多种检票地址的组合,从而实现了多种不同组合的检票服务,譬如各票务代理提供检票服务、票务代理联合提供检票服务、统一的检票服务和分类的检票服务等。票的检票服务地址为***的纽带和桥梁,将票务代理、购票终端和检票服务联系起来。
技术解决方案
本发明的目的在于,针对所存在的不足,提出了基于沙盒内签名和非对称加密技术的离线检测票务***,
本发明采用如下技术方案:
基于沙盒内签名和非对称加密技术的离线检测票务***,包括签名模块、出票模块和检票模块,所述出票模块用于产生票号,所述签名模块和所述检票模块各自设有非对称加密技术中的公钥和私钥,所述签名模块和所述检票模块含有相同的中间数生成器,所述签名模块根据票号信息和中间数生成器生成中间数,并用公钥对所述中间数进行加密得到签名,所述检票模块对签名用私钥进行解密得到中间数,所述检票模块根据票号和中间数生成器生成中间数,并将两个中间数进行核对,核对无误后则检票成功;
所述中间数生成器先根据票号信息和时间信息生成一个大数Z:
Figure 50213dest_path_image001
其中,P1和P2为由票号信息得的两个数,数组a[i]和b[j]为由时间信息得到的两个数组,n 1为数组a[i]的长度,n 2为数组b[j]的长度;
将所述大数Z因式分解得到:
Figure 155310dest_path_image002
其中,{u i}为升序排列的质数数列,x i为大数Z中含有的某一质数u i的个数,r为剩余数,m为质数的个数;
r和m需满足的条件为:
Figure 492882dest_path_image003
其中,Long()函数表示取数的位数,L为中间数的长度;
将数列{x i}和r拼接成长度为L的中间数;
进一步的,所述出票模块产生的票号包括两个字段,第一字段用于表示票号种类,第二部分用于表示票号序列,当票号是在联网状态下产生时,票号种类为连续票,其票号序列与上一个票号序列连续,当票号在断网状态下产生时,票号种类为随机票,其票号序列为随机产生;
进一步的,所述检票模块包括识别单元和解密单元,所述识别单元通过识别电子票或纸质票上的图像得到票号信息和签名信息,所述解密单元对所述签名信息进行解密得到中间数;
进一步的,所述中间数生成器处于沙盒环境,无法通过读取代码来获知中间数生成器的内在逻辑;
进一步的,所述P1、P2的构建方法为:
将时间信息用二进制表示,数值为1的位数形成数组a[i],数值为0的位数形成数组b[i],将票号信息中位于数组a[i]中的数按顺序重新构成一个长度为n 1的数值P1,将票号信息中位于数组b[i]中的数按顺序重新构成一个长度为n 2的数值P2。
有益效果
本发明所取得的有益效果是:
本***的签名模块对票号进行加密签名,检票模块对签名进行解密,从而实现高防伪性的离线检测效果,适合一些偏远景区,同时也可以减少检票端的网络设备,降低部署成本,本***在加密和解密过程中添加了中间数概念,所述中间数与票号和时间相关,必须同时掌握中间数的生成逻辑和公私钥的加解密逻辑才能通过检票,加大了安全性能,本发明的出票模块也能够在断网模式下进行工作,方便游客在特殊环境下获取票号。
附图说明
从以下结合附图的描述可以进一步理解本发明。图中的部件不一定按比例绘制,而是将重点放在示出实施例的原理上。在不同的视图中,相同的附图标记指定对应的部分。
图1为整体结构框架示意图;
图2为离线检票原理示意图;
图3为,P1、P2构建示例示意图;
图4为游客操作流程示意图;
图5为检票中对相同票号的处理流程示意图。
本发明的实施方式
为了使得本发明的目的、技术方案及优点更加清楚明白,以下结合其实施例,对本发明进行进一步详细说明;应当理解,此处所描述的具体实施例仅用于解释本发明,并不用于限定本发明。对于本领域技术人员而言,在查阅以下详细描述之后,本实施例的其它***、方法和/或特征将变得显而易见。旨在所有此类附加的***、方法、特征和优点都包括在本说明书内,包括在本发明的范围内,并且受所附权利要求书的保护。在以下详细描述描述了所公开的实施例的另外的特征,并且这些特征根据以下将详细描述将是显而易见的。
本发明实施例的附图中相同或相似的标号对应相同或相似的部件;在本发明的描述中,需要理解的是,若有术语“上”、“下”、“左”、“右”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或组件必须具有特定的方位,以特定的方位构造和操作,因此附图中描述位置关系的用语仅用于示例性说明,不能理解为对本专利的限制,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。
实施例一。
本实施例提供了基于沙盒内签名和非对称加密技术的离线检测票务***,结合图1和图2,包括签名模块、出票模块和检票模块,所述出票模块用于产生票号,所述签名模块和所述检票模块各自设有非对称加密技术中的公钥和私钥,所述签名模块和所述检票模块含有相同的中间数生成器,所述签名模块根据票号信息和中间数生成器生成中间数,并用公钥对所述中间数进行加密得到签名,所述检票模块对签名用私钥进行解密得到中间数,所述检票模块根据票号和中间数生成器生成中间数,并将两个中间数进行核对,核对无误后则检票成功;
所述中间数生成器先根据票号信息和时间信息生成一个大数Z:
Figure 184894dest_path_image004
其中,P1和P2为由票号信息得的两个数,数组a[i]和b[j]为由时间信息得到的两个数组,n 1为数组a[i]的长度,n 2为数组b[j]的长度;
将所述大数Z因式分解得到:
Figure 626633dest_path_image005
其中,{u i}为升序排列的质数数列,x i为大数Z中含有的某一质数u i的个数,r为剩余数,m为质数的个数;
r和m需满足的条件为:
Figure 415598dest_path_image006
其中,Long()函数表示取数的位数,L为中间数的长度;
将数列{x i}和r拼接成长度为L的中间数;
所述出票模块产生的票号包括两个字段,第一字段用于表示票号种类,第二部分用于表示票号序列,当票号是在联网状态下产生时,票号种类为连续票,其票号序列与上一个票号序列连续,当票号在断网状态下产生时,票号种类为随机票,其票号序列为随机产生;
所述检票模块包括识别单元和解密单元,所述识别单元通过识别电子票或纸质票上的图像得到票号信息和签名信息,所述解密单元对所述签名信息进行解密得到中间数;
所述中间数生成器处于沙盒环境,无法通过读取代码来获知中间数生成器的内在逻辑;
所述P1、P2的构建方法为:
将时间信息用二进制表示,数值为1的位数形成数组a[i],数值为0的位数形成数组b[i],将票号信息中位于数组a[i]中的数按顺序重新构成一个长度为n 1的数值P1,将票号信息中位于数组b[i]中的数按顺序重新构成一个长度为n 2的数值P2
实施例二。
本实施例包含了实施例一的全部内容,本实施例提供了基于沙盒内签名和非对称加密技术的离线检测票务***,包括签名模块、出票模块和检票模块,所述出票模块用于生成一个票号,所述签名模块根据票号生成签名信息,所述检票模块对所述签名信息和票号进行验证,上述三个模块互相处于离线状态以及沙盒环境,具有较强的独立性,不会对所处的***造成影响;
结合图4,游客通过登录APP或者登录网站访问所述出票模块,所述出票模块产生的票号具有两部分信息,一是票号特征,二是票号序列,所述票号特征分为连续票和随机票两类,为票号的首位数字,用不同的两个数字表示,当APP处于联网状态时,所述APP上的出票模块与所述网站上的出票模块产生的是连续票,所述连续票上的票号序列根据出票的先后顺序为连续的数列,当APP处于断网状态时,所述APP上的出票模块产生的时随机票,随机票上的票号序列为随机不连续的数列,当游客获得票号后,表示为预约状态;
所述签名模块安装于网站或者位于景点的签名机上,所述签名模块在接收到票号信息以及付费信息后会生成签名信息,完成签名后会生成票据,所述票据上含有票号信息和签名信息,所述票号信息显示为数字,所述签名信息显示为图形,包括但不限于条形码,游客能够自行打印票据,或是在APP上生成电子票据,或是在签名机上打印出票据,需要注意的是,登录APP后需要联网才能产生付费信息,当游客在APP上进行签名时,所述APP会自动连接到位于网站上的签名模块进行签名,所述签名模块上含有非对称加密中的公钥,当游客获得票据后,表示为购票生效状态;
所述检票模块安装于位于景点处的检票机上,所述检票模块包括识别单元和解密单元,所述识别单元能够识别出票据上的票号信息和签名信息,所述解密单元内含有私钥,所述解密单元利用私钥对签名信息进行处理得到票号信息,并与所述识别单元上的票号信息进行核对,核对无误后检票成功;
所述签名模块上的公钥和所述检票模块上的私钥在出厂时进行配对设置;
结合图3,所述签名模块进行签名的方法包括如下步骤:
S1、所述签名模块读取票号信息并转换为数值n(P),所述数值n(P)为长度为32位的数;
S2、所述签名模块读取时间信息并转换为数值n(T),所述n(T)为票号生效日的零点零分零秒与1970年1月1日零点零分零秒之间的秒数差;
S3、所述签名模块对所述票号信息和所述时间信息进行处理得到一段长为L的中间数n(N);
S4、所述签名模块用公钥对所述中间数进行加密得到签名;
步骤S3中得到中间数n(N)的具体过程包括如下步骤:
S21、将所述数值n(T)用32位的二进制表示;
S22、读取所述数值n(T)中数值为1的位数形成数组a[i],所述数组a[i]的成员个数为n 1,读取所述数值n(T)中数值为0的位数形成数组b[i],所述数组b[i]的成员个数为n 2,n 1+n 2=32;
S23、将所述数值n(P)中位于数组a[i]中的数按顺序重新构成一个长度为n 1的数值P1,将所述数值n(P)中位于数组b[i]中的数按顺序重新构成一个长度为n 2的数值P2;
S24、计算一个大数Z:
Figure 251967dest_path_image007
S25、将所述大数Z因式分解得到:
Figure 290330dest_path_image008
其中,{u i}为升序排列的质数数列,例如:u 1=2,u 2=3,u 3=5,u 4=7,...,x i为大数Z中含有的某一质数u i的个数,r为剩余数,m为质数的个数,需要注意的是,当大数的因数中不包含某一个质数u i时,其对应的x i记为零,而不是直接略过该因数;
r和m需满足的条件为:
Figure 971978dest_path_image006
其中,Long()函数表示取数的位数;
S26、将所述数列x i和r拼接成长度为L的中间数n(N),其中,r置于中间数n(N)的末端;
所述中间数作为明文通过公钥加密变成签名,所述签名作为密文在所述检票模块中通过私钥变成中间数,这两个过程均不可逆,而所述检票模块中根据票号信息和时间信息进行步骤S1至步骤S3过程得到中间数,所述检票模块将两个中间数进行对比,对比无误后通过检票;
加密解密过程用下式表示:
Figure 349870dest_path_image009
在所述签名模块和所述检票模块中的用于生成中间数的代码处于沙盒环境且不可读,所以无法仅根据票号信息和时间信息得到正确的签名,加强了防伪安全性;
所述检票模块在同一天时间内对同一票号信息和签名信息只能通过一次检票,所以无法通过复制有效的票号和签名信息来获得多张有效的票据;
所述公私钥基于的非对称加密算法采用现有算法中的其中一种,但由于中间数不对外暴露,所以外界无法解析出采用的具体哪种算法;
所述签名模块在联网模式下进行签名时,能够通过网络确认所有的连续票票号不重复,若发现有随机票的票号相同,会对后签名的随机票进行票号修改,确保随机票的票号也不同;
结合图5,当签名机上的签名模块在断网模式下进行签名时,所述签名模块会对签名信息添加标注信息,并且在步骤S1中对数值n(P)进行倒序排列,若发现是相同的随机票号时,则对倒序排列的数值n(P)再加1;
当所述检票装置检测到标注信息时,在根据票号信息和时间信息进行中间数计算时,也会先对数值n(P)进行倒序排列,再进行中间数的核对,若核对无效,则对数值n(P)加1后重新计算中间数并核对;
由于随机票号是随机生成的,在同一天内出现相同的随机票号的概率极低,出现三个相同随机票号的情况视为不可能,所以在对倒序排列的数值n(P)最多只加1进行重新核对。
虽然上面已经参考各种实施例描述了本发明,但是应当理解,在不脱离本发明的范围的情况下,可以进行许多改变和修改。也就是说上面讨论的方法,***和设备是示例。各种配置可以适当地省略,替换或添加各种过程或组件。例如,在替代配置中,可以以与所描述的顺序不同的顺序执行方法,和/或可以添加,省略和/或组合各种部件。而且,关于某些配置描述的特征可以以各种其他配置组合,如可以以类似的方式组合配置的不同方面和元素。此外,随着技术发展其中的元素可以更新,即许多元素是示例,并不限制本公开或权利要求的范围。
在说明书中给出了具体细节以提供对包括实现的示例性配置的透彻理解。然而,可以在没有这些具体细节的情况下实践配置例如,已经示出了众所周知的电路,过程,算法,结构和技术而没有不必要的细节,以避免模糊配置。该描述仅提供示例配置,并且不限制权利要求的范围,适用性或配置。相反,前面对配置的描述将为本领域技术人员提供用于实现所描述的技术的使能描述。在不脱离本公开的精神或范围的情况下,可以对元件的功能和布置进行各种改变。
综上,其旨在上述详细描述被认为是例示性的而非限制性的,并且应当理解,以上这些实施例应理解为仅用于说明本发明而不用于限制本发明的保护范围。在阅读了本发明的记载的内容之后,技术人员可以对本发明作各种改动或修改,这些等效变化和修饰同样落入本发明权利要求所限定的范围。

Claims (4)

  1. 基于沙盒内签名和非对称加密技术的离线检测票务***,其特征在于,包括签名模块、出票模块和检票模块,所述出票模块用于产生票号,所述签名模块和所述检票模块各自设有非对称加密技术中的公钥和私钥,所述签名模块和所述检票模块含有相同的中间数生成器,所述签名模块根据票号信息和中间数生成器生成中间数,并用公钥对所述中间数进行加密得到签名,所述检票模块对签名用私钥进行解密得到中间数,所述检票模块根据票号和中间数生成器生成中间数,并将两个中间数进行核对,核对无误后则检票成功;
    所述签名模块进行签名的方法包括如下步骤:
    S1、所述签名模块读取票号信息并转换为数值n(P),所述数值n(P)为长度为32位的数;
    S2、所述签名模块读取时间信息并转换为数值n(T),所述n(T)为票号生效日的零点零分零秒与1970年1月1日零点零分零秒之间的秒数差;
    S3、所述签名模块对所述票号信息和所述时间信息进行处理得到一段长为L的中间数n(N);
    S4、所述签名模块用公钥对所述中间数进行加密得到签名;
    步骤S3中得到中间数n(N)的具体过程包括如下步骤:
    S21、将所述数值n(T)用32位的二进制表示;
    S22、读取所述数值n(T)中数值为1的位数形成数组a[i],所述数组a[i]的成员个数为n 1,读取所述数值n(T)中数值为0的位数形成数组b[j],所述数组b[j]的成员个数为n 2,n 1+n 2=32;
    S23、将所述数值n(P)中位于数组a[i]中的数按顺序重新构成一个长度为n 1的数值P1,将所述数值n(P)中位于数组b[j]中的数按顺序重新构成一个长度为n 2的数值P2;
    所述中间数生成器根据票号信息和时间信息生成一个大数Z:
    Figure 398598dest_path_image001
    将所述大数Z因式分解得到:
    Figure 658678dest_path_image002
    其中,{u i}为升序排列的质数数列,x i为大数Z中含有的某一质数u i的个数,r为剩余数,m为质数的个数;
    r和m需满足的条件为:
    Figure 908132dest_path_image003
    其中,Long()函数表示取数的位数,L为中间数的长度;
    将数列{x i}和r拼接成长度为L的中间数。
  2. 如权利要求1所述的基于沙盒内签名和非对称加密技术的离线检测票务***,其特征在于,所述出票模块产生的票号包括两个字段,第一字段用于表示票号种类,第二部分用于表示票号序列,当票号是在联网状态下产生时,票号种类为连续票,其票号序列与上一个票号序列连续,当票号在断网状态下产生时,票号种类为随机票,其票号序列为随机产生。
  3. 如权利要求2所述的基于沙盒内签名和非对称加密技术的离线检测票务***,其特征在于,所述检票模块包括识别单元和解密单元,所述识别单元通过识别电子票或纸质票上的图像得到票号信息和签名信息,所述解密单元对所述签名信息进行解密得到中间数。
  4. 如权利要求3所述的基于沙盒内签名和非对称加密技术的离线检测票务***,其特征在于,所述中间数生成器处于沙盒环境,无法通过读取代码来获知中间数生成器的内在逻辑。
PCT/CN2022/100980 2021-10-13 2022-06-24 基于沙盒内签名和非对称加密技术的离线检测票务*** WO2023060935A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111189992.3A CN113630261B (zh) 2021-10-13 2021-10-13 基于沙盒内签名和非对称加密技术的离线检测票务***
CN202111189992.3 2021-10-13

Publications (1)

Publication Number Publication Date
WO2023060935A1 true WO2023060935A1 (zh) 2023-04-20

Family

ID=78391207

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100980 WO2023060935A1 (zh) 2021-10-13 2022-06-24 基于沙盒内签名和非对称加密技术的离线检测票务***

Country Status (2)

Country Link
CN (1) CN113630261B (zh)
WO (1) WO2023060935A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113630261B (zh) * 2021-10-13 2021-12-17 环球数科集团有限公司 基于沙盒内签名和非对称加密技术的离线检测票务***

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005128755A (ja) * 2003-10-23 2005-05-19 Nippon Telegr & Teleph Corp <Ntt> チケット改札代行システム
US20050176489A1 (en) * 2002-05-03 2005-08-11 Rudiger Kroll Data processing system for the organisation of lotteries
CN101499181A (zh) * 2009-02-20 2009-08-05 颜海滨 无人自动售票和验票***
CN103400418A (zh) * 2013-07-26 2013-11-20 电子科技大学 一种基于nfc移动终端的电子票务售票和检票方法
CN112041897A (zh) * 2019-01-10 2020-12-04 环球雅途集团有限公司 一种控制方法、售票规则服务器、检票规则服务器及装置
CN113630261A (zh) * 2021-10-13 2021-11-09 环球数科集团有限公司 基于沙盒内签名和非对称加密技术的离线检测票务***

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7523490B2 (en) * 2002-05-15 2009-04-21 Microsoft Corporation Session key security protocol
CN103067164A (zh) * 2013-01-17 2013-04-24 北京昆腾微电子有限公司 使用rsa公开密钥加密算法的电子部件中的防攻击方法
CN109379185B (zh) * 2018-10-22 2021-04-27 飞天诚信科技股份有限公司 一种安全的rsa运算实现方法及装置
CN109948369A (zh) * 2018-12-29 2019-06-28 航天信息股份有限公司 一种利用票据的可打印数据生成电子化版式文件的方法及***
CN112926974B (zh) * 2019-12-06 2024-02-13 环球数科集团有限公司 一种基于分布式账本原理的可离线票防伪方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050176489A1 (en) * 2002-05-03 2005-08-11 Rudiger Kroll Data processing system for the organisation of lotteries
JP2005128755A (ja) * 2003-10-23 2005-05-19 Nippon Telegr & Teleph Corp <Ntt> チケット改札代行システム
CN101499181A (zh) * 2009-02-20 2009-08-05 颜海滨 无人自动售票和验票***
CN103400418A (zh) * 2013-07-26 2013-11-20 电子科技大学 一种基于nfc移动终端的电子票务售票和检票方法
CN112041897A (zh) * 2019-01-10 2020-12-04 环球雅途集团有限公司 一种控制方法、售票规则服务器、检票规则服务器及装置
CN113630261A (zh) * 2021-10-13 2021-11-09 环球数科集团有限公司 基于沙盒内签名和非对称加密技术的离线检测票务***

Also Published As

Publication number Publication date
CN113630261A (zh) 2021-11-09
CN113630261B (zh) 2021-12-17

Similar Documents

Publication Publication Date Title
US7249102B1 (en) Original data circulation method, system, apparatus, and computer readable medium
CN111770199B (zh) 一种信息共享方法、装置及设备
CN106097073A (zh) 一种用区块链来赋予数字账户交易过程独有id的方法
US20070168291A1 (en) Electronic negotiable documents
CN111460525B (zh) 一种基于区块链的数据处理方法、装置及存储介质
CN106452775A (zh) 实现电子签章的方法、装置及签章服务器
JP2002514799A (ja) 認証された文書の電子的送信、格納および検索システムおよび方法
CN106845275B (zh) 一种隐私保护的电子票据管理***与方法
CN113704775B (zh) 一种基于分布式数字身份的业务处理方法及相关装置
CN110290134A (zh) 一种身份认证方法、装置、存储介质及处理器
CN113112252B (zh) 基于区块链的资源转移方法、装置、电子设备及存储介质
CN106790045A (zh) 一种基于云环境分布式虚拟机代理架构及数据完整性保障方法
CN112202794A (zh) 交易数据的保护方法、装置、电子设备和介质
WO2023060935A1 (zh) 基于沙盒内签名和非对称加密技术的离线检测票务***
CN109831312A (zh) 可连接环签名方法、装置、设备以及存储介质
CA2212457C (en) Electronic negotiable documents
CN113537982B (zh) 金融设备的安全校验方法、装置、设备及存储介质
Naser et al. QR code based two-factor authentication to verify paper-based documents
Dosdale Security in EDIFACT systems
Park et al. OPERA: A Complete Offline and Anonymous Digital Cash Transaction System with a One-Time Readable Memory
CN116094726B (zh) 一种基于格公钥密码的部分盲签名方法及***
WO2024150392A1 (ja) 署名生成装置、署名生成方法、及びプログラム
CN112926924B (zh) 一种信息处理方法、装置、电子设备和存储介质
KR20020037188A (ko) 전자 영수증 발급 및 공증 장치와 그 방법
KR100309559B1 (ko) 디지털서명가시화장치및그방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22879882

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE