An electronic signature encryption method, system, device and medium
By combining an electromagnetic-capacitive dual-control screen and an encryption/decryption chip with a multi-layer encryption mechanism based on national cryptographic algorithms, the security issues of electronic signatures during transmission and storage are solved, enabling secure transmission and storage of signature data. This technology is applicable to fields such as finance, banking, telecommunications, and government.
Patent Information
- Application Number
- CN202411880122.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The security of electronic signatures during transmission and storage is a concern, especially the vulnerability of user signature information to leakage during transmission and storage between electromagnetic screens and computers, leading to economic and security risks.
Employing electromagnetic-capacitive dual-control screen technology, combined with encryption/decryption chips and national cryptographic algorithms, a multi-layered encryption mechanism of master key, session key, and working key is used to achieve real-time encryption and decryption of signature data, ensuring the security of signature data during transmission and storage.
It improves the security and reliability of electronic signatures, prevents signature data leakage, and is suitable for application scenarios such as finance, banking, telecommunications, and government.
Smart Images

Figure CN119788359B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information security, and in particular to an electronic signature encryption method, system, device and medium. BACKGROUND
[0002] With the development and progress of society, electronic signature has become a convenient and efficient way of identity recognition and document signing. Electronic signature represents the authorization and approval of the signer, and has the same legal effect as handwritten signature and seal, and has been widely used in financial, mobile and other business systems, providing more convenient and efficient services for enterprises and individuals.
[0003] Electronic signature is realized through signature media such as capacitive screen and electromagnetic screen. The electromagnetic screen collects the handwriting information of the user in real time, and then uploads the handwriting information to the computer. The computer draws a signature image after receiving the handwriting information. The electromagnetic screen triggers the built-in pressure sensor when writing, and the pressure sensor obtains the pressure by combining with the change of the magnetic field, and defines the unique Z-axis of the electromagnetic screen technology. The electromagnetic screen adopts electromagnetic pressure sensing technology to realize precise touch and original handwriting writing, making the signature handwriting closer to the original handwriting of the signer. The security of signature handwriting is the core of electronic signature technology. Once the data is leaked in the transmission and storage process of the user's signature information between the electromagnetic screen and the computer, it will bring serious economic and security risks to the user. SUMMARY
[0004] The technical problem to be solved by the present application is to provide an electronic signature encryption method, system, device and medium, which solves the security problem of electronic signature in the transmission and storage process, and effectively protects the user's personal handwritten biological feature information.
[0005] In order to solve the technical problem, the technical scheme adopted by the present application is as follows: an electronic signature encryption method, comprising the following steps:
[0006] S01, perfusion master key, the master key is generated by the server, the PC end encrypts the master key sent by the server through the session key to obtain the ciphertext PriKey', and then sends the ciphertext PriKey' and the number of master keys to the encryption and decryption chip. The encryption and decryption chip decrypts the ciphertext PriKey' through the session key to obtain the plaintext of the master key, and stores the plaintext of the master key in the on-chip NORFLASH; the master key is used to decrypt the working key, and the working key is used to encrypt the trajectory data when obtaining the electronic signature;
[0007] S02, the interface library of the PC generates a signature area according to the window size transmitted by the APP, and transmits the starting point coordinates, width and height of the signature area to the encryption and decryption chip, and the encryption and decryption chip generates a handwriting effective area according to the input signature area starting point coordinates, width and height; at the same time, the interface library of the PC also negotiates with the encryption and decryption chip to obtain a session key required for single coordinate transmission, and the encryption and decryption chip receives the data transmitted by the handwriting device after the signature is opened;
[0008] S03, after the signature is opened, the encryption and decryption chip receives the plaintext coordinates transmitted by the handwriting device, calculates the original coordinate point horizontal coordinate, vertical coordinate and pressure, first filters the original coordinate points located outside the handwriting effective area, and the remaining is the effective coordinate point, integrates the effective coordinate point into HID format, encrypts the ciphertext coordinates into ciphertext coordinates through the session key, and sends them to the PC, and the interface library of the PC receives the ciphertext coordinates, decrypts the ciphertext coordinates using the session key to obtain the original coordinate value, converts the original coordinate value into the current window coordinate, draws the handwriting, and saves the original coordinate value;
[0009] S04, obtaining electronic signature, after the user signs, the electronic signature is obtained, the interface library of the PC sends all the stored original coordinate values to the encryption and decryption chip, and the encryption and decryption chip encrypts the data using the working key to obtain encrypted trajectory data and returns to the PC end;
[0010] Step S04 is specifically:
[0011] S41, after the interface library of the PC receives the electronic signature obtaining command, the signature trajectory data is encrypted using the session key, and the encrypted working key and the master key number transmitted by the server are imported, the interface library generates a trajectory picture of the original coordinate value and saves it to the specified position of the PC;
[0012] S42, the encrypted ciphertext of the signature trajectory data, the encrypted working key and the master key number are sent to the encryption and decryption chip, after receiving the data, the encryption and decryption chip first decrypts the signature trajectory data to obtain the plaintext data, then obtains the corresponding master key PriKey according to the master key number, and decrypts the encrypted working key WorkKey' using the master key PriKey to obtain the plaintext working key WorkKey;
[0013] S43, the plaintext working key WorkKey is used as an encryption key to encrypt the plaintext data of this segment of signature trajectory data, and the encrypted trajectory data is returned to the PC.
[0014] Further, the generation process of the session key is:
[0015] S11, the PC and the encryption and decryption chip generate their own random numbers pr and dr respectively, and then complete the exchange of random numbers between the two parties;
[0016] S12, the PC sends a public key acquisition instruction to the encryption and decryption chip, the encryption and decryption chip reads the public key in the NORFLASH in the chip after receiving the instruction, and returns the public key to the PC;
[0017] S13, the PC generates a random seed and encrypts the random seed using the public key, and sends the encryption result to the encryption and decryption chip, the encryption and decryption chip decrypts the encryption result using the internal private key to obtain the random seed;
[0018] S14, the PC and the encryption and decryption chip use the seed key to obtain the session key by performing bitwise XOR operation on the random numbers dr and pr.
[0019] Further, the session key adopts a one-time one-key mechanism.
[0020] Further, in step S03, the PC end signature pen trajectory is drawn in the interface library, a hook is installed in the interface library using the SetWindowsHookEx function to monitor and intercept the message queue sent to the APP window program, the WM_PAIT message is intercepted to realize the drawing work in the APP window area, the interface library first records the first point collected, the second point is collected, and the straight line drawing is completed using the GDI graphics device interface, the third point is collected, and the straight line drawing is performed on the third point and the second point, and the same operation is performed on the last collected point until the entire signature process is completed.
[0021] Further, a buffer area is set during the drawing process, and the bitmap in the buffer area is copied to the canvas at one time.
[0022] Further, when the encryption and decryption chip is used for the first time or the encryption and decryption chip needs to be updated with new firmware after being locked, the encryption and decryption chip is first unlocked, and when the encryption and decryption chip is unlocked, not only the lock state of the encryption and decryption chip is released, but also the session key during the collection of coordinates is generated; at the same time, the encryption and decryption chip detects whether it is violently disassembled in real time, when the detection point input is high level, it is judged that the encryption and decryption chip has been violently disassembled, at this time, the encryption and decryption chip erases the master key and sets the encryption and decryption chip to the locked state.
[0023] Further, when the encryption and decryption chip is unlocked, the interface library of the PC and the encryption and decryption chip communicate using a fixed key and random number mechanism, all commands are encrypted and transmitted, first, the PC and the encryption and decryption chip generate their own random numbers, complete the exchange of random numbers between the two parties, and finally the command of the communication needs to add the PC random number and the encryption and decryption chip random number.
[0024] The application further discloses an electronic signature encryption system, which comprises a signature handwriting device, an encryption and decryption chip and a PC, the PC is provided with an interface library, a user performs signature drawing on the signature handwriting device, the encryption and decryption chip is connected with the signature handwriting device and used for collecting coordinate points on the signature handwriting device, the collected coordinate points are firstly filtered in an effective area to obtain effective point coordinates, the effective point coordinates are encrypted by the encryption and decryption chip and then uploaded to the PC, the PC decrypts the received encrypted data to obtain original coordinate points, and then converts the original coordinate points into current window coordinates, draws writing traces in the current window, and finally saves the original coordinate points, after the user completes signature, generates vector pictures and encrypts the trace data of the signature, so as to provide the user with an electronic signature.
[0025] The application further discloses an electronic signature encryption device, which comprises a processor and a memory storing program instructions, and the processor is configured to execute the electronic signature encryption method as described above when running the program instructions.
[0026] A storage medium storing program instructions, which execute the electronic signature encryption method as described above when running.
[0027] The electronic signature encryption method of the application has the advantages that the original trace writing and the safe encryption mechanism are adopted, the electronic signature supports the encryption of the national secret algorithm while supporting the original trace writing, the security problem of signature data in the transmission and storage process is solved, the security and reliability of the signature are effectively improved, and the method has good application prospects in application scenarios such as finance, banking, telecommunications and government affairs. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 A structural schematic diagram of the electronic signature encryption system described in Embodiment 1 is shown in the figure.
[0029] Figure 2 A working principle schematic diagram of the electronic signature encryption system described in Embodiment 1 is shown in the figure.
[0030] Figure 3 A flowchart of the primary key filling is shown in the figure.
[0031] Figure 4 A schematic diagram of the HID plaintext format is shown in the figure.
[0032] Figure 5 A flowchart of the signature starting is shown in the figure.
[0033] Figure 6 A flowchart of the electronic signature acquisition is shown in the figure.
[0034] Figure 7 A flowchart of the fixed key and random number mechanism is shown in the figure.
[0035] Figure 8Flowchart for generating session keys. Detailed Implementation
[0036] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0037] Example 1
[0038] This embodiment 1 discloses an electronic signature encryption system, such as Figure 1 As shown, the device includes a signature / handwriting device, an encryption / decryption chip, and a PC. The signature / handwriting device employs dual electromagnetic and capacitive control, bonding the electromagnetic and capacitive screens together to achieve passive wireless electromagnetic pen handwriting. The encryption / decryption chip uses the USB 3.0 main control chip HX6802, which supports national cryptographic algorithms such as SM1, SM2, SM3, and SM4, and has passed national commercial cryptographic testing. The PC includes an interface library and three software programs: electronic signature software, unlocking software, and decryption software. Data interaction mainly includes data exchange between the signature software and the interface library, between the interface library DLL and the HX6802, and between the HX6802 and the electromagnetic screen.
[0039] In this embodiment, the encryption / decryption chip HX6802 is enumerated as a HID human input device. The HX6802 communicates with the electromagnetic screen via UART. Figure 2 As shown, the user draws their signature using a dual electromagnetic-capacitive control system. The HX6802 collects the coordinates of the electromagnetic screen. The collected coordinates are first filtered for valid areas, then encrypted using the HX6802's SM4 encryption engine before being transmitted to the PC via USB. The PC receives the encrypted data, decrypts it using SM4 to obtain the coordinates, converts them to the coordinates of the current window, draws the handwriting within the current window, and finally saves the original coordinates. After the user completes their signature, a vector image is generated, and the signature handwriting data is encrypted.
[0040] Example 2
[0041] This embodiment discloses an electronic signature encryption method. This method is based on the system described in Embodiment 1 and includes three aspects: device unlocking, handwritten signature, and secure communication mechanism.
[0042] Device unlocking is required when a user uses the device for the first time or when the device needs to be updated after being locked. Unlocking the device not only removes the lock but also generates an SM2 key pair for encryption during coordinate data acquisition and communication. The HX6802 firmware detects in real time whether the device has been forcibly disassembled. When a high-level signal is detected at the detection point, it is determined that the device has been forcibly disassembled. At this time, the HX6802 erases the master key and locks the device.
[0043] Handwritten signature, handwritten signature mainly contains perfusion master key, signature start, signature real-time drawing, get electronic signature and other function interfaces.
[0044] The master key is generated by a server, imported into the encryption and decryption chip HX6802 through a PC terminal, and supports up to 16 master keys, with serial numbers being 1-16 in turn. The key is used to decrypt the working key. The working key is used to encrypt the track data when obtaining the electronic signature.
[0045] As shown in Figure 3 , the process of perfusing the master key is as follows: the PC terminal and the encryption and decryption chip HX6802 negotiate a session key, then the PC terminal encrypts the master key sent by the server through the session key to obtain ciphertext PriKey', sends the ciphertext PriKey' and the number of master keys to HX6802, and HX6802 decrypts the ciphertext PriKey' through the session key to obtain the plaintext of the master key, and stores the plaintext of the master key in the on-chip NORFLASH.
[0046] After the signature is started, the interface library generates a signature area according to the window size input by the APP, and transmits the horizontal coordinate x of the signature area, the vertical coordinate y of the signature area, the width w of the signature area, and the height h of the signature area to HX6802; at the same time, the DLL also needs to negotiate with HX6802 to obtain the SM4 encryption key required for single coordinate transmission. After the signature is started, HX6802 enables the serial port reception interrupt for receiving the serial port data sent by the electromagnetic screen. HX6802 converts the input signature area starting point horizontal and vertical coordinates, width and height into the effective area of the electromagnetic screen. The electromagnetic gun effective area is used to filter out the original coordinate points located outside the effective area of the electromagnetic screen.
[0047] After starting the signature, HX6802 starts the signature real-time drawing process. After starting the signature, HX6802 receives the serial port data sent by the electromagnetic screen serial port, calculates the original coordinate point horizontal coordinate x, vertical coordinate y, and pressure p. First, filter out the original coordinate points located outside the effective area of the electromagnetic screen, and the remaining coordinate points are effective coordinate points. The effective coordinate points are integrated into HID format (HID plaintext format is shown in Figure 4 ), and are sent to the PC after SM4 encryption. After receiving the data, the interface library decrypts the data through SM4 to obtain the coordinate values, converts the coordinate values into the current window coordinates, draws the handwriting, and saves the original coordinate values. The overall process is shown in Figure 5 .
[0048] PC-side handwriting drawing: PC-side signature handwriting drawing is completed in the DLL side, which is convenient for the client program to call and transplant. A hook is installed in the DLL side using the SetWindowsHookEx function to monitor and intercept the message queue sent to the APP window program. The WM_PAINT message is intercepted to realize the drawing work in the APP window area. The DLL side first records the first point collected, and then uses the GDI+ graphics device interface to complete the straight line drawing after the second point is collected. The straight line drawing process is as follows: first, the brush width is obtained by conversion according to the current pressure, and the brush end type is set to a circular end point (LineCapRound); second, SmoothingModeAntiAlias is called to eliminate the jaggies; and finally, DrawLine is called to complete the straight line drawing between two points.
[0049] After the third point is collected, the third point and the second point are drawn in a straight line, and the whole signature process is completed in this way. The double buffering mechanism is used in the whole drawing process, the bitmap in the buffer area is copied to the canvas at one time, so as to solve the interface flicker problem in the drawing process (the other side buffer is in the interface display process, which is prior art, and will not be repeated here).
[0050] After the third point is collected, the third point and the second point are drawn in a straight line, and the whole signature process is completed in this way. The double buffering mechanism is used in the whole drawing process, the bitmap in the buffer area is copied to the canvas at one time, so as to solve the interface flicker problem in the drawing process (the other side buffer is in the interface display process, which is prior art, and will not be repeated here). Figure 6 The process is specifically as follows:
[0051] S41, after receiving the electronic signature acquisition command, the interface library of the PC uses the session key to encrypt the signature trajectory data, and imports the encrypted working key and the master key number transmitted by the server. The interface library generates a trajectory picture of the original coordinate value and saves it to a specified location of the PC;
[0052] S42, the encrypted ciphertext of the signature trajectory data, the encrypted working key and the master key number are sent to the HX6802. After receiving the data, the HX6802 first decrypts the signature trajectory data to obtain the plaintext data using the session key, and then obtains the corresponding master key PriKey according to the master key number, and decrypts the encrypted working key WorkKey' to obtain the plaintext working key WorkKey using the master key PriKey;
[0053] S43, the plaintext working key WorkKey is used as an encryption key to encrypt the plaintext data of the signature trajectory data to obtain the encrypted trajectory data, which is returned to the PC.
[0054] The electronic signature encryption method described in the embodiment involves two communication mechanisms, one is the fixed key plus random number mechanism, and the other is the session key negotiation mechanism.
[0055] When the device is unlocked, the PC interface library adopts the "fixed key + random number" mechanism when communicating with the HX6802, and all commands are encrypted and transmitted. The "fixed key + random number" mechanism ensures that the encrypted data transmitted each time is random, so even if the communication data is leaked, it cannot be brute-forced. As shown in Figure 7 , the PC and the HX6802 first generate their own random numbers P0 and D0, respectively, and then complete the exchange of random numbers. Finally, the commands in the communication need to add the PC random number and the 6802 random number. Among them, LEN is the length of the ciphertext data, and the data after LEN is the ciphertext data encrypted by the fixed key.
[0056] Single-point transmission and infusion of master keys in the handwriting signature process all need to use encrypted transmission, and the encryption key used by the user each time the signature process is started is different, ensuring the security of the signature data on the data link. The session key generation process is as shown in Figure 8 . The "one-time pad" implementation mechanism is as follows:
[0057] S11, the PC and the encryption and decryption chip generate their own random numbers pr and dr, respectively, and then complete the exchange of random numbers between the two parties;
[0058] S12, the PC sends a public key acquisition instruction to the encryption and decryption chip, and the encryption and decryption chip reads the public key in the NORFLASH in the chip after receiving the instruction, and returns it to the PC;
[0059] S13, the PC generates a 16-byte random seed and encrypts the random seed using the public key, and sends the encryption result to the encryption and decryption chip, and the encryption and decryption chip decrypts the encryption result using the internal private key to obtain the random seed;
[0060] S14, the PC and the encryption and decryption chip use the seed key to obtain the session key by performing bitwise XOR operation on the random numbers dr and pr.
[0061] In this method, the interfaces involved include starting signature, clearing signature, ending signature, and obtaining electronic signature. The definitions are shown in the following table.
[0062] Table 1 Function interface design
[0063]
[0064] Example 3
[0065] The electronic signature encryption device provided by the embodiments of the present disclosure includes a processor and a memory. Optionally, the device can further include a communication interface and a bus. The processor, the communication interface and the memory can communicate with each other through the bus. The communication interface can be used for information transmission. The processor can invoke the logic instructions in the memory to execute the electronic signature encryption method of the above-mentioned embodiments.
[0066] In addition, the logic instructions in the memory described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium.
[0067] The memory, as a computer readable storage medium, can be used to store software programs, computer executable programs, such as program instructions / modules corresponding to the method in the embodiments of the present disclosure. The processor executes the function application and data processing by running the program instructions / modules stored in the memory, that is, implements the electronic signature encryption method in the above-mentioned embodiments.
[0068] The memory can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory.
[0069] Embodiment 4
[0070] The embodiments of the present disclosure provide a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are configured to execute the above-mentioned electronic signature encryption method.
[0071] The computer readable storage medium described above can be a transitory computer readable storage medium or a non-transitory computer readable storage medium.
[0072] The technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in the embodiments of the present disclosure. The aforementioned storage medium can be a non-transitory storage medium, including a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. various media that can store program codes, or can be a transitory storage medium.
[0073] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for descriptive purposes only and is not intended to limit the scope of protection. As used in the description herein, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used herein means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.
[0074] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
Claims
1. An electronic signature encryption method characterized by: Comprise the following steps: S01, perfusion main key, the main key is generated by the server, the PC end encrypts the main key sent by the server through session key to obtain ciphertext PriKey', and then sends the ciphertext PriKey' and the number of main keys to the encryption and decryption chip, the encryption and decryption chip decrypts the ciphertext PriKey' through the session key to obtain the plaintext of the main key, and stores the plaintext of the main key to the on-chip NORFLASH;The main key is used for decrypting the working key, and the working key is used for obtaining electronic signature, and the track data is encrypted; S02, signature start, the interface library of PC generates the signature area according to the window size input by APP, and transmits the starting point coordinates, width and height of the signature area to the encryption and decryption chip, and the encryption and decryption chip generates the handwriting effective area according to the input signature area starting point coordinates, width and height;At the same time, the interface library of PC also negotiates with the encryption and decryption chip to obtain the session key required for single coordinate transmission, and the encryption and decryption chip receives the data sent by the handwriting device after the signature starts; S03, real-time drawing of signature, after the signature starts, the encryption and decryption chip receives the plaintext coordinates sent by the handwriting device, calculates the original coordinate point horizontal coordinate, vertical coordinate and pressure, first filters the original coordinate point, filters out the original coordinate point outside the handwriting effective area, and the remaining is the effective coordinate point, integrates the effective coordinate point into HID format, encrypts the ciphertext coordinates through the session key and sends them to the PC, and the interface library of PC receives the ciphertext coordinates, decrypts the ciphertext coordinates using the session key to obtain the original coordinate value, converts the original coordinate value into the current window coordinate, draws the handwriting, and saves the original coordinate value; S04, obtaining electronic signature, after the user signs, the electronic signature is obtained, the interface library of PC sends all the stored original coordinate values to the encryption and decryption chip, and the encryption and decryption chip encrypts the data using the working key to obtain the encrypted track data and returns it to the PC end; Step S04 is specifically: S41, after the interface library of PC receives the electronic signature obtaining command, the signature track data is encrypted using the session key, and the encrypted working key and the main key number transmitted by the server are imported, the interface library generates the track picture of the original coordinate value and saves it to the specified position of PC; S42, the encrypted ciphertext of the signature track data, the encrypted working key and the main key number are sent to the encryption and decryption chip, and after receiving the data, the encryption and decryption chip first decrypts to obtain the plaintext data of the signature track data using the session key, then obtains the corresponding main key PriKey according to the main key number, and decrypts the encrypted working key WorkKey' using the main key PriKey to obtain the plaintext working key WorkKey; S43, the plaintext working key WorkKey is used as the encryption key to encrypt the plaintext data of this segment of signature track data, and the encrypted track data is returned to PC.
2. The electronic signature encryption method of claim 1, wherein: The generation process of session key is: S11, PC and encryption and decryption chip generate their own random numbers pr and dr, and then complete the exchange of random numbers between both parties. S12, the PC sends a public key acquisition instruction to the encryption and decryption chip, the encryption and decryption chip reads the public key in the NORFLASH in the chip after receiving the instruction, and returns the public key to the PC; S13, the PC generates a random seed, encrypts the random seed using the public key, and sends the encryption result to the encryption and decryption chip, the encryption and decryption chip decrypts the encryption result using the internal private key to obtain the random seed; S14, the PC and the encryption and decryption chip use the seed key to obtain the session key by performing bitwise XOR summation on the random number dr and pr.
3. The electronic signature encryption method of claim 2, wherein: The session key adopts a one-time one-mechanism.
4. The electronic signature encryption method of claim 1, wherein: In step S03, the PC end signature pen trajectory is drawn in the interface library, a hook is installed in the interface library using the SetWindowsHookEx function to monitor and intercept the message queue sent to the APP window program, the WM_PAIT message is intercepted to realize the drawing work of the APP window area, the interface library first records the first point collected, the second point is collected, and the GDI graphics device interface is used to complete the straight line drawing, the third point is collected, and the third point and the second point are drawn in a straight line, and the same operation is performed on the last collected point until the entire signature process is completed.
5. The electronic signature encryption method of claim 4, wherein: A buffer area is set during the drawing process, and the bitmap in the buffer area is copied to the canvas at one time.
6. The electronic signature encryption method of claim 1, wherein: When the encryption and decryption chip is used for the first time or the encryption and decryption chip needs to be updated with new firmware after being locked, the encryption and decryption chip is unlocked first, and when the encryption and decryption chip is unlocked, not only the lock state of the encryption and decryption chip is released, but also the session key for communication of the collected coordinates is generated; meanwhile, the encryption and decryption chip detects whether it is violently disassembled in real time, and when the detection point input is high level, it is determined that the encryption and decryption chip has been violently disassembled, at this time, the encryption and decryption chip erases the master key, and sets the encryption and decryption chip to the locked state.
7. The electronic signature encryption method of claim 6, wherein: When the encryption and decryption chip is unlocked, the interface library of the PC communicates with the encryption and decryption chip using a fixed key plus random number mechanism, and all commands are encrypted and transmitted, first, the PC and the encryption and decryption chip generate their own random numbers, exchange the random numbers, and finally the commands in the communication need to add the PC random number and the encryption and decryption chip random number.
8. An electronic signature encryption apparatus comprising a processor and a memory having stored program instructions, characterized in that, The processor is configured to execute the electronic signature encryption method of any one of claims 1 to 7 when running the program instructions.
9. A storage medium storing program instructions, characterized in that, The program instructions execute the electronic signature encryption method of any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Credible electronic handwriting generation method and device and storage medium
CN116881940A
Electromagnetic signature method capable of protecting handwriting characteristics of user
CN118965380A