Method and system for generating random number by using mobile phone holding micro-vibration and touch pressure

By collecting and processing acceleration and angular velocity signals and touch event parameters when a user holds a mobile phone, highly random numbers are generated, solving the problems of hardware dependence and insufficient randomness in existing technologies, and providing a simple and secure random number generation solution.

CN121125075APending Publication Date: 2025-12-12HENAN INFORMATIZATION GRP CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511230677.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-30
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing random number generation methods require additional hardware support or have limited sources of randomness, and they interfere with user operations, failing to meet the diverse needs of modern information security.

Method used

By collecting triaxial acceleration signals, angular velocity signals, pressure values ​​and position parameters of touch events when a user holds a mobile terminal, and combining signal processing and randomness extraction algorithms, highly random numbers without external hardware are generated, including preprocessing, feature extraction, mapping, bias elimination and expansion processes.

Benefits of technology

It achieves random number generation without external hardware, with high randomness and simple operation, improving security and unpredictability, and is suitable for the modern information security field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125075A_ABST
    Figure CN121125075A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information security and random number generation, and particularly discloses a method and a system for generating a random number by utilizing mobile phone holding micro-vibration and touch pressure, and the random number is generated by collecting physical behavior characteristics when a user holds a mobile terminal within preset time and combining sensor signal processing and a randomness extraction algorithm. The random number generation does not need external hardware support, the randomness is higher, the operation is simple and convenient, and the problems of insufficient randomness and complex operation caused by dependence on an external noise source or specific input in the prior art are solved. According to the method, the dependence on the external environment or additional hardware is avoided, the security, unpredictability and practicability of random number generation are remarkably improved through a multi-level security protection mechanism, reliable technical support is provided for the field of modern information security, and the method has the advantages of being easy to implement, low in cost and high in security and has wide application prospects. The method is suitable for popularization and application in multiple fields of mobile payment, Internet of Things, games and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of information security and random number generation technology. More specifically, this invention relates to a method and system for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure. Background Technology

[0002] With the widespread adoption of mobile smart terminals and the development of sensor technology, the importance of random number generation in modern cryptography and information security is becoming increasingly prominent. Existing random number generation methods are mainly divided into two categories: pseudo-random numbers and true random numbers. Pseudo-random numbers are generated through algorithms, and their results have a certain degree of predictability; true random numbers rely on hardware noise or external events as entropy sources, such as using keyboard input time intervals or mouse movements to generate random numbers, but their randomness source is relatively singular. Furthermore, methods that use user signature traces, fingerprints, or facial features combined with timestamps to generate random numbers require specific user input and may involve personal privacy protection issues. Methods that collect data from multiple sensors such as gyroscopes, magnetometers, and location information to generate entropy sources rely more on hardware conditions than on uncontrollable user behavior for randomness. Methods that generate random numbers by collecting external sounds through microphones, capturing image noise through cameras, or collecting breathing and heartbeat signals through wearable devices are somewhat dependent on the external environment or additional hardware.

[0003] Existing technologies for random number generation either require additional hardware support for some methods, have limited sources of randomness for others, or cause some degree of interference with user operations. Therefore, there is an urgent need for a random number generation method that requires no external hardware, offers higher randomness, and is easy to operate, to meet the diverse needs of modern information security. Summary of the Invention

[0004] This invention aims to provide a method and system for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure. By collecting the physical behavior characteristics of a user holding a mobile terminal within a predetermined time, and combining sensor signal processing and randomness extraction algorithms, a random number generation scheme that requires no external hardware, has higher randomness, and is easy to operate is constructed.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] In a first aspect, the present invention provides a method for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure, the method comprising the steps of:

[0007] In response to the random number generation request, the three-axis acceleration signal and angular velocity signal of the user holding the mobile terminal within a predetermined time are obtained, and the touch point position coordinates, pressure value, touch point area and elliptical main and secondary axis length parameters of the touch event are recorded simultaneously.

[0008] The triaxial acceleration and angular velocity signals are preprocessed to remove the influence of gravity and low-frequency drift, resulting in a centered micro-vibration sequence. The difference between adjacent sampled values, the zero-crossing interval, and the amplitude distribution characteristics are calculated based on the micro-vibration sequence to obtain micro-vibration characteristics. The pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event are processed to calculate the time difference, pressure difference, and area difference between consecutive touches, resulting in touch characteristics.

[0009] The preprocessed micro-vibration features and touch features are merged in chronological order and mapped into a binary bit stream;

[0010] The binary bit stream is subjected to deviation elimination processing using a random extraction algorithm to obtain an unbiased bit sequence;

[0011] The unbiased bit sequence is compressed using a secure hash function to generate an entropy seed, and then the entropy seed is expanded to a random number output of the required length using a random number expansion algorithm.

[0012] Preferably, the preprocessing of the triaxial acceleration and angular velocity signals removes the influence of gravity and low-frequency drift to obtain a centered micro-vibration sequence. Based on the micro-vibration sequence, the difference between adjacent sampled values, the zero-crossing interval, and the amplitude distribution characteristics are calculated to obtain the micro-vibration characteristics, including:

[0013] The gravity component in the triaxial acceleration signal is removed by a high-pass filter, and the low-frequency drift in the angular velocity signal is removed by an offset correction algorithm.

[0014] Calculate the difference between adjacent sampled values, count the frequency of the sign change of the difference, and record the zero-crossing interval to quantify the signal fluctuation characteristics;

[0015] Based on the amplitude distribution characteristics, the ratio of the maximum amplitude to the minimum amplitude in each sampling period is calculated, and the ratio is converted into a numerical representation with a fixed bit width.

[0016] Preferably, the process of processing the pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event to calculate the time difference, pressure difference, and area difference between consecutive touches to obtain touch features includes:

[0017] Calculate the time interval between consecutive touch events, and modulo the millisecond value of the time interval onto a fixed base to generate a fixed-width bit map;

[0018] Calculate the pressure difference between two adjacent touch events, and modulo the absolute value of the pressure difference to a fixed base to generate a fixed-width bit map;

[0019] Calculate the area difference between two adjacent touch events and store the frequency of sign change of the area difference as a feature parameter.

[0020] Preferably, the deviation elimination processing of the binary bitstream using a random extraction algorithm includes:

[0021] Divide the binary bit stream into groups of two bits, and compare the values ​​of the two bits in each group in turn;

[0022] If two bit values ​​are the same, discard that group of bits; if two bit values ​​are different, retain the first bit value and add it to the unbiased bit sequence.

[0023] Preferably, the step of compressing the unbiased bit sequence using a secure hash function to generate an entropy seed includes:

[0024] The unbiased bit sequence is segmented, with each segment containing a fixed number of bits.

[0025] Each unbiased bit sequence is input into a secure hash function to generate a fixed-length entropy seed.

[0026] Preferably, the step of expanding the entropy seed to a random number output of the required length using a random number expansion algorithm includes:

[0027] Generate an extended random number sequence based on the entropy seed;

[0028] Extract the first few bits of the extended random number sequence according to application requirements, and generate random numbers of a specified length.

[0029] Preferably, generating an extended random number sequence based on an entropy seed includes:

[0030] The entropy seed is input into an elliptic curve-based random number expander, and an expanded random number sequence is generated through elliptic curve dot product operations.

[0031] Alternatively, the CTR mode of the AES encryption algorithm can be used, with the entropy seed as the initial vector, and an extended random number sequence can be generated through iterative encryption.

[0032] Preferably, during the random number generation process, a timestamp or device status is used as additional input, including:

[0033] Obtain the device model identifier, firmware version identifier, cumulative reboot count, monotonic counter value, and current timestamp information of the mobile terminal;

[0034] The device model identifier and firmware version identifier are hashed separately, and the lower 16 bits are extracted as the device feature identifier.

[0035] Convert the cumulative restart count and monotonic counter value into 32-bit binary representations respectively, and convert the current timestamp information into a 48-bit binary representation;

[0036] The device feature identifier, cumulative restart count, monotonic counter value, and current timestamp information are concatenated to generate a personalized string;

[0037] The personalized string is combined with the entropy seed and then compressed twice using a secure hash function to generate the final random number seed.

[0038] Preferably, the random number generation method further includes a security protection mechanism for the sensor interface, including:

[0039] When starting the random number generation process, initialize the security protection module of the sensor interface;

[0040] By using the permission management interface provided by the operating system kernel, access permissions of other applications to the accelerometer, gyroscope, and touch sensor can be restricted;

[0041] During the data acquisition process, the status of the sensor interface is monitored in real time to detect any abnormal behavior of malicious programs attempting to read or tamper with the acquired data.

[0042] If abnormal behavior is detected, the random number generation process will be immediately interrupted and a security warning will be issued to the user.

[0043] After the random number generation is complete, clear the cached data in the sensor interface.

[0044] Secondly, the present invention provides a system for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure, the system comprising:

[0045] The data acquisition module is used to respond to random number generation requests, acquire the three-axis acceleration and angular velocity signals when the user holds the mobile terminal within a predetermined time, and simultaneously record the touch point position coordinates, pressure value, touch point area, and elliptical principal and secondary axis length parameters of the touch event.

[0046] The feature extraction module is used to preprocess the triaxial acceleration and angular velocity signals to remove the influence of gravity and low-frequency drift, obtain a centered micro-vibration sequence, and calculate the difference between adjacent sampled values, zero-crossing interval, and amplitude distribution characteristics based on the micro-vibration sequence to obtain micro-vibration features; it also processes the pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event to calculate the time difference, pressure difference, and area difference between consecutive touches to obtain touch features;

[0047] The feature mapping module is used to merge the preprocessed micro-vibration features and touch features in chronological order and map them into a binary bit stream;

[0048] The bias elimination module is used to perform bias elimination processing on the binary bit stream using a random extraction algorithm to obtain an unbiased bit sequence;

[0049] The random number generation module is used to compress the unbiased bit sequence using a secure hash function to generate an entropy seed, and then expand the entropy seed to a random number output of the required length using a random number expansion algorithm.

[0050] This invention provides a method and system for generating random numbers using the micro-vibrations of holding a mobile phone and the pressure of touch. By integrating the user's physical behavior characteristics with the signal processing technology of the smart terminal's built-in sensors, it constructs a random number generation method that requires no external hardware support, has higher randomness, and is easy to operate. Compared with existing technologies, this invention not only avoids dependence on the external environment or additional hardware, but also significantly improves the security, unpredictability, and practicality of random number generation through a multi-layered security protection mechanism, providing reliable technical support for the field of modern information security. Attached Figure Description

[0051] Figure 1 This is a flowchart of the method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure provided by the present invention.

[0052] Figure 2 yes Figure 1 A flowchart of a preferred embodiment of step S2.

[0053] Figure 3 yes Figure 1 A flowchart of another preferred embodiment of step S2.

[0054] Figure 4 yes Figure 1 A flowchart of a preferred embodiment of step S5.

[0055] Figure 5 This is a flowchart of another preferred embodiment of the method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure provided by the present invention.

[0056] Figure 6 This is a schematic diagram of a system provided by the present invention that generates random numbers using micro-vibrations of holding a mobile phone and touch pressure. Detailed Implementation

[0057] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0058] Reference Figure 1 The present invention provides a method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure, the method comprising the following steps:

[0059] S1. In response to the random number generation request, obtain the three-axis acceleration signal and angular velocity signal when the user holds the mobile terminal within a predetermined time, and simultaneously record the touch point position coordinates, pressure value, touch point area, and elliptical main and secondary axis length parameters of the touch event.

[0060] In step S1, when the application needs to generate random numbers, the random number acquisition process is initiated. The user opens the application that requires random numbers, clicks the "Generate Random Number" button, and is prompted to hold the mobile terminal in a normal posture and maintain this grip or lightly touch the screen for a predetermined time (e.g., 1-2 seconds). Simultaneously, the program activates the sensors, including but not limited to accelerometers and gyroscopes, to collect triaxial acceleration (α) over 2 seconds at a sampling frequency of 200Hz. x a y a z and angular velocity g x g y g z It obtains the three-axis acceleration and angular velocity signals when the mobile terminal is held within a predetermined time, and simultaneously captures the x-coordinates of any touch event. i y i Pressure p i Area data and parameters such as the length of the ellipse's principal / secondary axes.

[0061] S2. The triaxial acceleration signal and angular velocity signal are preprocessed to remove the influence of gravity and low-frequency drift, resulting in a centered micro-vibration sequence. The difference between adjacent sampled values, the zero-crossing interval, and the amplitude distribution characteristics are calculated based on the micro-vibration sequence to obtain the micro-vibration characteristics. The pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event are processed to calculate the time difference, pressure difference, and area difference between consecutive touches to obtain the touch characteristics.

[0062] In step S2, the triaxial acceleration and angular velocity signals are preprocessed, such as... Figure 2 As shown, it specifically includes the following:

[0063] S211. Remove the gravity component from the triaxial acceleration signal using a high-pass filter, and remove the low-frequency drift from the angular velocity signal using an offset correction algorithm.

[0064] S212. Calculate the differences Δa and Δg between adjacent sampled values, count the frequency of the sign change of the difference, and record the zero-crossing interval to quantify the signal fluctuation characteristics.

[0065] S213. Based on the amplitude distribution characteristics, calculate the ratio of the maximum amplitude to the minimum amplitude in each sampling period, and convert the ratio into a numerical representation with a fixed bit width.

[0066] The above preprocessing can effectively extract the random features in the signal, while reducing the impact of external interference on signal quality.

[0067] Regarding the processing of the pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event, such as... Figure 3 As shown, it specifically includes the following:

[0068] S221. Calculate the time interval Δt between consecutive touch events, and modulo the millisecond value of the time interval Δt onto a fixed base to generate a fixed-width bit mapping;

[0069] S222. Calculate the pressure difference Δp between two adjacent touch events, and use the absolute value of the pressure difference Δp modulo a fixed base to generate a fixed-width bit mapping;

[0070] S223. Calculate the area difference ΔA between two adjacent touch events, and store the sign change frequency of the area difference ΔA as a feature parameter.

[0071] This invention further enhances the unpredictability of random number generation through the above-mentioned multi-dimensional analysis of touch behavior.

[0072] S3. Merge the preprocessed micro-vibration features and touch features in chronological order and map them into a binary bit stream.

[0073] For example: map the lower two bits (or absolute values ​​modulo 4) of Δa and Δg to 2 bits; map the values ​​of Δp and ΔA modulo 4 to 2 bits; and map the millisecond count of Δt modulo 2 to 1 bit. Concatenate all mapping results into a bit stream according to the sampling time order.

[0074] S4. The binary bit stream is subjected to deviation elimination processing using a random extraction algorithm to obtain an unbiased bit sequence.

[0075] This embodiment concatenates all mapping results into a bit sequence according to the sampling time order. The Von Neumann algorithm is used to eliminate bias in the binary bit stream. Specifically, the binary bit stream is divided into groups of two bits, and the values ​​of the two bits in each group are compared sequentially. If the two bit values ​​are the same, the group is discarded; if the two bit values ​​are different, the first bit value is retained and added to the unbiased bit sequence. Of course, this embodiment is not limited to the Von Neumann algorithm; other bias elimination methods can also be used, such as the Elias extractor or the Peres extractor. This embodiment ensures high uniformity and independence of the generated random numbers through rigorous bias elimination processing.

[0076] S5. Compress the unbiased bit sequence using a secure hash function to generate an entropy seed, and then expand the entropy seed to a random number output of the required length using a random number expansion algorithm.

[0077] In step S5, this embodiment performs a process of compressing the unbiased bit sequence to generate an entropy seed, as follows: Figure 4 As shown, the details are as follows:

[0078] S501. The unbiased bit sequence is segmented, with each segment containing a fixed number of bits.

[0079] S502. Input each unbiased bit sequence into a secure hash function to generate a fixed-length entropy seed.

[0080] For example, divide the obtained unbiased bit sequence into segments of 256 bits each, and input them into the SHA-256 hash function to obtain a 256-bit entropy seed.

[0081] After obtaining the entropy seed, an extended random number sequence is generated based on the entropy seed. This embodiment can generate the extended random number sequence in several ways; the following describes two preferred methods: the first is through elliptic curves, and the second is using the AES encryption algorithm, as detailed below:

[0082] The entropy seed is input into an elliptic curve-based random number expander, and an expanded random number sequence is generated through elliptic curve dot product operations.

[0083] Alternatively, the CTR mode of the AES encryption algorithm can be used, with the entropy seed as the initial vector, and an extended random number sequence can be generated through iterative encryption.

[0084] After generating the extended random number sequence, the first few bits of the extended random number sequence are truncated according to application requirements to generate random numbers of a specified length. The selection of the above-mentioned extended algorithm in this invention is based on the computing power of the user's equipment, which can ensure both security and efficiency.

[0085] In a preferred embodiment, during the data acquisition phase, the present invention introduces a timestamp or device status as additional input to enhance security, such as... Figure 5 As shown, the specific steps include:

[0086] S10. Obtain the device model identifier, firmware version identifier, cumulative restart count, monotonic counter value, and current timestamp information of the mobile terminal;

[0087] S20. Perform hash operations on the device model identifier and firmware version identifier respectively, and extract the lower 16 bits as the device feature identifier;

[0088] S30. Convert the cumulative restart count and monotonic counter value into 32-bit binary representations respectively, and convert the current timestamp information into a 48-bit binary representation;

[0089] S40. Generate a personalized string by concatenating the device feature identifier, cumulative restart count, monotonic counter value and current timestamp information.

[0090] S50. Combine the personalized string with the entropy seed, and perform secondary compression using a secure hash function to generate the final random number seed.

[0091] The above-mentioned technical means in this embodiment significantly improves the anti-attack capability of random number generation through multi-dimensional data fusion.

[0092] To protect the security of the sensor interface and enhance real-time monitoring of the data acquisition process, the following steps are implemented: When the application initiates the random number generation process, the security protection module of the sensor interface is initialized; access permissions for the accelerometer, gyroscope, and touch sensor are restricted by the permission management interface provided by the operating system kernel; during data acquisition, the status of the sensor interface is monitored in real time to detect any malicious programs attempting to read or tamper with the acquired data; if abnormal behavior is detected, the random number generation process is immediately interrupted, and a security warning is issued to the user; after random number generation is complete, cached data in the sensor interface is cleared, and related resources are released to prevent data leakage risks. These technical measures, through a multi-layered security protection mechanism, ensure the reliability of the random number generation process.

[0093] To further enhance the unpredictability of random numbers through multi-dimensional feature analysis of collected data, the invention includes the following steps: In the data preprocessing stage, frequency domain analysis is performed on the collected triaxial acceleration and angular velocity signals to extract the main frequency components and their amplitude distribution characteristics; statistical analysis is conducted on the pressure value, touch area, and elliptical principal and secondary axis length parameters of touch events, calculating their mean, variance, and skewness; the frequency domain analysis results and statistical analysis results are mapped into a fixed-width binary bitstream and merged with the original feature data; the merged bitstream is compressed using a secure hash function to generate an entropy seed with a higher entropy value; according to application requirements, the entropy seed is input into a random number expansion algorithm to generate random numbers of a specified length. This invention further improves the complexity and randomness of random numbers through in-depth mining of collected data.

[0094] To optimize the performance of the random number generation process, this invention specifically includes the following steps: In the data acquisition phase, the sampling rate and sampling time are dynamically adjusted based on the hardware performance of the user device to balance the security and efficiency of random number generation; in the data preprocessing phase, parallel computing technology is used to process the acquired triaxial acceleration signals, angular velocity signals, and touch event data in real time; in the randomness extraction phase, a hardware accelerator is used to execute the Von Neumann extraction algorithm and the calculation of a secure hash function to improve processing speed; in the random number expansion phase, a suitable random number expansion algorithm is selected based on the computing power of the user device, such as an elliptic curve expander or the AES-CTR mode; after random number generation is completed, key performance indicators during the generation process, such as generation time and entropy value, are recorded for subsequent optimization and improvement. This invention significantly improves the overall efficiency of random number generation through dynamic adjustment and hardware acceleration.

[0095] To optimize the performance of the random number generation process, this invention further includes the following steps: In the data acquisition phase, the sampling rate and sampling time are dynamically adjusted based on the hardware performance of the user device to balance the security and efficiency of random number generation; in the data preprocessing phase, parallel computing technology is used to process the acquired triaxial acceleration signals, angular velocity signals, and touch event data in real time; in the randomness extraction phase, a hardware accelerator is used to execute the Von Neumann extraction algorithm and the calculation of a secure hash function to improve processing speed; in the random number expansion phase, a suitable random number expansion algorithm is selected based on the computing power of the user device, such as an elliptic curve expander or the AES-CTR mode; after random number generation is completed, key performance indicators during the generation process, such as generation time and entropy value, are recorded for subsequent optimization and improvement. This invention significantly improves the overall efficiency of random number generation through dynamic adjustment and hardware acceleration.

[0096] To evaluate the quality of generated random numbers, this invention specifically includes the following steps: After random number generation, the generated random numbers are evaluated using a standard randomness test suite (such as NIST SP 800-22); the uniformity, independence, and unpredictability of the random numbers are evaluated, and the test results are recorded; if the random numbers do not meet the quality requirements, the parameters of the randomness extraction algorithm are readjusted or the sampling time is increased to improve the entropy value of the random numbers; after the random numbers meet the quality requirements, the test results are stored together with the random numbers for subsequent auditing and verification; new security threats and challenges are addressed by regularly updating the randomness extraction algorithm and secure hash function. This invention ensures the long-term effectiveness of the random number generation method through rigorous testing and continuous optimization.

[0097] Based on the above-described method for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure, this invention also provides a system for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure, such as... Figure 6 As shown, the system includes:

[0098] Data acquisition module 1 is used to respond to random number generation requests, acquire the three-axis acceleration signal and angular velocity signal when the user holds the mobile terminal within a predetermined time, and simultaneously record the touch point position coordinates, pressure value, touch point area and elliptical main and secondary axis length parameters of the touch event;

[0099] Feature extraction module 2 is used to preprocess the triaxial acceleration signal and angular velocity signal to remove the influence of gravity and low-frequency drift, obtain a centered micro-vibration sequence, and calculate the difference between adjacent sampled values, zero-crossing interval, and amplitude distribution characteristics based on the micro-vibration sequence to obtain micro-vibration features; and to process the pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event to calculate the time difference, pressure difference, and area difference between consecutive touches to obtain touch features;

[0100] Feature mapping module 3 is used to merge the preprocessed micro-vibration features and touch features in chronological order and map them into a binary bit stream;

[0101] Deviation elimination module 4 is used to perform deviation elimination processing on the binary bit stream using a random extraction algorithm to obtain an unbiased bit sequence;

[0102] The random number generation module 5 is used to compress the unbiased bit sequence using a secure hash function to generate an entropy seed, and to extend the entropy seed to a random number output of the required length using a random number extension algorithm.

[0103] In this embodiment of the invention, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0104] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0105] This invention also provides a computer device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement the method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure as provided in the above method embodiments.

[0106] In summary, the method and system for generating random numbers using the micro-vibrations of holding a mobile phone and touch pressure provided by this invention are highly effective because the physiological micro-tremors of the human body are influenced by multiple factors of nerves and muscles, making them unpredictable. Furthermore, touch pressure and contact area naturally fluctuate with time and movement, resulting in a high entropy value and thus higher randomness. No external hardware is required; it can be achieved solely using the built-in accelerometer, gyroscope, and touchscreen of the mobile terminal, eliminating the need for microphones, cameras, or other noise sources. Users only need to hold the device normally or briefly swipe the screen to generate random numbers, which is more convenient than requiring signature input or vocalization. By adjusting the sampling time, sampling rate, and extraction algorithm, the entropy and output length of the random numbers can be flexibly adjusted. It can also be combined with existing random number generators to improve overall security. It does not involve collecting sensitive biometric features of the user (such as fingerprints or facial images), reducing privacy risks.

[0107] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments of the present invention have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0108] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0109] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure, characterized in that, The method includes the following steps: In response to the random number generation request, the three-axis acceleration signal and angular velocity signal of the user holding the mobile terminal within a predetermined time are obtained, and the touch point position coordinates, pressure value, touch point area and elliptical main and secondary axis length parameters of the touch event are recorded simultaneously. The triaxial acceleration and angular velocity signals are preprocessed to remove the influence of gravity and low-frequency drift, resulting in a centered micro-vibration sequence. The difference between adjacent sampled values, the zero-crossing interval, and the amplitude distribution characteristics are calculated based on the micro-vibration sequence to obtain the micro-vibration characteristics. The pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event are processed to calculate the time difference, pressure difference, and area difference between consecutive touches, thereby obtaining the touch characteristics. The preprocessed micro-vibration features and touch features are merged in chronological order and mapped into a binary bit stream; The binary bit stream is subjected to deviation elimination processing using a random extraction algorithm to obtain an unbiased bit sequence; The unbiased bit sequence is compressed using a secure hash function to generate an entropy seed, and then the entropy seed is expanded to a random number output of the required length using a random number expansion algorithm.

2. The method for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure as described in claim 1, characterized in that, The triaxial acceleration and angular velocity signals are preprocessed to remove the influence of gravity and low-frequency drift, resulting in a centered micro-vibration sequence. Based on this sequence, the difference between adjacent sampled values, the zero-crossing interval, and the amplitude distribution characteristics are calculated to obtain the micro-vibration features, including: The gravity component in the triaxial acceleration signal is removed by a high-pass filter, and the low-frequency drift in the angular velocity signal is removed by an offset correction algorithm. Calculate the difference between adjacent sampled values, count the frequency of the sign change of the difference, and record the zero-crossing interval to quantify the signal fluctuation characteristics; Based on the amplitude distribution characteristics, the ratio of the maximum amplitude to the minimum amplitude in each sampling period is calculated, and the ratio is converted into a numerical representation with a fixed bit width.

3. The method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure according to claim 1, characterized in that, The process involves processing the pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event to calculate the time difference, pressure difference, and area difference between consecutive touches, thereby obtaining touch characteristics, including: Calculate the time interval between consecutive touch events, and modulo the millisecond value of the time interval onto a fixed base to generate a fixed-width bit map; Calculate the pressure difference between two adjacent touch events, and modulo the absolute value of the pressure difference to a fixed base to generate a fixed-width bit map; Calculate the area difference between two adjacent touch events and store the frequency of sign change of the area difference as a feature parameter.

4. The method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure according to claim 1, characterized in that, The process of using a random extraction algorithm to eliminate deviations in the binary bitstream includes: Divide the binary bit stream into groups of two bits, and compare the values ​​of the two bits in each group in turn; If two bit values ​​are the same, discard that group of bits; if two bit values ​​are different, retain the first bit value and add it to the unbiased bit sequence.

5. The method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure according to claim 4, characterized in that, The step of compressing the unbiased bit sequence using a secure hash function to generate an entropy seed includes: The unbiased bit sequence is segmented, with each segment containing a fixed number of bits. Each unbiased bit sequence is input into a secure hash function to generate a fixed-length entropy seed.

6. The method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure according to claim 1, characterized in that, The step of expanding the entropy seed to the required length of random number output using a random number expansion algorithm includes: Generate an extended random number sequence based on the entropy seed; Extract the first few bits of the extended random number sequence according to application requirements, and generate random numbers of a specified length.

7. The method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure according to claim 6, characterized in that, The step of generating an extended random number sequence based on an entropy seed includes: The entropy seed is input into an elliptic curve-based random number expander, and an expanded random number sequence is generated through elliptic curve dot product operations. Alternatively, the CTR mode of the AES encryption algorithm can be used, with the entropy seed as the initial vector, and an extended random number sequence can be generated through iterative encryption.

8. The method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure according to claim 1, characterized in that, During the random number generation process, timestamps or device status are used as additional inputs, including: Obtain the device model identifier, firmware version identifier, cumulative reboot count, monotonic counter value, and current timestamp information of the mobile terminal; The device model identifier and firmware version identifier are hashed separately, and the lower 16 bits are extracted as the device feature identifier. Convert the cumulative restart count and monotonic counter value into 32-bit binary representations respectively, and convert the current timestamp information into a 48-bit binary representation; The device feature identifier, cumulative restart count, monotonic counter value, and current timestamp information are concatenated to generate a personalized string; The personalized string is combined with the entropy seed and then compressed twice using a secure hash function to generate the final random number seed.

9. The method for generating random numbers using micro-vibrations of holding a mobile phone and touch pressure according to claim 1, characterized in that, The random number generation method also includes a security protection mechanism for the sensor interface, including: When starting the random number generation process, initialize the security protection module of the sensor interface; By using the permission management interface provided by the operating system kernel, access permissions of other applications to the accelerometer, gyroscope, and touch sensor can be restricted; During the data acquisition process, the status of the sensor interface is monitored in real time to detect any abnormal behavior of malicious programs attempting to read or tamper with the acquired data. If abnormal behavior is detected, the random number generation process will be immediately interrupted and a security warning will be issued to the user. After the random number generation is complete, clear the cached data in the sensor interface.

10. A system for generating random numbers using micro-vibrations from holding a mobile phone and touch pressure, characterized in that, The system includes: The data acquisition module is used to respond to random number generation requests, acquire the three-axis acceleration and angular velocity signals when the user holds the mobile terminal within a predetermined time, and simultaneously record the touch point position coordinates, pressure value, touch point area, and elliptical principal and secondary axis length parameters of the touch event. The feature extraction module is used to preprocess the triaxial acceleration and angular velocity signals to remove the influence of gravity and low-frequency drift, obtain a centered micro-vibration sequence, and calculate the difference between adjacent sampled values, zero-crossing interval, and amplitude distribution characteristics based on the micro-vibration sequence to obtain micro-vibration features; it also processes the pressure value, touch area, and elliptical principal and secondary axis length parameters of the touch event to calculate the time difference, pressure difference, and area difference between consecutive touches to obtain touch features; The feature mapping module is used to merge the preprocessed micro-vibration features and touch features in chronological order and map them into a binary bit stream; The bias elimination module is used to perform bias elimination processing on the binary bit stream using a random extraction algorithm to obtain an unbiased bit sequence; The random number generation module is used to compress the unbiased bit sequence using a secure hash function to generate an entropy seed, and then expand the entropy seed to a random number output of the required length using a random number expansion algorithm.

Citation Information

Cited By

  • Bimodal man-machine interaction method, system and device based on touch micro-tremor modulation and medium

    CN122018704A

  • A dual-modal human-computer interaction method, system, device, and medium based on touch micro-vibration modulation

    CN122018704B