Online lottery management method, system, device and medium based on national secret algorithm
By adopting the collaborative signature technology of the China Secret algorithm in the mobile lottery purchasing system, the user's private key is divided into two parts, which solves the problem of difficult to determine the identity authenticity and lottery ownership in the mobile lottery purchasing system, and realizes the security and credibility of the lottery purchasing process.
Patent Information
- Application Number
- CN202411922795.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-25
AI Technical Summary
There are problems such as difficulty in determining the identity authenticity of mobile lottery purchases, difficulty in defining the ownership of lottery, tickets on the agency platform, and false bonuses, which leads to unsafe and untrustworthy lottery purchase process.
The online lottery management method based on the National Secret algorithm is adopted. By dividing the user's private key into two pieces and saving it on the mobile terminal and the official platform, collaborative signature technology is realized, digital signature of ticket purchase and prize redemption information is ensured, and the ownership rights of lottery data are established.
It solves the problems of difficulty in determining the authenticity of mobile lottery players, difficult to define the ownership of lottery, and the agency sales platform's tickets and the bonuses are being misapproved, and the security and credibility of the lottery purchasing process are realized, ensuring the clarification of ownership of digital lottery and the security of the prize redemption process.
Smart Images

Figure CN119382903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lottery management technology, and in particular to an online lottery management method, system, device and medium based on a national secret algorithm. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] There are many unsafe factors in implementing lottery entertainment activities through mobile APP, which has the following adverse effects on the development of lottery business:
[0004] (1) It is difficult to determine the authenticity of the mobile lottery player’s identity. It is difficult to determine whether the initiator of the lottery purchase is the person who is doing the operation and whether he or she is willing to participate in the lottery purchase and entertainment activities.
[0005] (2) Lottery ownership is difficult to define. Offline lottery tickets are confirmed by the ticket holder, and ownership is obtained by receiving the machine-printed ticket or holding the instant lottery ticket. Since electronic lottery tickets are transmitted through data, there is no reliable information to prove who the lottery ticket belongs to, making it difficult to determine ownership.
[0006] (3) There is a problem of ticket sales platforms eating up tickets. Since there is no clear ownership of ticket issuance data, the sales platform can apply for the data of a single lottery ticket, deduct the bet amount of the lottery ticket, and resend the data of the lottery ticket to multiple mobile lottery players, while deducting the bet amount of each mobile lottery player. This is especially true in the case of multiple sales of instant lottery tickets. After obtaining the official platform data, the sales platform can identify the winning amount of the ticket. The sales platform can distribute the data of non-winning tickets to multiple mobile lottery players, thereby eating up the lottery players' lottery purchase money.
[0007] (4) There is a risk of the winning prize being claimed by someone else. For lottery tickets that are about to expire but have not been claimed, someone who has access to the lottery information can pretend to be the lottery buyer and claim the prize, causing the actual winner to lose the prize.
[0008] (5) There is a security risk in verifying the authenticity of a ticket on an official website based solely on the digital security code, because the ownership of the lottery data itself is not fully protected and it is impossible to confirm whether the security code belongs to the sole owner. Summary of the invention
[0009] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides an online lottery purchase management method, system, device and medium based on the national secret algorithm. Through the present invention, the entire lottery purchase process is made safe and reliable, the ownership of digital lottery tickets is clarified, and the prize redemption process is made safe and reliable.
[0010] In order to achieve the above object, the present invention adopts the following technical solution:
[0011] The first aspect of the present invention provides an online lottery management method based on a national secret algorithm.
[0012] An online lottery management method based on a national secret algorithm, comprising:
[0013] The user's private key is divided into two parts. One mobile private key component is stored in the mobile terminal, and the other server private key component is stored in the official platform's server.
[0014] When purchasing a ticket, the mobile terminal and the service terminal first use their respective private key components to jointly sign the ticket purchase information, and then synthesize them on the mobile terminal to generate a first synthetic signature; the mobile terminal sends the first synthetic signature to the agency platform so that the agency platform verifies the first synthetic signature. After successful verification, the validity of the user's purchase of the game is determined and the user's betting money is deducted; the ticket issuance request data composed of the ticket purchase information and the agency platform information is signed, and the obtained first agency signature is sent to the official platform so that the official platform issues the ticket after successfully verifying the synthetic signature and the first agency signature; the official platform signs the ticket issuance information, user information and agency platform information to generate an official platform signature; the official platform sends the ticket purchase result to the mobile terminal via the agency platform; the ticket purchase result includes the official platform signature and the ticket purchase information.
[0015] Furthermore, after receiving the ticket purchase result, the mobile terminal verifies the signature of the official platform. If the verification is successful, the verification success information is displayed. If the verification fails, a verification exception prompt is given, and the anti-counterfeiting code of the ticket purchase information is verified through the ticket verification window of the official website.
[0016] Furthermore, when redeeming the prize, the mobile terminal and the service terminal first use their respective private key components to jointly sign the prize redemption information, and then synthesize them on the mobile terminal to generate a second synthesized signature; the mobile terminal sends the second synthesized signature to the agency platform, so that the agency platform verifies the second synthesized signature. After successful verification, the winning amount is calculated, and the prize redemption application data composed of the prize redemption information and the agency platform information is signed to generate a second agency signature; and the second agency signature is sent to the official platform, so that the official platform verifies the second synthesized signature and the second agency signature. After successful verification, the prize is transferred to the applicant's account.
[0017] Furthermore, a public key is generated based on the private key component of the mobile terminal or the private key component of the server terminal, the mobile terminal applies for a personal digital certificate request from the server terminal based on the public key, the server terminal verifies the identity information of the mobile terminal user, and after the verification is passed, retrieves the personal digital certificate generated by the third-party CA organization; the first synthetic signature and the second synthetic signature both include the personal digital certificate, ticket purchase information / prize redemption information, and a hash value of the ticket purchase information / prize redemption information.
[0018] Furthermore, the ticket purchase information includes the game type code, issue number, number of bets, bet code, betting method and account ID, the agency platform information includes the agency platform ID information, the user information includes the user account ID information, and the ticket issuance information includes the game type, issue number, ticket number, anti-counterfeiting code, ticket issuance time, bet code and betting method.
[0019] Furthermore, the method of dividing the user private key into two parts includes: the mobile terminal generates a random number Da as a mobile terminal private key component, and the value satisfies Da∈[1,n-1]; the server terminal generates a random number Db as a server terminal private key component according to the same rule, and satisfies Db∈[1,n-1]; wherein n is a large prime number.
[0020] The second aspect of the present invention provides an online lottery management system based on a national secret algorithm.
[0021] An online lottery management system based on a national secret algorithm, comprising:
[0022] The private key generation module is used to divide the user's private key into two parts, one mobile private key component is stored in the mobile terminal, and the other server private key component is stored in the server of the official platform;
[0023] The ticket purchasing module is used for, when purchasing tickets, the mobile terminal and the service terminal first use their respective private key components to jointly sign the ticket purchasing information, and then synthesize them on the mobile terminal to generate a first synthetic signature; the mobile terminal sends the first synthetic signature to the agency sales platform, so that the agency sales platform verifies the first synthetic signature, and after successful verification, determines the validity of the user's purchase of the gameplay and deducts the user's betting money; signs the ticket issuance request data composed of the ticket purchasing information and the agency sales platform information, and sends the obtained first agency sales signature to the official platform, so that the official platform issues the ticket after successfully verifying the synthetic signature and the first agency sales signature; the official platform signs the ticket issuance information, user information and agency sales platform information to generate an official platform signature; the official platform sends the ticket purchase result to the mobile terminal via the agency sales platform; the ticket purchase result includes the official platform signature and the ticket purchase information.
[0024] Furthermore, the online lottery management system based on the national secret algorithm also includes a prize redemption module, which is used for, when redeeming the prize, the mobile terminal and the server terminal first use their respective private key components to jointly sign the prize redemption information, and then synthesize them on the mobile terminal to generate a second synthetic signature; the mobile terminal sends the second synthetic signature to the agency platform, so that the agency platform verifies the second synthetic signature. After the verification is successful, the winning amount is calculated, and the prize redemption application data composed of the prize redemption information and the agency platform information is signed to generate a second agency signature; and the second agency signature is sent to the official platform, so that the official platform verifies the second synthetic signature and the second agency signature. After the verification is successful, the prize is transferred to the applicant's account.
[0025] A third aspect of the present invention provides a computer-readable storage medium.
[0026] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the online lottery management method based on the national secret algorithm as described in the first aspect above.
[0027] A fourth aspect of the present invention provides a computer device.
[0028] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the online lottery management method based on the national secret algorithm as described in the first aspect above are implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] (1) Solve the digital identity of mobile lottery players. Mobile lottery players apply for SM2 personal digital certificates through the collaborative signature system on the mobile terminal, and use collaborative signature technology to implement mobile lottery players' digital signatures, ensuring that the identity of mobile lottery players is authentic and trustworthy during business interactions.
[0031] (2) Determine the ownership of lottery data. Use digital signature technology to determine the ownership of lottery data, and preserve the integrity of the ticket data and application information to facilitate evidence.
[0032] (3) Use signature verification technology to verify the authenticity of the ticket, verify whether the ticket has been confirmed by the official platform, and verify whether the ticket contains the applicant's information.
[0033] (4) Prevent the sales agent from stealing the tickets. By signing the lottery purchase information on the official platform, lottery buyers can see that their lottery purchase request information has been approved and confirmed by the official platform, preventing the sales agent from issuing fake tickets or not issuing equal lottery tickets as agreed, such as issuing the same ticket to multiple people or multiple tickets containing unofficial ticket data, privately generated and other violations.
[0034] (5) To prevent the prize money from being illegally claimed by others, mobile lottery players sign the prize redemption application information when redeeming the prize. The official platform verifies the authenticity of the prize redeemer's identity through the signature information, and at the same time checks that the lottery purchase signature information and the prize redemption signature information are consistent from the source before the prize is transferred.
[0035] (6) To prevent the sales agent from denying the prize money, by signing the official platform, mobile lottery users can provide more evidence and use digital technology to prove the existence and legality of previous lottery purchases, thus preventing the sales agent from denying the prize money. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0037] Figure 1 It is a flow chart of an online lottery purchase management method based on a national secret algorithm shown in the present invention;
[0038] Figure 2 It is a flow chart of key security generation shown in the present invention;
[0039] Figure 3 It is a flow chart of a user applying for a digital certificate shown in the present invention;
[0040] Figure 4 is a flowchart of collaborative signing shown in the present invention;
[0041] Figure 5 is a flow chart of secure ticket purchase shown in the present invention;
[0042] Figure 6 It is a flow chart of mobile terminal ticket checking shown in the present invention;
[0043] Figure 7 is a flow chart of safe prize redemption shown in the present invention;
[0044] Figure 8 It is a structural diagram of an online lottery management system based on a national secret algorithm shown in the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0046] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0047] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0048] Terminology explanation:
[0049] (1) National secret algorithm: a cryptographic algorithm system designed to protect the confidentiality, integrity and availability of important information, including SM2 / SM3 / SM4, etc.
[0050] (2) Mobile lottery purchasing system: A mobile lottery distribution platform that enables online lottery purchasing and entertainment through a mobile APP. On this platform, lottery entertainment activities such as purchasing, checking tickets, and redeeming prizes can be realized.
[0051] (3) Digital certificate: A digital certificate is a digital credential used to confirm the identity of a subject and is issued by a trusted third-party organization (such as a CA) or a self-built CA.
[0052] (4) Digital signature: an identity authentication technology based on public key cryptography.
[0053] (5) Collaborative signature: A digital signature scheme involving multiple parties. Its core concept is to split the private key into multiple parts while keeping the public key unchanged. These private key components are used to sign messages one by one, and the final signature value can be verified using the public key.
[0054] (6) Key splitting: Key splitting is a security technology used to split a key into multiple parts to enhance the security and confidentiality of the key.
[0055] (7) Ticket stealing: An illegal fraudulent act in which, after a lottery player has paid the lottery money as agreed, the sales outlet or sales agency fails to issue a genuine ticket in full as agreed, or issues a fake ticket to deceive the lottery player.
[0056] (8) Fraudulently claiming prize money: Some sales outlets or platforms fail to redeem prize money as agreed, and illegally claim prize money on behalf of the winner.
[0057] Embodiment 1
[0058] The core cryptographic algorithm of the present invention adopts the domestic algorithm SM2 / SM3 / SM4. Among them, SM2 asymmetric cryptographic technology is used to implement signature and signature verification, SM3 digital summary technology is used to implement HASH value calculation, and SM4 symmetric encryption technology is used for symmetric encryption and decryption; the user's private key is safely stored, and the user's public key is publicly released as part of the digital certificate.
[0059] like Figure 1 As shown, this embodiment provides an online lottery management method based on a national secret algorithm, including:
[0060] Step 1: Securely generate user private key and apply for digital certificate
[0061] In the cryptographic system, private keys and digital certificates play a vital role. The combination of private keys and digital certificates ensures the confidentiality, integrity and authenticity of communication data.
[0062] This system uses advanced threshold ideas to implement key block storage, that is, the user's private key is divided into two parts using key splitting technology. One component is stored in the mobile terminal security password module, and the other component is stored in the collaborative signature server. When signing, collaborative signature technology is used, which requires confirmation from the mobile terminal, and the collaboration of both ends can complete the digital signature. This method further enhances the security and confidentiality of the user's private key. The key security generation process is as follows: Figure 2 shown.
[0063] The key security generation process includes:
[0064] Step 1.1: The mobile terminal security password module starts key generation and simultaneously initiates a request to the collaborative signature server to request the server to start the key generation task;
[0065] Step 1.2: The mobile terminal generates a random number Da as the SM2 private key component of the mobile terminal, and the value satisfies Da∈[1,n-1]; the server generates a random number Db as the SM2 private key component of the server according to the same rule, and satisfies Db∈[1,n-1]; where n is a large prime number;
[0066] Step 1.3: The mobile end calculates Pka=Da×G as its own SM2 public key component and sends Pka to the server end; the server end calculates Pkb=Db×G as its own SM2 public key component and sends Pkb to the mobile end; where G is a base point on the elliptic curve;
[0067] Step 1.4: The mobile end uses Da×Pkb-G to calculate the public key Pk, and the server uses Db×Pka-G to calculate the public key Pk. Pk is the SM2 public key of both ends.
[0068] The collaborative signature service includes providing mobile terminal users with a personal digital certificate application function based on the national secret algorithm. When a mobile terminal user applies for a personal digital certificate, he needs to provide real-name information, and then verify the authenticity of the applicant's identity through biometrics (face recognition, fingerprint recognition) or a third-party financial system. After the server verifies the application, it calls the API service interface of the third-party CA organization to apply for a digital certificate. After the third-party CA organization successfully reviews the application, it will issue a personal digital certificate signed by the organization. The digital certificate is stored in the security password module, representing the real network identity of the mobile terminal user, and providing a basis for subsequent cryptographic operations such as signature verification. The digital certificate application process is as follows: Figure 3 shown. Figure 3 "Fill in application information" includes the mobile user's personal information, SM2 public key information, and other information items required for the certificate, such as the certificate subject.
[0069] Step 2: Mobile signature
[0070] The mobile terminal signature is implemented in the secure environment provided by the security password module. The business module sends the data that needs to be signed (game type, issue number, number of bets, account ID, etc.) to the security password module through the interface. The security password module signs the data using the mobile user's private key component. The security password module notifies the collaborative signature server to collaboratively complete the signing of the data (game type, issue number, number of bets, account ID, etc.) using the server user's private key component, and merges the mobile terminal signature with the server signature in the security password module. This process is completely implemented in the security password module and the collaborative signature server, and the signature algorithm uses SM2WithSM3. The communication process uses SSLVPN technology to ensure confidentiality and integrity during data transmission, and uses the ECC-SM4-SM3 national encryption algorithm suite. The process is as follows: Figure 4 shown.
[0071] Step 3: Purchase your ticket securely
[0072] After the mobile terminal completes the signature of the lottery purchase information, it will encapsulate the data into a standard digital envelope and send it to the sales agency platform. The sales agency platform calls the signature verification service to verify the received mobile terminal request data packet, determines whether the user's purchase of the gameplay is for sale, deducts the user's betting money, and then assembles new ticket request data based on the mobile terminal request information and the sales agency platform information, calls the signature function of the signature verification service to sign the data, and encapsulates it into a standard digital envelope to send a request to the official platform. After receiving the request, the official platform first unpacks and then verifies the signatures of the sales agency platform and the mobile terminal respectively. After the verification is passed, it is confirmed that it is a legal and authentic ticket request information, and then issues the ticket; after the ticket is successfully issued, the official platform will sign the ticket information in combination with the lottery purchaser information and the sales agency platform information to confirm the owner of the ticket (piece) and the sales agency platform (or channel). The entire safe lottery purchase process is like this: Figure 5 shown.
[0073] The core signature data structure of this process is analyzed as follows:
[0074] Step 3.1: Mobile terminal requests data
[0075] Mobile terminal SM2 signature (SM3 (game type code + issue number + number of bets + bet code + betting method + account ID)) + game type code + issue number + number of bets + bet code + betting method + account ID + mobile terminal SM2 digital certificate.
[0076] Step 3.1.1: The original text of the signature HASH value includes the game type code, the sales period number, the number of bets (or tickets), the bet code, the betting method, and the user account ID information; the account ID is a unique certificate generated when the mobile user registers on the platform, and the ID is a unique value on the agency platform and the official platform. The original text of the signature here lists the main fields, which can be expanded according to actual needs.
[0077] Step 3.1.2: The mobile SM2 digital certificate is the current lottery buyer's personal public key certificate;
[0078] Step 3.1.3: “Number of sheets” refers to the counting method for instant game play, and “Number of bets” refers to the counting method for digital game play. Usually, the number of bets is used to uniformly represent the counting method.
[0079] Step 3.2: The consignment platform requests data
[0080] Agency SM2 signature (SM3 (agency platform information + application ticket information + mobile SM2 signature)) + agency platform information + application ticket information + mobile user request data.
[0081] The mobile SM2 signature comes from the "mobile SM2 signature (SM3 (game type code + issue number + number of bets + bet code + betting method + account ID))" in the mobile request data.
[0082] Step 3.3: Save the credential data on the official platform
[0083] Official platform SM2 signature (SM3 (game type code + issue number + ticket number + ticket issuance time + bet code + betting method + mobile terminal SM2 signature + agency SM2 signature)) + ticket issuance information + mobile terminal user request data + agency request data.
[0084] Step 3.3.1: Ticket information includes game type, issue number, ticket number, anti-counterfeiting code, ticket issuance time, bet code, betting method and other ticket details;
[0085] Step 3.3.2: The mobile SM2 signature comes from the "Mobile SM2 signature (SM3 (game type code + issue number + number of bets + bet code + betting method + account ID))" in the "Mobile user request data" in the agency platform request data;
[0086] Step 3.3.3: The agency SM2 signature comes from the "agency SM2 signature (SM3 (agency platform information + application ticket information + mobile terminal SM2 signature))" in the agency platform request data;
[0087] Step 3.3.4: Save the voucher data and store it on the official platform and the agency platform for internal verification, auditing, and reconciliation. The official platform returns terminal data for mobile terminal data verification, ticket data display, etc.
[0088] Step 3.4: The official platform returns terminal data
[0089] Official platform SM2 signature (SM3 (game type code + issue number + ticket number + ticket issuance time + bet code + betting method + user account ID + agency platform number)) + ticket issuance information + user account ID + agency platform number + official platform SM2 public key certificate.
[0090] Mobile lottery users use this data to verify the authenticity of their tickets.
[0091] Step 4: Mobile security ticket verification
[0092] If the lottery purchase is successful, the mobile terminal will receive the terminal data returned by the official platform forwarded by the sales agency platform. The mobile terminal assembles the HASH original text "Game type code + issue number + ticket number + ticket issuance time + bet code + user account ID + sales agency platform number" according to the official platform signature data structure rules and generates the corresponding HASH value based on the SM3 algorithm, among which "Game type code", "issue number", "ticket number", "ticket issuance time", "bet code" and "betting method" are obtained from the ticket issuance information.
[0093] Use the official platform SM2 public key certificate to decrypt the signature value and compare the decrypted result value with the newly generated HASH value to see if they are consistent. If they are consistent, the verification is successful, indicating that the ticket is indeed issued by the official platform, and that the mobile lottery buyer has the ownership of the ticket; otherwise, the ticket is at risk and should be verified in time at the lottery management agency or lottery issuing agency. At the same time, you can also go to the official website ticket verification window to verify according to the lottery anti-counterfeiting code.
[0094] Mobile terminal security verification process Figure 6 shown.
[0095] Step 5: Redeem your prize safely
[0096] After mobile lottery users receive the winning news based on their selected numbers and the prize announcement information (the winning result can be known after the film of the lottery is removed), they can apply online for small prize redemption. Large prizes need to be redeemed on-site at the lottery management agency in the city or province in accordance with regulations.
[0097] First, the mobile terminal signs the application information and packages the data into a standard digital envelope and sends it to the agency platform; the agency platform unpacks and verifies the data, verifies that the real identity of the mobile terminal user is consistent with the ticket owner, and then calculates the winning amount of the ticket based on the bet code and voting method. If the redemption conditions are met, the application data is assembled and signed, and the official platform is applied for redemption; after receiving the application for redemption, the official platform unpacks and verifies the applicant's information, verifies the authenticity and consistency of the ticket owner, and verifies that the winning prize meets the online redemption conditions before transferring the prize to the applicant's account. The complete process of safe redemption is as follows: Figure 7 As shown, the core signature data structure of the process is parsed as follows:
[0098] Step 5.1: Mobile terminal requests data
[0099] Mobile terminal SM2 signature (SM3 (game type code + issue number + ticket number + account ID) + game type code + issue number + ticket number + account ID + mobile terminal SM2 public key certificate;
[0100] Step 5.2: The consignment platform requests data
[0101] Agency SM2 signature (SM3 (game type code + issue number + ticket number + account ID + agency platform number + mobile SM2 signature)) + agency platform information + ticket information + mobile user request data.
[0102] The ticket information includes information such as the “play type code”, “issue number”, “ticket number” and the winning amount of the ticket.
[0103] The present invention adopts cryptographic technology to solve the security problems in mobile Internet lottery purchase and entertainment activities. Through security technology means, it solves the risk problems such as uncertainty of terminal user identity, multiple sales of one ticket, swallowing of winning lottery tickets, and objections to bonus transfer in the actual lottery purchase and entertainment process in the past, making the entire lottery purchase process safe and reliable, making the ownership of digital lottery tickets clear, and making the prize redemption process safe and reliable. At the same time, the digital signature technology and digital envelope technology in the scheme ensure the security of data communication, preventing the occurrence of malicious behaviors such as illegal eavesdropping and tampering of business data during the communication process; the digital signature technology is used to ensure the integrity of data stored in the database, preventing the data in the database from being illegally modified by humans, causing business inconsistency risks, and bringing difficulties to later audits. The scheme also provides more security reinforcement guarantees for the promotion of Internet lottery purchase and entertainment activities, and promotes the healthy development of Internet lottery purchase and entertainment activities.
[0104] Embodiment 2
[0105] This embodiment provides an online lottery management system based on the national secret algorithm. The system includes a mobile lottery APP, a sales agency platform and an official platform. The mobile lottery APP integrates a security password module (or a collaborative signature mobile password module). Signature verification services are configured on the sales agency platform and the official platform respectively, and a collaborative signature service is configured on the official platform. Figure 8 shown.
[0106] The mobile lottery APP includes a business processing module and a security password module. The business processing module is responsible for lottery information, lottery announcement information, on-sale play, lottery purchase, prize redemption and other lottery business processing and account management information; the security password module is responsible for the secure computing environment, and its functions include user personal digital certificate application and storage, private key component security storage, digital signature and signature verification operations, and provides high-security password services for the business processing module through the security password module.
[0107] The collaborative signature system uses key splitting technology to store the private key components separately in the mobile lottery APP security password module and the official platform collaborative signature server. When the mobile terminal needs to sign, the collaborative signature technology is applied to ensure the security of the mobile user's private key and the validity of the mobile terminal signature.
[0108] The signature verification service is configured on the agency platform server to provide the agency platform with mobile terminal signature verification, official platform signature verification, and agency platform business data signature services. The authenticity of the mobile terminal identity is confirmed by verifying the mobile terminal signature; the agency platform confirms the data through the signature service.
[0109] The signature verification service is configured on the official platform to verify the signatures of the mobile terminal and the agency platform, ensuring the authenticity of the data source and the identity of the data signer. At the same time, the official platform confirms the data by signing the data, providing the agency platform and mobile terminal users with official identity authenticity proof and data integrity verification; the mobile terminal and the agency platform confirm the authenticity and integrity of the data source through signature verification of the lottery data.
[0110] Embodiment 3
[0111] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the online lottery management method based on the national secret algorithm as described in the above-mentioned embodiment 1 are implemented.
[0112] Embodiment 4
[0113] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the online lottery management method based on the national secret algorithm as described in the first embodiment are implemented.
[0114] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0115] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0116] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0119] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An online lottery management method based on a national secret algorithm, characterized in that: include: The user's private key is divided into two parts. One mobile private key component is stored in the mobile terminal, and the other server private key component is stored in the official platform's server. When buying a ticket, the mobile terminal and the service terminal first use their own private key components to jointly sign the ticket purchase information, and then synthesize them on the mobile terminal to generate a first synthetic signature; the mobile terminal sends the first synthetic signature to the agency sales platform, so that the agency sales platform verifies the first synthetic signature. After the verification is successful, the validity of the user's purchase of the game is determined and the user's betting money is deducted; the ticket issuance request data composed of the ticket purchase information and the agency sales platform information is signed, and the obtained first agency sales signature is sent to the official platform, so that the official platform can issue the ticket after successfully verifying the synthetic signature and the first agency sales signature; The official platform signs the ticketing information, user information and agency platform information to generate the official platform signature; The official platform sends the ticket purchase result to the mobile terminal via the agency platform; the ticket purchase result includes the official platform signature and ticket purchase information; The original signature hash value includes the game type code, sales period number, number of bets or tickets purchased, bet code, betting method, and user account ID information; The account ID is a unique credential generated when a mobile user registers on the platform. The ID is a unique value on both the agency platform and the official platform. The signature hash value lists the main fields in the original text and is expanded according to actual conditions. The mobile SM2 digital certificate is the current lottery buyer's personal public key certificate; The number of cards represents the counting method for instant game play, and the number of bets represents the counting method for digital game play. The number of bets is used to uniformly represent the counting method.
2. The online lottery purchase management method based on the national secret algorithm according to claim 1 is characterized in that: After the mobile terminal receives the ticket purchase result, it verifies the signature of the official platform. If the verification is successful, the verification success information will be displayed. If the verification fails, a verification exception prompt will be given, and the anti-counterfeiting code of the ticket purchase information will be verified through the ticket verification window of the official website.
3. The online lottery purchase management method based on the national secret algorithm according to claim 1 is characterized in that: When redeeming the prize, the mobile terminal and the server terminal first use their respective private key components to jointly sign the prize redemption information, and then synthesize them on the mobile terminal to generate a second synthetic signature; the mobile terminal sends the second synthetic signature to the agency platform, so that the agency platform verifies the second synthetic signature. After successful verification, the winning amount is calculated, and the prize redemption application data composed of the prize redemption information and the agency platform information is signed to generate a second agency signature; and the second agency signature is sent to the official platform, so that the official platform verifies the second synthetic signature and the second agency signature. After successful verification, the prize is transferred to the applicant's account.
4. The online lottery management method based on the national secret algorithm according to claim 1 or 3 is characterized in that: A public key is generated based on the private key component of the mobile terminal or the private key component of the server terminal. The mobile terminal applies for a personal digital certificate request from the server terminal based on the public key. The server terminal verifies the identity information of the mobile terminal user and retrieves the personal digital certificate generated by the third-party CA organization after the verification is passed. The first synthetic signature and the second synthetic signature both include the personal digital certificate, ticket purchase information / prize redemption information, and a hash value of the ticket purchase information / prize redemption information.
5. The online lottery purchase management method based on the national secret algorithm according to claim 1 is characterized in that: The ticket purchase information includes the game type code, issue number, number of bets, bet code, betting method and account ID, the agency platform information includes the agency platform ID information, the user information includes the user account ID information, and the ticket issuance information includes the game type, issue number, ticket number, anti-counterfeiting code, ticket issuance time, bet code and betting method.
6. The online lottery management method based on the national secret algorithm according to claim 1 is characterized in that: The method for dividing the user private key into two parts includes: the mobile terminal generates a random number Da as a mobile terminal private key component, and the value satisfies Da∈[1,n-1]; the server generates a random number Db as a server terminal private key component according to the same rule, and satisfies Db∈[1,n-1]; wherein n is a large prime number.
7. An online lottery management system based on a national secret algorithm, characterized in that: include: The private key generation module is used to divide the user private key of the mobile terminal into two parts, one of which is stored in the mobile terminal and the other is stored in the server of the official platform, so that the mobile terminal and the server can jointly generate signature information; The ticket purchase module is used for, when purchasing a ticket, the mobile terminal and the service terminal first use their own private key components to jointly sign the ticket purchase information, and then synthesize them on the mobile terminal to generate a first synthetic signature; the mobile terminal sends the first synthetic signature to the agency sales platform, so that the agency sales platform verifies the first synthetic signature, and after successful verification, determines the validity of the user's purchase of the game, and deducts the user's betting money; signs the ticket issuance request data composed of the ticket purchase information and the agency sales platform information, and sends the obtained first agency sales signature to the official platform, so that the official platform issues the ticket after successfully verifying the synthetic signature and the first agency sales signature; The official platform signs the ticketing information, user information and agency platform information to generate the official platform signature; The official platform sends the ticket purchase result to the mobile terminal via the agency platform; the ticket purchase result includes the official platform signature and ticket purchase information; The original signature hash value includes the game type code, sales period number, number of bets or tickets purchased, bet code, betting method, and user account ID information; The account ID is a unique credential generated when a mobile user registers on the platform. The ID is a unique value on both the agency platform and the official platform. The signature hash value lists the main fields in the original text and is expanded according to actual conditions. The mobile SM2 digital certificate is the current lottery buyer's personal public key certificate; The number of cards represents the counting method for instant game play, and the number of bets represents the counting method for digital game play. The number of bets is used to uniformly represent the counting method.
8. The online lottery management system based on the national secret algorithm according to claim 7 is characterized in that: The online lottery management system based on the national secret algorithm also includes a prize redemption module, which is used for, when redeeming the prize, the mobile terminal and the server terminal first use their respective private key components to jointly sign the prize redemption information, and then synthesize them on the mobile terminal to generate a second synthetic signature; the mobile terminal sends the second synthetic signature to the agency platform, so that the agency platform verifies the second synthetic signature. After the verification is successful, the winning amount is calculated, and the prize redemption application data composed of the prize redemption information and the agency platform information is signed to generate a second agency signature; and the second agency signature is sent to the official platform, so that the official platform verifies the second synthetic signature and the second agency signature. After the verification is successful, the prize is transferred to the applicant's account.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the online lottery management method based on the national secret algorithm as described in any one of claims 1-6 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the online lottery management method based on the national secret algorithm as described in any one of claims 1-6 are implemented.
Citation Information
Patent Citations
A method to ensure the security of computer lottery transaction information
CN102298756A
Collaborative signature method, security service middleware, related platform and system
CN111404696A
Lottery flow management method and system, terminal equipment and storage medium
CN113128849A