IP Library Granted Patent US 12,393,440
Granted Patent B2
US 12,393,440 · App. 18/194,999 · Granted Aug 19, 2025

Safe entropy source for encrypted virtual machines

Inventors: Michael Tsirkin (Ra'anana, IL); Karen Lee Noel (Concord, NC)
Assignee: Red Hat, Inc.
G06F9/45558G06F21/602G06F21/78G06F7/58G06F2009/45583G06F2009/45587
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 12,393,440
App. No.
18/194,999
Granted
Aug 19, 2025
Kind
B2
Abstract

Systems and methods for ensuring that data received from a virtual device is random are provided. A processing device may be used to generate, by a virtual device executing on a hypervisor, data intended for a virtual machine (VM) having a guest memory that includes one or more encrypted pages and one or more unencrypted pages. Data written to an encrypted page of the guest memory by the VM is encrypted using an encryption key assigned to the VM and information read from the encrypted page by the VM is decrypted using the encryption key. The hypervisor may write the data to the encrypted page, wherein the data is not encrypted by the encryption key assigned to the VM because it is written by the hypervisor. The VM reads the data from the encrypted page as randomized data because it cannot be properly decrypted by the encryption key.

Claims (31)

1. A method comprising:

generating, by a virtual device executing on a hypervisor, data intended for a virtual machine (VM) having a guest memory that includes one or more encrypted pages and one or more unencrypted pages, wherein information written to an encrypted page of the guest memory by the VM is encrypted using an encryption key assigned to the VM and information read from the encrypted page by the VM is decrypted using the encryption key assigned to the VM;

writing, by a processing device, the data to an encrypted page of the guest memory using the hypervisor so that the data is not encrypted by the encryption key assigned to the VM; and

reading, by the VM, the data from the encrypted page as random data; and

denying the hypervisor access to the guest memory responsive to a determination of duplicative data.

2. The method of claim 1 , wherein reading the data from the encrypted page comprises improperly decrypting the data using the encryption key assigned to the VM, thereby randomizing the data.

3. The method of claim 1 , wherein writing the data to the encrypted page of guest memory comprises encrypting the data using an encryption key of the hypervisor.

4. The method of claim 1 , further comprising receiving one or more additional requests from the hypervisor to write data in the guest memory of the VM, and for each of the one or more additional requests, providing the hypervisor a different encrypted page of the one or more encrypted pages in which to write the data of the request.

5. The method of claim 1 , wherein the virtual device is an entropy source.

6. The method of claim 1 , wherein the data comprises predictable data.

7. A system comprising:

a memory; and

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

generate, by a virtual device executing on a hypervisor, data intended for a virtual machine (VM) having a guest memory that includes one or more encrypted pages and one or more unencrypted pages, wherein information written to an encrypted page of the guest memory by the VM is encrypted using an encryption key assigned to the VM and information read from the encrypted page by the VM is decrypted using the encryption key assigned to the VM;

write the data to an encrypted page of the guest memory using the hypervisor so that the data is not encrypted by the encryption key assigned to the VM;

read, by the VM, the data from the encrypted page as random data; and

deny the hypervisor access to the guest memory responsive to a determination of duplicative data.

8. The system of claim 7 , wherein to read the data from the encrypted page, the processing device is to improperly decrypt the data using the encryption key assigned to the VM, thereby randomizing the data.

9. The system of claim 7 , wherein to write the data to the encrypted page of guest memory using the hypervisor, the processing device is to encrypt the data using an encryption key of the hypervisor.

10. The system of claim 7 , wherein the processing device is further to receive one or more additional requests from the hypervisor to write data in the guest memory of the VM, and for each of the one or more additional requests, provide the hypervisor a different encrypted page of the one or more encrypted pages in which to write the data of the request.

11. The system of claim 7 , wherein the virtual device is an entropy source.

12. The system of claim 7 , wherein the data comprises predictable data.

13. A non-transitory computer readable medium, having instructions stored thereon that, when executed by a processing device, cause the processing device to:

generate, by a virtual device executing on a hypervisor, data intended for a virtual machine (VM) having a guest memory that includes one or more encrypted pages and one or more unencrypted pages, wherein information written to an encrypted page of the guest memory by the VM is encrypted using an encryption key assigned to the VM and information read from the encrypted page by the VM is decrypted using the encryption key assigned to the VM;

write, by the processing device, the data to an encrypted page of the guest memory using the hypervisor so that the data is not encrypted by the encryption key assigned to the VM;

read, by the VM, the data from the encrypted page as random data; and

deny the hypervisor access to the guest memory responsive to a determination of duplicative data.

14. The non-transitory computer readable medium of claim 13 , wherein to read the data from the encrypted page, the processing device is to improperly decrypt the data using the encryption key assigned to the VM, thereby randomizing the data.

15. The non-transitory computer readable medium of claim 13 , wherein to write the data to the encrypted page of guest memory using the hypervisor, the processing device is to encrypt the data using an encryption key of the hypervisor.

16. The non-transitory computer readable medium of claim 13 , wherein the processing device is further to receive one or more additional requests from the hypervisor to write data in the guest memory of the VM, and for each of the one or more additional requests, provide the hypervisor a different encrypted page of the one or more encrypted pages in which to write the data of the request.

17. The non-transitory computer readable medium of claim 13 , wherein the virtual device is an entropy source.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 27, 2023
From: TSIRKIN, MICHAEL; NOEL, KAREN LEE
To: RED HAT, INC.
Reel/Frame 065664/0221 →
Continuity (2)
Continuation 16911400 · Jun 25, 2020
Related Publication 20230236870A1 · Jul 27, 2023
References Cited (16)
US 7664269B2 · Wood et al. · 2010 [cited by applicant]
US 9460276B2 · Tanikawa et al. · 2016 [cited by applicant]
US 9548862B1 · Potter · 2017 [cited by applicant]
US 9749127B1 · Doane et al. · 2017 [cited by applicant]
US 20090282266A1 · Fries et al. · 2009 [cited by applicant]
US 20110047545A1 · Ellison · 2011 [cited by examiner]
US 20140101459A1 · Debout et al. · 2014 [cited by applicant]
US 20140109070A1 · Mahamuni et al. · 2014 [cited by applicant]
US 20150106952A1 · Bacher et al. · 2015 [cited by applicant]
US 20160188384A1 · Shah · 2016 [cited by examiner]
US 20180285140A1 · Kaplan · 2018 [cited by examiner]
US 20190095350A1 · Durham · 2019 [cited by examiner]
WO 2017030745A1 · 2010 [cited by applicant]
Mengyuan Li et al., “Exploiting Unprotected I/O Operations in AMD's Secure Encrypted Virtualization,” https://www.usenix.org/conference/usenixsecurity19/presentation/li-mengyuan, Aug. 14-16, 2019, 28th USENIX Security S… [cited by applicant]
Cedric Dufour, “How to ensure entropy and proper random numbers generation in virtual machines,” https://www.exoscale.com/syslog/random-numbers-generation-in-virtual machines/, Aug. 8, 2019, 13 pages. [cited by applicant]
Robert Buhren et al., “Insecure Until Proven Updated: Analyzing AMD SEV's Remote Attestation,” arXiv:1908.11680v2 [cs.CR], Sep. 2, 2019, 13 pages. [cited by applicant]