IP Library › Granted Patent US 9,658,832
Granted Patent B2
US 9,658,832 · App. 14/715,146 · Granted May 23, 2017

Multi-factor entropy sourcing for random number generators

Inventor: Michael Tsirkin (Yokneam Yillit, IL)
Assignee: Red Hat Israel, Ltd.
G06F7/588H04L9/002
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,658,832
App. No.
14/715,146
Granted
May 23, 2017
Kind
B2
Abstract

Systems and methods for multi-factor entropy sourcing for random number generators. An example method may comprise: identifying, by a processing device, a plurality of entropy sources; receiving random bits from each of the plurality of entropy sources; identifying a minimum number of bits among numbers of bits received from each of two or more entropy sources of the plurality of entropy sources; mixing, into an entropy pool, at least the identified minimum number of bits received from each entropy source of two or more entropy sources; and increasing a size of the entropy pool by the identified minimum number of bits.

Claims (48)

1. A method, comprising:

identifying, by a processing device, a plurality of entropy sources;

receiving random bits from each of the plurality of entropy sources;

identifying a minimum number of bits among numbers of bits received from each of two or more entropy sources of the plurality of entropy sources;

mixing, into an entropy pool, at least the identified minimum number of bits received from each entropy source of two or more entropy sources; and

increasing a size of the entropy pool by the identified minimum number of bits.

2. The method of claim 1 , wherein an entropy source of the plurality of entropy sources is provided by a hardware device represented by one of: a keyboard, a disk controller, a mouse, a processor, or a network interface controller (NIC).

3. The method of claim 1 , wherein the entropy pool is represented by a memory buffer that is protected from being accessed by user-level processes.

4. The method of claim 1 , wherein receiving the random bits comprises one of: measuring timing of events associated with the entropy sources or counting events associated with the entropy sources.

5. The method of claim 1 , wherein receiving the random bits comprises compressing the random bits.

6. The method of claim 1 , further comprising:

calculating a digest of at least the identified minimum number of bits received from each entropy source using at least one of: a cyclic redundancy check (CRC) function or a cryptographic hash function.

7. The method of claim 1 , wherein mixing at least the identified minimum number of bits into the entropy pool is performed by an interrupt handler routine.

8. The method of claim 1 , further comprising:

responsive to receiving a request for a random number, retrieving a certain number of bits from the entropy pool; and

reducing the size of the entropy pool by the certain number of bits.

9. The method of claim 8 , wherein retrieving the certain number of bits from the entropy pool comprises blocking a caller process responsive to determining that a number of bits available in the entropy pool is less than a number of bits that is needed to produce a return value.

10. The method of claim 8 , further comprising:

returning, to a calling process, a random value represented by a digest of the certain number of bits retrieved from the entropy pool.

11. A system, comprising:

a memory; and

a processing device operatively coupled to the memory, the processing device to:

receive random bits from each of a plurality of entropy sources;

identify a minimum number of bits among numbers of bits received from each of two or more entropy sources of the plurality of entropy sources;

mix, into an entropy pool, at least the identified minimum number of bits received from each entropy source of two or more entropy sources; and

increase a size of the entropy pool by the identified minimum number of bits.

12. The system of claim 11 , wherein an entropy source of the plurality of entropy sources is provided by a hardware device represented by one of: a keyboard, a disk controller, a mouse, a processor, or a network interface controller (NIC).

13. The system of claim 1 , wherein the entropy pool is represented by a memory buffer that is protected from being accessed by user-level processes.

14. The system of claim 11 , wherein the processing device is further to:

calculate a digest of at least the identified minimum number of bits received from each entropy source using at least one of: a cyclic redundancy check (CRC) function or a cryptographic hash function.

15. The system of claim 1 , wherein the processing device is further to:

responsive to receiving a request for a random number, retrieve a certain number of bits from the entropy pool; and

reduce the size of the entropy pool by the certain number of bits.

16. A computer-readable non-transitory storage medium comprising executable instructions to cause a processing device to:

identify, by the processing device, a plurality of entropy sources;

receive random bits from each of the plurality of entropy sources;

identify a minimum number of bits among numbers of bits received from each of two or more entropy sources of the plurality of entropy sources;

mix, into an entropy pool, at least the identified minimum number of bits received from each entropy source of two or more entropy sources; and

increase a size of the entropy pool by the identified minimum number of bits.

17. The computer-readable non-transitory storage medium of claim 16 , further comprising executable instructions to cause the processing device to:

calculate a digest of at least the identified minimum number of bits received from each entropy source using at least one of: a cyclic redundancy check (CRC) function or a cryptographic hash function.

18. The computer-readable non-transitory storage medium of claim 16 , further comprising executable instructions to cause the processing device to:

responsive to receiving a request for a random number, retrieve a certain number of bits from the entropy pool; and

reduce the size of the entropy pool by the certain number of bits.

19. The computer-readable non-transitory storage medium of claim 18 , wherein instructions to retrieve the certain number of bits from the entropy pool comprise executable instructions to cause the processing device to:

block a caller process responsive to determining that a number of bits available in the entropy pool is less than a number of bits that is needed to produce a return value.

20. The computer-readable non-transitory storage medium of claim 18 , further comprising executable instructions to cause the processing device to:

return, to a calling process, a random value represented by a digest of the certain number of bits retrieved from the entropy pool.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 21, 2015
From: TSIRKIN, MICHAEL
To: RED HAT ISRAEL, LTD.
Reel/Frame 036420/0094 →
Continuity (1)
Related Publication 20160342394A1 · Nov 24, 2016