1Data::Entropy::RawSourcUes:e:rRaCnodnotmrniDubamutbtaee:rd:sEIPnnetfrrolo(p3Dy)o:c:uRmaewnStoautricoen::RandomnumbersInfo(3)
2
3
4
6 Data::Entropy::RawSource::RandomnumbersInfo - download entropy from
7 randomnumbers.info
8
10 use Data::Entropy::RawSource::RandomnumbersInfo;
11
12 my $rawsrc = Data::Entropy::RawSource::RandomnumbersInfo->new;
13
14 $c = $rawsrc->getc;
15 # and the rest of the I/O handle interface
16
18 This class provides an I/O handle connected to a stream of random
19 octets being generated by a quantum random number generator (from the
20 company id Quantique) connected to the randomnumbers.info server at the
21 University of Geneva. This is a strong source of random bits, but is
22 not suitable for security applications because the bits are passed over
23 the Internet unencrypted. The handle implements a substantial subset
24 of the interface described in IO::Handle.
25
26 For use as a general entropy source, it is recommended to wrap an
27 object of this class using "Data::Entropy::Source", which provides
28 methods to extract entropy in more convenient forms than mere octets.
29
30 The bits generated at randomnumbers.info are, theoretically and as far
31 as anyone can tell, totally unbiased and uncorrelated. However, they
32 are sent over the Internet in the clear, and so are subject to
33 interception and alteration by an adversary. This is therefore
34 generally unsuitable for security applications. Applications requiring
35 secret entropy should generate it locally (see
36 Data::Entropy::RawSource::Local). Applications requiring a large
37 amount of apparently-random data, but not true entropy, might prefer to
38 fake it cryptographically (see Data::Entropy::RawSource::CryptCounter).
39
41 Data::Entropy::RawSource::RandomnumbersInfo->new
42 Creates and returns a handle object referring to a stream of random
43 octets generated by randomnumbers.info.
44
46 A subset of the interfaces described in IO::Handle and IO::Seekable are
47 provided:
48
49 $rawsrc->read(BUFFER, LENGTH[, OFFSET])
50 $rawsrc->getc
51 $rawsrc->ungetc(ORD)
52 $rawsrc->eof
53 Buffered reading from the source, as in IO::Handle.
54
55 $rawsrc->sysread(BUFFER, LENGTH[, OFFSET])
56 Unbuffered reading from the source, as in IO::Handle.
57
58 $rawsrc->close
59 Does nothing.
60
61 $rawsrc->opened
62 Retruns true to indicate that the source is available for I/O.
63
64 $rawsrc->clearerr
65 $rawsrc->error
66 Error handling, as in IO::Handle.
67
68 The buffered ("read" et al) and unbuffered ("sysread" et al) sets of
69 methods are interchangeable, because no such distinction is made by
70 this class.
71
72 Methods to write to the file are unimplemented because the stream is
73 fundamentally read-only. Methods to seek are unimplemented because the
74 stream is non-rewindable; "ungetc" works, however.
75
77 Data::Entropy::RawSource::CryptCounter,
78 Data::Entropy::RawSource::Local, Data::Entropy::RawSource::RandomOrg,
79 Data::Entropy::Source, <http://www.randomnumbers.info>
80
82 Andrew Main (Zefram) <zefram@fysh.org>
83
85 Copyright (C) 2006, 2007, 2009, 2011 Andrew Main (Zefram)
86 <zefram@fysh.org>
87
89 This module is free software; you can redistribute it and/or modify it
90 under the same terms as Perl itself.
91
92
93
94perl v5.32.0 Da2t0a2:0:-E0n7t-r2o8py::RawSource::RandomnumbersInfo(3)