Intelligent cash register system, encrypted communication method and storage medium

By negotiating session keys between the smart cash register and external devices and using communication instructions for encryption and decryption, the problem of insufficient security of data transmission of smart cash registers is solved, and security and operation efficiency are improved.

CN114331415BActive Publication Date: 2024-11-19FUJIAN NEWLAND PAYMENT TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111628082.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-11-19
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

Existing smart cash registers have insufficient security during data transmission, especially when external devices are connected through serial ports, sensitive data is easily monitored or cracked.

Method used

The negotiation process of initiating the session key SK between the smart cash register and the external device on the Android platform is adopted, and the communication command whitelist determines whether the communication data needs to be encrypted and decrypted to ensure the security of data transmission.

Benefits of technology

It effectively reduces the probability that sensitive data will be cracked on the link, improves the security of the smart cash register, and improves the operating efficiency of the system by optimizing data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114331415B_ABST
    Figure CN114331415B_ABST
Patent Text Reader

Abstract

The present invention provides an encrypted communication method between an intelligent cash register and an external device on an Android platform: obtaining a paired external device; the intelligent cash register and the paired external device initiate a negotiation process of a session key SK, wherein SK is used to encrypt line data of communication between the intelligent cash register and the paired external device; the intelligent cash register sends a communication instruction whitelist to the paired external device for synchronization, and the communication instruction whitelist is used to subsequently determine whether the communication data needs to be encrypted and decrypted; the intelligent cash register and the paired external device perform instruction interaction, the sender uses SK and encrypts the communication instructions that need to be encrypted in the communication instructions according to the communication instruction whitelist, and the receiver uses SK and decrypts the communication instructions that need to be decrypted in the communication instructions according to the communication instruction whitelist. The present invention further relates to an intelligent cash register system and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an intelligent cash register system, an encryption communication method and a storage medium. Background Art

[0002] At present, the Android platform smart cash register consists of an Android system host and a series of external devices. The external devices refer to functional modules such as password keyboards, payment modules, barcode scanners, cash boxes, and printing modules that are connected to the smart cash register host through serial ports. Users can choose the external devices they need to use with the smart cash register according to their needs. This combination enables the smart cash register to be applied to many different payment scenarios and expands the functions of the smart cash register. For example, multiple payment methods such as swiping cards, inserting cards, and waving cards can be realized through external payment modules and password keyboards, and the needs of scanning payment can also be met through external scanners. At present, the innovation of smart cash registers focuses more on appearance, software interface design, and rich functions to meet the needs of more payment scenarios, and has not improved the smart cash register from the perspective of security. As mentioned above, the external device is connected to the smart cash register host through physical links such as serial ports. The exposed physical links will inevitably lead to data being monitored and stolen. If the external device is a payment module, when the user swipes, inserts, or waves the card, sensitive data such as the user's card number and track information will be transmitted on the link; if the external device is a password keyboard, although the user's password is encrypted with a key before being transmitted on the link, it is still possible to crack the password by exhaustive methods if sensitive data is monitored for a long time. There is a hardware design that embeds the external module directly into the smart cash register and makes it an irremovable structural part of the cash register. The link is protected by hardware packaging and line detection. This method is also safe but sacrifices the scalability of the smart cash register. There is currently no communication transmission software solution to strengthen the security of link data transmission between the smart cash register host and external devices. Summary of the invention

[0003] The present invention provides an intelligent cash register system, an encryption communication method and a storage medium, which can effectively solve the above problems.

[0004] The present invention is achieved in that:

[0005] The present invention provides an encrypted communication method between an Android platform intelligent cash register and an external device, comprising the following steps:

[0006] S1, obtain the paired external device;

[0007] S2, the smart cash register and the paired external device initiate a negotiation process of a session key SK, wherein SK is used to encrypt line data for communication between the smart cash register and the paired external device;

[0008] S3: the smart cash register sends the communication instruction whitelist to the paired external device for synchronization, wherein the communication instruction whitelist is used to subsequently determine whether encryption and decryption of communication data is required;

[0009] S4: The smart cash register interacts with the paired external device through commands, the sender uses SK to encrypt the communication commands that need to be encrypted according to the communication command whitelist, and the receiver uses SK to decrypt the communication commands that need to be decrypted according to the communication command whitelist.

[0010] The present invention further provides an intelligent cash register system on an Android platform, comprising: a processing unit and an external interface connected to the processing unit, wherein the external interface is used to connect an external device;

[0011] Among them, the processing unit is used to obtain a paired external device, the processing unit is further used to initiate a negotiation process of a session key SK with the paired external device, and the processing unit is further used to send a communication instruction whitelist to the paired external device for synchronization; and the processing unit is further used to perform SK encryption or decryption on the communication instructions that need to be encrypted or decrypted in the communication instructions according to the communication instruction whitelist when interacting with the paired external device.

[0012] The present invention further provides a computer-readable storage medium having a program file stored thereon, wherein the program file executes the above method when executed by a processor.

[0013] The beneficial effects of the present invention are as follows: the intelligent cash register system, encryption communication method and storage medium of the present invention can protect the link transmission data by initiating the negotiation process of the session key SK between the intelligent cash register and the paired external device, so as to reduce the probability of sensitive data being cracked during transmission on the link and improve the security of the intelligent cash register. Furthermore, by setting the communication instruction whitelist, the data processing volume can be further reduced and the overall operating efficiency of the system can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1The present invention provides a flowchart of an encrypted communication method between an Android platform smart cash register and an external device. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0017] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0018] Reference Figure 1 As shown, 1. An encrypted communication method between an Android platform smart cash register and an external device comprises the following steps:

[0019] S1, obtain the paired external device;

[0020] S2, the smart cash register and the paired external device initiate a negotiation process of a session key SK, wherein SK is used to encrypt line data for communication between the smart cash register and the paired external device;

[0021] S3: the smart cash register sends the communication instruction whitelist to the paired external device for synchronization, wherein the communication instruction whitelist is used to subsequently determine whether encryption and decryption of communication data is required;

[0022] S4: The smart cash register interacts with the paired external device through commands, the sender uses SK to encrypt the communication commands that need to be encrypted according to the communication command whitelist, and the receiver uses SK to decrypt the communication commands that need to be decrypted according to the communication command whitelist.

[0023] As a further improvement, in step S1, the step of obtaining the paired external device includes:

[0024] S11, when the smart cash register detects the presence of an external device, it determines whether the external device has been paired, if it has been paired, it directly proceeds to step S2, if it has not been paired, it proceeds to step S12;

[0025] S12, the smart cash register generates a public-private key pair, and sends the private key PRI to an external device through a serial port;

[0026] S13, the smart cash register receives a notification that the external device has successfully saved the private key PRI and changes the pairing flag to paired;

[0027] S14, the smart cash register further records the pairing completion status of the corresponding device according to the serial number of the external device, and enters S2.

[0028] As a further improvement, after step S14, the method further includes:

[0029] S15, save the public key PUB in the secure partition and erase the private key.

[0030] As a further improvement, in step S2, the steps of initiating a negotiation process of the session key SK between the smart cash register and the paired external device include:

[0031] S21, the smart cash register generates a random number RN1 and a SK key component SK1, and uses PUB to encrypt RN1 and SK1 to obtain a ciphertext RN1_SK1_Enc of RN1 and SK1, and then sends RN1_SK1_Enc to the paired external device;

[0032] S22, the paired external device uses PRI to decrypt RN1_SK1_Enc, obtains RN1 and SK1 plaintext, saves SK1, and uses PRI to digitally sign RN1, and sends the signature value SIG_RN1 to the smart cash register;

[0033] S23, the smart cash register uses PUB and RN1 to perform signature verification on SIG_RN1;

[0034] S24, after the signature verification is passed, the smart cash register generates a random number RN2 and a SK key component SK2, encrypts RN2 and SK2 using PUB to obtain a ciphertext RN2_SK2_Enc of RN2 and SK2, and sends RN2_SK2_Enc to the paired external device;

[0035] S25, the paired external device uses PRI to decrypt RN2_SK2_Enc to obtain RN2 and SK2 plaintext; XOR operation is performed on SK1 and SK2 saved in step S22 to obtain SK and save it, and the check value SK_KCV1 of SK is calculated;

[0036] S26, the paired external device uses PRI to digitally sign RN2, and sends the signature value SIG_RN2 and SK_KCV1 to the smart cash register;

[0037] S27, the smart cash register uses PUB and RN2 to perform signature verification on SIG_RN2;

[0038] S28, after the signature verification is passed, the smart cash register generates SK by XORing SK1 and SK2 and calculates the verification value SK_KCV2; then, it is determined whether SK_KCV1 and SK_KCV2 are consistent, if so, the SK negotiation is completed, otherwise the interface prompts that the pairing is abnormal.

[0039] As a further improvement, in step S4, the smart cash register interacts with the paired external device through instructions, the sender uses SK and encrypts the communication instructions that need to be encrypted in the communication instructions according to the communication instruction whitelist, and the receiver uses SK and decrypts the communication instructions that need to be decrypted in the communication instructions according to the communication instruction whitelist, including:

[0040] S41, the smart cash register initiates a command operation and determines whether the command is in the communication command whitelist. If the command is in the communication command whitelist, the command data is directly sent and the communication data encryption indication position is set to 0; if the command is not in the communication command whitelist, the communication data is encrypted using SK and the communication data encryption indication position is set to 1;

[0041] S42, the paired external device receives the communication data and determines the communication data encryption indicator bit. If it is 0, the instruction is directly parsed and executed; if it is 1, the communication data is first decrypted using SK, and then the corresponding instruction is parsed and executed.

[0042] As a further improvement, in step S4, the smart cash register interacts with the paired external device through instructions, the sender uses SK and encrypts the communication instructions that need to be encrypted in the communication instructions according to the communication instruction whitelist, and the receiver uses SK and decrypts the communication instructions that need to be decrypted in the communication instructions according to the communication instruction whitelist, including:

[0043] S43, the paired external device initiates a command operation, and determines whether the command is in the communication command whitelist. If the command is in the communication command whitelist, the command data is directly sent and the communication data encryption indication position is set to 0; if the command is not in the communication command whitelist, the communication data is encrypted using SK and the communication data encryption indication position is set to 1;

[0044] S44, the smart cash register receives the communication data, determines the communication data encryption indicator bit, and if it is 0, directly parses and executes the instruction; if it is 1, first uses SK to decrypt the communication data, and then parses and executes the corresponding instruction.

[0045] As a further improvement, the session key SK is renegotiated and generated each time the smart cash register is turned on and each time the external device is reconnected to the smart cash register.

[0046] The embodiment of the present invention further provides an intelligent cash register system on an Android platform, comprising: a processing unit and an external interface connected to the processing unit, wherein the external interface is used to connect an external device;

[0047] Among them, the processing unit is used to obtain a paired external device, the processing unit is further used to initiate a negotiation process of a session key SK with the paired external device, and the processing unit is further used to send a communication instruction whitelist to the paired external device for synchronization; and the processing unit is further used to perform SK encryption or decryption on the communication instructions that need to be encrypted or decrypted in the communication instructions according to the communication instruction whitelist when interacting with the paired external device.

[0048] As a further improvement, the external device includes at least one of a password keyboard, a payment module, a barcode scanning gun, a cash box or a printing module.

[0049] The embodiment of the present invention further provides a computer-readable storage medium on which a program file is stored. When the program file is executed by a processor, the above encryption method is executed.

[0050] 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 a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, 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, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0055] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0056] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0057] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0058] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0059] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0060] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms should not be understood as necessarily referring to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

Claims

1. An encrypted communication method between an Android platform smart cash register and an external device, characterized in that: The following steps are involved: S1, obtain the paired external device; S2, the smart cash register and the paired external device initiate a negotiation process of a session key SK, wherein SK is used to encrypt line data for communication between the smart cash register and the paired external device, and the steps of the smart cash register and the paired external device initiating a negotiation process of a session key SK include: S21, the smart cash register generates a random number RN1 and a SK key component SK1, and uses PUB to encrypt RN1 and SK1 to obtain a ciphertext RN1_SK1_Enc of RN1 and SK1, and then sends RN1_SK1_Enc to the paired external device; S22, the paired external device uses PRI to decrypt RN1_SK1_Enc to obtain RN1 and SK1 plaintext, saves SK1, and uses PRI to digitally sign RN1, and sends the signature value SIG_RN1 to the smart cash register; S23, the smart cash register uses PUB and RN1 to verify the signature of SIG_RN1; S24, after the signature verification is passed, the smart cash register generates a random number RN2 and a SK key component SK2, uses PUB to encrypt RN2 and SK2 to obtain the ciphertext RN2_SK2_Enc of RN2 and SK2, and sends RN2_SK2_Enc to the paired external device; S25, the paired external device uses PRI to decrypt RN2_SK2_Enc to obtain the plaintext of RN2 and SK2; performs an XOR operation on the saved SK1 and SK2 in step S22 to obtain SK and save it, and calculates the check value SK_ KCV1; S26, the paired external device uses PRI to digitally sign RN2, and sends the signature value SIG_RN2 and SK_KCV1 to the smart cash register; S27, the smart cash register uses PUB and RN2 to verify the signature of SIG_RN2; S28, after the signature verification is passed, the smart cash register XORs SK1 and SK2 to generate SK and calculates the check value SK_KCV2; then, it is determined whether SK_KCV1 and SK_KCV2 are consistent, if yes, SK negotiation is completed, otherwise the interface prompts that the pairing is abnormal; S3: the smart cash register sends the communication instruction whitelist to the paired external device for synchronization, wherein the communication instruction whitelist is used to subsequently determine whether encryption and decryption of communication data is required; S4: The smart cash register interacts with the paired external device through commands, the sender uses SK to encrypt the communication commands that need to be encrypted according to the communication command whitelist, and the receiver uses SK to decrypt the communication commands that need to be decrypted according to the communication command whitelist.

2. The method for encrypted communication between an Android platform smart cash register and an external device as claimed in claim 1, characterized in that: In step S1, the step of obtaining the paired external device includes: S11, when the smart cash register detects the presence of an external device, it determines whether the external device has been paired, if it has been paired, it directly proceeds to step S2, if it has not been paired, it proceeds to step S12; S12, the smart cash register generates a public-private key pair, and sends the private key PRI to an external device through a serial port; S13, the smart cash register receives a notification that the external device has successfully saved the private key PRI and changes the pairing flag to paired; S14, the smart cash register further records the pairing completion status of the corresponding device according to the serial number of the external device, and enters S2.

3. The method for encrypted communication between an Android platform smart cash register and an external device as claimed in claim 2, characterized in that: After step S14, the method further comprises: S15, save the public key PUB in the secure partition and erase the private key.

4. The method for encrypted communication between an Android platform smart cash register and an external device as claimed in claim 3, characterized in that: In step S4, the smart cash register interacts with the paired external device, the sender uses SK to encrypt the communication instructions that need to be encrypted in the communication instructions according to the communication instruction whitelist, and the receiver uses SK to decrypt the communication instructions that need to be decrypted in the communication instructions according to the communication instruction whitelist, including: S41, the smart cash register initiates a command operation and determines whether the command is in the communication command whitelist. If the command is in the communication command whitelist, the command data is directly sent and the communication data encryption indication position is set to 0; if the command is not in the communication command whitelist, the communication data is encrypted using SK and the communication data encryption indication position is set to 1; S42, the paired external device receives the communication data and determines the communication data encryption indicator bit. If it is 0, the instruction is directly parsed and executed; if it is 1, the communication data is first decrypted using SK, and then the corresponding instruction is parsed and executed.

5. The method for encrypted communication between an Android platform smart cash register and an external device as claimed in claim 4, characterized in that: In step S4, the smart cash register interacts with the paired external device, the sender uses SK to encrypt the communication instructions that need to be encrypted in the communication instructions according to the communication instruction whitelist, and the receiver uses SK to decrypt the communication instructions that need to be decrypted in the communication instructions according to the communication instruction whitelist, including: S43, the paired external device initiates a command operation, and determines whether the command is in the communication command whitelist. If the command is in the communication command whitelist, the command data is directly sent and the communication data encryption indication position is set to 0; if the command is not in the communication command whitelist, the communication data is encrypted using SK and the communication data encryption indication position is set to 1; S44, the smart cash register receives the communication data, determines the communication data encryption indicator bit, and if it is 0, directly parses and executes the instruction; if it is 1, first uses SK to decrypt the communication data, and then parses and executes the corresponding instruction.

6. A computer-readable storage medium, characterized in that: A program file is stored thereon, and when the program file is executed by a processor, the method according to any one of claims 1 to 5 is executed.

Citation Information

Patent Citations

  • Method and system for online security trading

    CN101789934A

  • Internet bank security authentication method and system

    CN102737311A

  • System and method for achieving safety PIN input on Android intelligent platform cash register

    CN110867018A

  • Instant messaging method and device based on blockchain, and medium

    CN113691437A

  • Online payment method, online payment system and apparatus

    KR1020180126731A