Patent Description:
Cryptographic systems rely on use of secret data that is known only to authorized persons and unpredictable to others. To achieve this unpredictability, randomization is typically employed. Various applications in cryptography, such as key generation, cryptographic hash functions and nonces, have a requirement for random data.

Pseudorandom number generators (PRNGs) may be used to generate sequences of numbers that are suitable for cryptographic applications. The security strength of cryptographic protocols that employ a PRNG depends on the entropy source of the PRNG. In particular, the choice of a good random initial value, or seed, for a PRNG is crucial for performance and security. High entropy is generally desirable for selecting PRNG seed data.

Generating high quality random data on mobile devices may be challenging. Mobile devices may have limited number of entropy sources, and the available sources may be isolated hardware or software components that are easy to locate and observe. As a consequence, implementations of pseudorandom generators on mobile devices may suffer from weaker security against cryptanalytic attacks.

The relevant state of the art is represented by <CIT>, <CIT> and <CIT>.

Accordingly there is provided a method, a mobile computing device, and a computer program as detailed in the claims that follow.

Reference will now be made, by way of example, to the accompanying drawings which show example embodiments of the present application and in which:.

Like reference numerals are used in the drawings to denote like elements and features.

In one aspect, the present disclosure describes a method for operating a pseudorandom number generator on a mobile computing device. The method includes: collecting raw sensor data from at least one sensor associated with the mobile computing device; selecting a subset of the raw sensor data; retrieving a first representation of accumulated entropy associated with one or more previously acquired raw sensor data sets for the at least one sensor; and generating a seed for a pseudorandom generator based on combining the first representation and the selected subset of raw sensor data.

In another aspect, the present disclosure describes a mobile computing device. The mobile computing device includes at least one sensor, memory, and a processor coupled with the at least one sensor and the memory. The processor is configured to: collect raw sensor data from at least one sensor associated with the mobile computing device; select a subset of the raw sensor data; retrieve a first representation of accumulated entropy associated with one or more previously acquired raw sensor data sets for the at least one sensor; and generate a seed for a pseudorandom generator based on combining the first representation and the selected subset of raw sensor data.

Other example embodiments of the present disclosure will be apparent to those of ordinary skill in the art from a review of the following detailed descriptions in conjunction with the drawings.

Many cryptographic applications, such as secret keys for encryption algorithms and nonces used in various network protocols, rely on existence of random bits. Finding a good (i.e. high entropy) source of random bits can be challenging. Mobile devices generally have a limited number of sources of randomness. These may include, among others, the state of software running on the device, ambient radio conditions, and device system clock. The random values generated from these sources are often insufficient for cryptographic applications. The security of a cryptographic system depends, at least in part, on the quality of the underlying random number generation process. A lack of quality may leave the system vulnerable to attacks or even to complete compromise. Therefore, designing a high quality random number generator is a crucial component of constructing a secure cryptographic system.

The present disclosure describes a mechanism for supplying mobile computing devices with useful random data. In an aspect, a method for generating pseudorandom numbers on mobile devices is disclosed. Raw sensor data is collected from one or more sensors associated with a mobile device. The output from a plurality of observations of raw sensor data is processed and accumulated, to be used as a source of random data. The resulting "accumulated entropy" data may provide high quality initialization data for pseudorandom generators. The operations performed in collecting and processing the raw sensor data are designed to hinder attempts by attackers to obtain useful information on the output of the sensor(s) that produced the accumulated data. The accumulated entropy data may be maintained as a representation of the state of entropy associated with the mobile device, the one or more sensors, and/or a pseudorandom generator of the device.

Reference is first made to <FIG>, which illustrates a block diagram of an example computing device <NUM>. In an example embodiment, the computing device <NUM> may be a mobile communication device. The mobile communication device may be configured for two-way communication, having data and optionally voice communication capabilities, and the capability to communicate with other computer systems, e.g. via the internet. In other embodiments, the computing device <NUM> may take other forms, such as smartwatches, computers, tablets, laptops, or any other mobile electronic device.

The computing device <NUM> of <FIG> may include a housing which houses components of the computing device <NUM>. Internal components of the computing device <NUM> may be constructed on a printed circuit board (PCB). The computing device <NUM> includes a controller including at least one processor <NUM> (such as a microprocessor) which controls the overall operation of the computing device <NUM>. The processor <NUM> interacts with device subsystems, such as a wireless communication subsystem <NUM>, for exchanging radio frequency signals with a wireless network to perform communication functions. The processor <NUM> interacts with additional device subsystems including one or more input interfaces (which may include, without limitation, any of the following: one or more cameras <NUM>, a keyboard, control buttons, microphones <NUM>, a gesture sensor, and/or a touch-sensitive overlay associated with a touchscreen display), flash memory <NUM>, random access memory (RAM) <NUM>, read only memory (ROM) <NUM>, auxiliary input/output (I/O) subsystems <NUM>, a data port <NUM> (which may be a serial data port, such as a Universal Serial Bus (USB) data port), one or more output interfaces (such as a display <NUM>), one or more speakers <NUM>, or other output interfaces), a short-range communication subsystem <NUM>, and other device subsystems generally designated as <NUM>.

In some example embodiments, the auxiliary input/output (I/O) subsystems <NUM> may include an external communication link or interface, for example, an Ethernet connection. The communication subsystem <NUM> may include other wireless communication interfaces for communicating with other types of wireless networks, e.g. Wi-Fi networks.

In some example embodiments, the computing device <NUM> also includes a removable memory module <NUM> (typically including flash memory) and a memory module interface <NUM>. Network access may be associated with a subscriber or user of the computing device <NUM> via the memory module <NUM>, which may be a Subscriber Identity Module (SIM) card for use in a GSM network or other type of memory module for use in the relevant wireless network type. The memory module <NUM> may be inserted in or connected to the memory module interface <NUM> of the computing device <NUM>.

The computing device <NUM> may store data <NUM> in an erasable persistent memory, which in one example embodiment is the flash memory <NUM>. In some example embodiments, the data <NUM> may include service data having information required by the computing device <NUM> to establish and maintain communication with a wireless network. The data <NUM> may also include user application data such as messages (e.g. emails, texts, multimedia messages, etc.), address book and contact information, camera data, calendar and schedule information, notepad documents, image files, and other commonly stored user information stored on the computing device <NUM> by its users, and other data. The data <NUM> stored in the persistent memory (e.g. flash memory <NUM>) of the computing device <NUM> may be organized, at least partially, into a number of databases or data stores each containing data items of the same data type or associated with the same application. For example, email messages, contact records, and task items may be stored in individual databases within the computing device <NUM> memory.

The short-range communication subsystem <NUM> is an additional optional component which provides for communication between the computing device <NUM> and different systems or devices, which need not necessarily be similar devices. For example, the short-range communication subsystem <NUM> may include an infrared device and associated circuits and components, a wireless bus protocol compliant communication mechanism such as a Bluetooth® communication module to provide for communication with similarly-enabled systems and devices, and/or a near-field communication (NFC) interface.

The computing device <NUM> includes one or more cameras <NUM>. The cameras <NUM> are configured to generate camera data, such as images in the form of still photographs and/or video data. The camera data may be captured in the form of an electronic signal which is produced by an image sensor associated with the cameras <NUM>. More particularly, the image sensor is configured to produce an electronic signal in dependence on received light. The image sensor converts an optical image into an electronic signal, which may be output from the image sensor by way of one or more electrical connectors associated with the image sensor. The electronic signal represents electronic image data, which may be referred to as camera data.

The computing device <NUM> includes one or more sensors. In the example embodiment of <FIG>, the computing device <NUM> includes a gyroscope <NUM>, an accelerometer <NUM>, and a magnetometer <NUM>. While <FIG> illustrates three separate sensors, in some embodiments, two or more of these sensors may be provided in a common packaging, such as a common electronic chip. For example, in some embodiments, a single electronic chip may include both an accelerometer <NUM> and a magnetometer <NUM>. Other sensors such as, for example, ambient light sensor, fingerprint sensor, proximity sensor, compass, barometer, and heart rate sensor, may be included in the computing device <NUM>.

The gyroscope <NUM> measures rotational velocity of the gyroscope <NUM>. In the embodiment illustrated, since the gyroscope <NUM> is integrated within the computing device <NUM>, the gyroscope <NUM> effectively measures rotational velocity of the computing device <NUM>. The gyroscope <NUM> includes one or more sensing axes. For example, the gyroscope <NUM> may include three orthogonal sensing axes denoted Gx (to represent the gyroscope's x sensing axis), Gy (to represent the gyroscope's y sensing axis) and Gz (to represent the gyroscope's z sensing axis). The gyroscope <NUM> may produce a gyroscope reading for each of the sensing axes, Gx, Gy, Gz. For example, a gyroscope reading may be produced by the gyroscope <NUM> based on gyroscope measurements associated with the x sensing axis (such as a rotation about the x sensing axis), the y sensing axis (such as a rotation about the y sensing axis), and the z sensing axis (such as a rotation about the z sensing axis). These gyroscope readings collectively form the gyroscope output. That is, the gyroscope output is an electronic signal which is representative of the gyroscope readings for the sensing axes Gx, Gy, Gz of the gyroscope <NUM>.

The accelerometer <NUM> is a device which generates an output signal in dependence on the acceleration of the accelerometer <NUM>. That is, the accelerometer <NUM> produces an output which reflects the acceleration of the accelerometer <NUM>. More particularly, the accelerometer <NUM> may generate an output which specifies the magnitude and/or direction of acceleration. In the embodiment illustrated, since the accelerometer <NUM> is integrated within the computing device <NUM>, the accelerometer <NUM> effectively measures the acceleration of the computing device <NUM>.

The accelerometer <NUM> includes one or more sensing axes. In the embodiment illustrated, the accelerometer <NUM> includes three orthogonal sensing axes denoted Ax (to represent the accelerometer's x sensing axis), Ay (to represent the accelerometer's y sensing axis) and Az (to represent the accelerometer's z sensing axis) Each sensing axis is orthogonal to the other sensing axes. The accelerometer <NUM> may produce an accelerometer reading for each of the sensing axes, Ax, Ay, and Az. For example, an accelerometer reading may be produced by the accelerometer <NUM> based on accelerometer measurements associated with the x sensing axis (such as an acceleration along the x sensing axis), the y sensing axis (such as an acceleration along the y sensing axis), and the z sensing axis (such as an acceleration along the z sensing axis). These accelerometer readings collectively form the accelerometer output. That is, the accelerometer output is an electronic signal which is representative of the accelerometer readings for the sensing axes Ax, Ay, Az of the accelerometer <NUM>.

The magnetometer <NUM> (which may also be referred to as a digital compass) is a measuring instrument which is used to measure the strength and/or direction of magnetic fields. The magnetometer <NUM> generates an electronic signal which reflects the direction and/or strength of a magnetic field in the vicinity of the magnetometer <NUM>. Since the magnetometer <NUM> is mounted within the computing device <NUM>, the magnetometer <NUM> effectively reflects the direction and/or strength of a magnetic field acting on the computing device <NUM>.

The magnetometer <NUM> is, in at least some embodiments, a three axis magnetometer <NUM> which includes three sensing axes Mx, My, Mz. In the embodiment illustrated, the magnetometer <NUM> includes three orthogonal sensing axes denoted Mx (to represent the magnetometer's x sensing axis), My (to represent the magnetometer's y sensing axis) and Mz (to represent the magnetometer's z sensing axis). The magnetometer <NUM> may produce a magnetometer reading for each of the sensing axes, Mx, My, and Mz. For example, a magnetometer reading mx may be produced by the magnetometer <NUM> based on magnetometer measurements associated with the x sensing axis (such as a magnetic field along the x sensing axis), the y sensing axis (such as a magnetic field along the y sensing axis), and the z sensing axis (such as a magnetic field along the z sensing axis). These magnetometer readings collectively form the magnetometer output. That is, the magnetometer output is an electronic signal which is representative of the magnetometer readings for the sensing axes Mx, My, Mz of the magnetometer <NUM>.

A predetermined set of applications that control basic device operations, including data and possibly voice communication applications, may be installed on the computing device <NUM> during or after manufacture. Additional applications and/or upgrades to an operating system <NUM> or software applications <NUM> may also be loaded onto the computing device <NUM> through the wireless network, the auxiliary I/O subsystem <NUM>, the data port <NUM>, the short-range communication subsystem <NUM>, or other suitable device subsystems <NUM>. The downloaded programs or code modules may be permanently installed; for example, written into the program memory (e.g. the flash memory <NUM>), or written into and executed from the RAM <NUM> for execution by the processor <NUM> at runtime.

The processor <NUM> operates under stored program control and executes software modules <NUM> stored in memory such as persistent memory, e.g. in the flash memory <NUM>. As illustrated in <FIG>, the software modules <NUM> may include operating system software <NUM> and one or more applications <NUM> or modules such as, for example, a pseudorandom generator <NUM>. In the example embodiment of <FIG>, the pseudorandom generator <NUM> is illustrated as being implemented as a stand-alone application, but in other example embodiments, the pseudorandom generator <NUM> may be implemented as part of security operations or services of the operating system <NUM>. The software modules <NUM> on the computing device <NUM> may also include a range of additional applications including, for example, a camera application <NUM>, a media playback application, and game applications.

Reference is now made to <FIG>, which is a high-level block diagram illustrating component modules of a pseudorandom number generator (PRNG) <NUM>. The PRNG <NUM> is configured to generate sequences of pseudorandom numbers and/or bits. A PRNG-generated sequence is completely determined by an initial value, or seed. As illustrated, the PRNG <NUM> includes a seed generator module <NUM>, a data selection module <NUM>, a data compression module <NUM>, an accumulator module <NUM>, and a sensor data collection module <NUM>. In some embodiments, the PRNG <NUM> may include different and/or additional modules. It will be understood that the modules illustrated in <FIG> may be implemented on the computing device <NUM> independently of the PRNG <NUM>. For example, the operating system <NUM> may implement one or more of the modules <NUM>-<NUM> when generating random quantities or when initializing a source for random data, such as a pseudorandom generator. In particular, various different implementations of pseudorandom number generators, such as shift registers based on linear recurrence (e.g. linear feedback shift registers), may be initialized based on data output by one or more of the modules <NUM>-<NUM>.

The sensor data collection module <NUM> collects raw sensor data from one or more sensors of the computing device <NUM>. In at least some embodiments, the sensor data collection module <NUM> is configured to receive raw output data directly from sensors (e.g. camera, gyroscope, accelerometer, microphone, etc.) during normal operation or use of the sensors. In particular, the sensor data collection module <NUM> may receive sensor output data from one or more sensors before the output data is processed. For example, the raw output data from sensors may be communicated to the sensor data collection module <NUM> prior to being compressed and saved in suitable file formats. The sensor data collection module <NUM> may request to receive raw output data from one or more sensors or access sensors to acquire raw output data. For example, the sensor data collection module <NUM> may use a sensor framework implementation, such as a sensor application programming interface (API), on the computing device <NUM> to acquire raw sensor data from the sensors of the computing device <NUM>.

Sensors of the computing device <NUM> may be communicably connected to the sensor data collection module <NUM>, and raw output data from the sensors may be transmitted upon request from the sensor data collection module <NUM> or automatically (e.g. on a periodic basis, upon detection of sensor events, etc.). The sensor data collection module <NUM> may also retrieve raw output data from data stores associated with one or more sensors. For example, if a sensor is configured to store raw output data temporarily in a data store prior to processing or compressing the data, the sensor data collection module <NUM> may retrieve all or part of the stored data. The collected raw data may be stored in a data store associated with the sensor data collection module <NUM> or in a separate data storage module (not shown) of the PRNG <NUM>. In some embodiments, the sensor data collection module <NUM> may receive only select subsets of raw output data from sensors. For example, the sensor data collection module <NUM> may request that only those subsets of sensor data (e.g. sensor measurements) which satisfy certain predefined criteria be transmitted to the sensor data collection module <NUM>. The sensor data collection module <NUM> may communicate the predefined criteria to one or more sensors, and the sensors may identify suitable subsets of sensor data to transmit to the sensor data collection module <NUM> based on the criteria.

The data selection module <NUM> selects subsets of the raw sensor output data that is received at the sensor data collection module <NUM> from one or more sensors of the computing device <NUM>. More specifically, the data selection module <NUM> identifies a portion of the collected raw sensor output data that will be used for deriving a source of randomness or for generating pseudorandom quantities on the computing device <NUM>. In at least some embodiments, the data selection module <NUM> may apply a selection function on the raw output data from the sensors. A selection function implements an algorithm or heuristic for selecting subsets of sensor output data. For example, a selection function may select certain bits from a sensor data bit stream for inclusion in a subset of raw sensor data.

The data compression module <NUM> is configured to receive subsets of raw sensor data selected by the data selection module <NUM> and compress the subsets to obtain compressed outputs. In at least some embodiments, the data compression module <NUM> applies a one-way compression function to the output of the data selection module <NUM>. For example, the compression function may be a cryptographic hash function, such as, without limitation, MD5, SHA-<NUM>, SHA-<NUM>, SHA-<NUM>, RIPEMD-<NUM>, Whirlpool, or BLAKE2.

The accumulator module <NUM> maintains representations of the state of entropy associated with previously acquired raw sensor output data from one or more sensors of the computing device <NUM>. The accumulator module <NUM> is configured to iteratively apply an accumulation function on the output of one or more of the data selection module <NUM> and the data compression module <NUM>. Specifically, the output of a plurality of observations of raw sensor data can be processed through the data selection module <NUM> and/or the data compression module <NUM> and accumulated together. The resulting accumulation, or "accumulated entropy" data, may represent a state of entropy associated with output data from the one or more sensors. The accumulated entropy data may be updated as additional sensor data is inputted to the modules <NUM>-<NUM>. In at least some embodiments, the accumulated entropy data may be used as a source of entropy by the computing device <NUM>. For example, this entropy may be used to seed a pseudorandom generator for the computing device <NUM>.

The seed generator module <NUM> generates a seed for the PRNG <NUM>. The sequence of values generated by the PRNG <NUM> is completely determined by the PRNG's seed. The seed generator module <NUM> is connected to other modules of the PRNG <NUM>. In particular, the seed generator module <NUM> is configured to receive data that is output by the accumulator module <NUM>. As will be explained below, the seed generator module <NUM> may derive a seed for the PRNG <NUM> based, at least in part, on an accumulated entropy state associated with previously acquired sensor data from one or more sensors of the computing device <NUM>.

Reference is now made to <FIG>, which shows, in flowchart form, an example process <NUM> for operating a pseudorandom generator on a mobile computing device. The process <NUM>, in this example, may be implemented by a mobile computing device, such as the computing device <NUM> of <FIG>. For example, the operations of process <NUM> may be performed by one or more of the modules <NUM>-<NUM> of <FIG>. More generally, the process <NUM> may be implemented as a set of operations performed by one or more components of the operating system, a standalone software module (e.g. a pseudorandom number generator application), or other software on a mobile device to initialize and operate a pseudorandom generator.

For illustration purposes, the process <NUM> will be described with reference to an example embodiment in which output data from a single sensor is used. It will be understood, however, that the process <NUM> may be implemented to incorporate use of output data from a plurality of different sensors on a mobile computing device.

In operation <NUM>, the mobile device collects raw output data from a sensor of the mobile device. The raw output data may, for example, contain data from a single output or multiple outputs from the sensor. In some embodiments, the device may monitor the sensor, periodically or on a continuous basis, for observation of sensor outputs and associated raw data. For example, various sensor events associated with the sensor may be monitored. A sensor event occurs when a sensor detects a change in the parameters it is measuring. A sensor event may provide, at least, the raw sensor data that triggered the event. Alternatively, the device may request to receive raw output data from the sensor. For example, a request may be transmitted to the sensor to provide raw data from one or more future sensor outputs from the sensor.

The raw data may be pre-processed or minimally processed output data from the sensor that has not been converted to a different format for consumption on the device. In particular, the raw output data may be data that has not been compressed. By way of example, raw image data from an image sensor of a camera may be collected. The image data may be in the form of a raw file. The raw file may contain full resolution data as read out from the camera's image sensor pixels. More generally, raw output data may be saved in a raw file, which is a record of the data captured by the sensor. Raw files may contain sensor data (e.g. image pixel intensities, audio frequencies, etc.), sensor metadata, and/or file metadata.

The format of the raw output data may depend on the type of the sensor. In at least some embodiments, the raw output data from the sensor may be converted to a data bit stream. In particular, the raw output data may be represented in bit streams. For example, in an image sensor, output data representing pixel intensities and colors at various locations on the image sensor may be represented in bit streams. As another example, raw, uncompressed audio data from a microphone input may be stored in PCM format.

In operation <NUM>, the mobile device selects a subset of the collected raw sensor output data. The subset may be selected from output data associated with a single output or multiple outputs from the sensor. In at least some embodiments, the selected subset may contain bits from the sensor's output data bit stream. For example, bits may be selected for inclusion in the subset according to a predefined selection algorithm or function. That is, the mobile device may implement a selection function in operation <NUM>.

An objective of the selection function is to identify those portions of the raw sensor data that will not be saved in a final form on the mobile device. Upon acquiring raw sensor data, the mobile device may perform various processing operations (e.g. sharpening, noise reduction, white balancing, compression, etc.) on the acquired sensor data before finally saving in a suitable final format. The selection function may be configured to identify subsets of raw sensor data that would be lost or eliminated as a result of the data processing.

In at least some embodiments, the selection function may interact with a data compression operation for the sensor to specifically select bits that will not be contained in a compressed version of the raw sensor data. For example, the selection function may be configured to coordinate with the sensor's compression (e.g. lossy compression) algorithm to identify portions of the raw sensor data which will be discarded in deriving the compressed form of the data. Lossy compression may quantize values at lower resolution, or suppress certain component values of a signal in a transform domain. The selection function may select bits that will not be preserved in the output of a lossy compression. For example, in JPEG codecs, images may be encoded by implementing less resolution for chroma information than for luma information (i.e. chroma subsampling). That is, the color detail in an image is reduced by sampling at a lower rate than the brightness. The selection function may be configured to select bits corresponding to the discarded pixels in the chroma components from the raw sensor data representing an image. As another example, the MPEG-<NUM> standard for audio encoding utilizes psychoacoustics to reduce the data rate required by an audio stream. In particular, encoded audio may completely discard certain components of the original audio data, either because they are in frequencies where the human ear has limited sensitivity or are masked by other sounds. The selection function may be configured to identify bits corresponding to the discarded audio components from raw sensor (e.g. microphone) data.

As another example, raw sensor data may be collected from a time-of-flight (ToF) camera. A ToF camera is a camera system that employs time-of-flight techniques to resolve distance between the camera and a subject for each point in an image, by measuring the round trip time of an artificial light signal (e.g. laser, LED). A ToF camera may be used for a wide range of applications in, for example, depth measurements, indoor navigation, gesture recognition, motion tracking, and augmented reality. In operation <NUM>, a subset of ToF camera sensor data may be selected by the mobile device.

In some embodiments, a selection function may select redundant data associated with various operations being performed on the mobile device. For example, for one or more applications that are running on the mobile device, a selection function may identify subsets of application data (e.g. user-specific data, file data, geolocation data, etc.) which are stored on the mobile device and not currently used by the applications. As another example, if the mobile device includes multiple cameras (e.g. different lenses, such as telephoto lens and monochrome lens) for generating images, a selection function may be configured to identify / select those subsets of raw camera output data that are not currently used in image generation.

The data which does not make it into the compressed output may be ideal for use in random quantities or as a source of randomness, as it often comprises that part of the output data which contains entropy produced by artifacts of the measurement process (e.g. noise in the low bits of a camera charge coupled device (CCD) sensor or microphone). Importantly, this data also represents part of the output data which will not be recorded or transmitted.

In some embodiments, the mobile device may be configured to process raw sensor signals from the sensor by, for example, applying noise filters, identifying anomaly/outlier data points, and detecting errors, prior to delivering processed sensor readings for different applications on the mobile device. The raw sensor data that is discarded in these processing operations may be included in the sensor data subset selected in operation <NUM>.

In at least some embodiments, as part of the selection in operation <NUM>, the mobile device may perform compression of the raw sensor data using a compression technique to obtain a compressed output and select bits that are not included in the compressed output for inclusion in the subset. For example, the mobile device may emulate a data encoding method (e.g. lossy compression) that is typically employed by the sensor to identify which bits will not be included in the compressed output. In particular, the mobile device may perform lossy compression of the raw sensor data and identify bits of the of the sensor data bit stream that are not preserved in the lossy compression output. The identified bits may then be included in the subset of output data obtained in operation <NUM>.

In at least some embodiments, the mobile device may perform comparisons between collected raw sensor output data and the output of lossy data encoding (e.g. a lossy function) on the mobile device. Such comparison may facilitate identification of raw output data that is not included in compressed output. If a first representation of the raw sensor data and a second representation of the output of the lossy encoding are different (for example, in terms of space domain), a domain transform may be applied to one of the representations, in order to facilitate the comparison of raw sensor data and the output of the lossy encoding. For example, the mobile device may determine a suitable transform function from the first domain associated with the first representation to the second domain associated with the second representation, and apply the determined transform to the first representation. Similarly, a transform function from the domain of the representation of the lossy encoding to the domain of the raw sensor data may be determined.

Other techniques for bit selection may be used in operation <NUM>. For example, in some embodiments, the mobile device may select a fixed fraction of a predefined number of low order bits of the sensor data bit stream.

In operation <NUM>, the mobile device retrieves a first representation of accumulated entropy associated with previously acquired raw sensor data for the sensor. With new observations of sensor outputs, the entropy which may be attributed to the output data for those sensor outputs may be captured and stored as numbers or bit representations of numbers. The "accumulated entropy" for a sensor represents an accumulation of such numbers or bits associated with the entropy values for previous sensor outputs. The first representation may, for example, be a numerical value or a bit string. The first representation may be initialized to a static value (e.g. zero) or a value generated using one or more sources of randomness. The sensors of the mobile device may have a respective current representation of accumulated entropy. In particular, a unique current representation of accumulated entropy may be maintained for each of one or more sensors.

The current representations may be stored in a database in association with a respective sensor. Alternatively, each sensor may maintain its own current representation. As new outputs are generated by sensors of the mobile device, the current representations may be updated. In particular, a current representation for a sensor may be combined with a representation of entropy associated with a new sensor output to generate an updated current representation. This current representation, of a function of it, may be used as a source of entropy for the mobile device. Such a source of entropy may, for example, be used to seed, or as a portion of the seed, of a random generator.

In operation <NUM>, the mobile device generates a seed for a pseudorandom number generator based on combining the first representation of accumulated entropy for the sensor and the selected subset of raw sensor output data. That is, the first representation retrieved in operation <NUM> and the subset of sensor output data selected in operation <NUM> are combined. In some embodiments, the seed may comprise an updated version of the first representation, i.e. current representation of accumulated entropy for the sensor. For example, the seed may be a numerical value or bit string that is obtained based on the first representation.

The mobile device may implement an accumulation function which is applied to the first representation and a bit representation of the selected subset of raw output data. In some embodiments, the accumulation function may employ a combination of operations on bit strings. For example, the accumulation function may include at least one of cryptographic hash functions, block ciphers, exclusive or, modular addition or subtraction, or scaling operations to the first representation and the bit representation of the selected subset.

Reference is now made to <FIG>, which shows, in flowchart form, another example process <NUM> for operating a pseudorandom generator on a mobile computing device. Similar to process <NUM>, the process <NUM> may be implemented by a mobile computing device, such as the computing device <NUM> of <FIG>. For example, the operations of process <NUM> may be performed by one or more of the modules <NUM>-<NUM> of <FIG>.

Operations <NUM>, <NUM>, <NUM> and <NUM> of process <NUM> are similar to operations <NUM>, <NUM>, <NUM> and <NUM>, respectively. Raw sensor output data is collected from a sensor, in operation <NUM>. The mobile device selects a subset of the collected raw output data for further processing, in operation <NUM>. The selected data subset is then compressed to produce a compressed output. More specifically, the mobile device applies a one-way compression function on the selected subset of raw output data, in operation <NUM>. The one-way compression function of operation <NUM> is not intended to be a compression that is used to produce a lower fidelity version of the sensor output. Instead, the compression function is intended to be a one-way cryptographic compression function, typically a secure hash algorithm such as SHA-<NUM>.

The mobile device retrieves a first representation of the accumulated entropy of the sensor in operation <NUM>, and a seed for a pseudorandom number generator is generated based on combining the first representation and the compressed output, in operation <NUM>. That is, the first representation retrieved in operation <NUM> and the compressed version of the selected output data from operation <NUM> are combined to produce the seed. In at least some embodiments, the seed is generated based on an accumulation function that is applied on the first representation and the compressed output. The accumulation function may include a combination of cryptographic hash functions, block ciphers, logical operations (XOR), modular addition or subtraction, or scaling. Various different accumulation functions may be suitable. One such example is provided by the following: <MAT> where A is the first representation of accumulated entropy for the sensor and C denotes the compressed output of operation <NUM>. The above function may be static or time-varying. Another accumulation function that is simpler is the following: <MAT>.

The output of f(A, C) provides an updated, or current, representation of the accumulated entropy for the sensor, and may serve as a source of entropy (e.g. seed of a PRNG).

Reference is now made to <FIG>, which shows, in flowchart form, an example process <NUM> for processing sensor output data that is collected on a mobile computing device. The process <NUM> may be implemented by a mobile computing device, such as the computing device <NUM> of <FIG>. In particular, the operations of process <NUM> may be performed by a software module associated with a sensor of the mobile computing device.

In operation <NUM>, raw sensor output data from the sensor is received by the software module. In particular, a bit stream representation of the raw output data is obtained. The software module then identifies bits that will not be preserved by a first compression of the raw output data. The first compression may be a default compression algorithm that is applied to output data from the sensor. That is, the software module determines which compression function is typically applied on output data from the sensor and identifies those bits of the current raw output data bit stream that will not be contained in the compressed version.

In operation <NUM>, a second compression function is applied on the identified bits to obtain a compressed output. In at least some embodiments, the second compression function is a one-way cryptographic compression function, such as a secure hash algorithm (e.g. SHA-<NUM>). The software module then retrieves a current representation of accumulated entropy for the sensor, in operation <NUM>. The current representation represents an accumulation of entropy values associated with one or more previous sensor outputs from the sensor, and may be stored in association with the sensor in a database on the mobile device.

In operation <NUM>, an updated current representation is obtained based on combining the current representation as retrieved and the compressed output. For example, an accumulation function, such as the functions (<NUM>) and (<NUM>) described above, may be employed to determine the current representation. The process <NUM> may thus provide a way for a sensor and associated software to maintain a current representation of entropy values that are accumulated with new sensor outputs from the sensor.

Claim 1:
A method (<NUM>, <NUM>, <NUM>) for operating a pseudorandom number generator on a mobile computing device, the method comprising:
collecting (<NUM>, <NUM>, <NUM>) raw sensor data from at least one sensor associated with the mobile computing device;
selecting (<NUM>, <NUM>) a subset of the raw sensor data based on:
compressing (<NUM>) the raw sensor data using a lossy compression technique to obtain a lossy compressed sensor data output; and
selecting (<NUM>), for inclusion in the subset, portions of the raw sensor data that are not included in the lossy compressed sensor data output;
applying (<NUM>) a one-way cryptographic compression on the selected subset to obtain a first compressed output;
retrieving (<NUM>, <NUM>, <NUM>) a first representation of accumulated entropy associated with one or more previously acquired raw sensor data sets for the at least one sensor; and
generating (<NUM>, <NUM>, <NUM>) a seed for a pseudorandom number generator based on combining the first representation and the first compressed output.