1*01a6998aSbentley.\" $OpenBSD: viornd.4,v 1.2 2015/02/17 16:29:16 bentley Exp $ 25dc03275Ssf.\" 35dc03275Ssf.\" Copyright (c) 2014 Stefan Fritsch <sf@sfritsch.de> 45dc03275Ssf.\" 55dc03275Ssf.\" Permission to use, copy, modify, and distribute this software for any 65dc03275Ssf.\" purpose with or without fee is hereby granted, provided that the above 75dc03275Ssf.\" copyright notice and this permission notice appear in all copies. 85dc03275Ssf.\" 95dc03275Ssf.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 105dc03275Ssf.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 115dc03275Ssf.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 125dc03275Ssf.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 135dc03275Ssf.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 145dc03275Ssf.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 155dc03275Ssf.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 165dc03275Ssf.\" 17*01a6998aSbentley.Dd $Mdocdate: February 17 2015 $ 185dc03275Ssf.Dt VIORND 4 195dc03275Ssf.Os 205dc03275Ssf.Sh NAME 215dc03275Ssf.Nm viornd 225dc03275Ssf.Nd VirtIO random number device 235dc03275Ssf.Sh SYNOPSIS 245dc03275Ssf.Cd "viornd* at virtio? flags 0x00" 255dc03275Ssf.Sh DESCRIPTION 265dc03275SsfThe 275dc03275Ssf.Nm 285dc03275Ssfdriver provides a virtual random number generator using a 295dc03275Ssf.Xr virtio 4 305dc03275Ssfentropy device provided by QEMU 1.3 and later, and possibly by other 315dc03275Ssfhypervisors. 325dc03275Ssf.Pp 335dc03275SsfAs there is currently no way for 345dc03275Ssf.Nm 355dc03275Ssfto determine how much entropy is needed, the second byte of the flags value 365dc03275Ssfcan be used to configure how often it should request more entropy from the 375dc03275Ssfhost. 385dc03275SsfIf the second lowest byte of the flags has a value from 1 to 15, 395dc03275Ssf.Nm 405dc03275Ssfwill ask for 16 bytes of entropy every 15 * (1 << value) seconds. 415dc03275SsfFor example, flags == 0x100 means an interval of 30 seconds, 425dc03275Ssf0x500 means 8 minutes, 0xa00 means 256 minutes, and 0xf00 means about 6 days. 435dc03275SsfFor flags == 0, a default value will be used (currently 8 minutes). 445dc03275SsfIf the bit 0x1000 is set in the flags, 455dc03275Ssf.Nm 465dc03275Ssfwill only request entropy from the host once during system boot. 475dc03275Ssf.Sh SEE ALSO 485dc03275Ssf.Xr intro 4 , 495dc03275Ssf.Xr virtio 4 505dc03275Ssf.Sh HISTORY 515dc03275SsfThe 525dc03275Ssf.Nm 535dc03275Ssfdriver first appeared in 545dc03275Ssf.Ox 5.5 . 555dc03275Ssf.Sh AUTHORS 565dc03275Ssf.An -nosplit 575dc03275SsfThe 585dc03275Ssf.Nm 595dc03275Ssfdriver was written by 60*01a6998aSbentley.An Stefan Fritsch Aq Mt sf@sfritsch.de . 61