qUUID: True random UUIDs conforming to RFC 4122

View source: R/qUUID.R

qUUIDR Documentation

True random UUIDs conforming to RFC 4122

Description

qUUID generates true random UUIDs conforming to RFC 4122 from random numbers retrieved through the API of the vacuum quantum-fluctuation server at the Australian National University. The UUIDs are taken from a space of 2^122 == 5.3e+36 possibilities.

Usage

qUUID(n = 1)

Arguments

n

The number of UUIDs to return. Must be between 1 and 100,000. Default is 1.

Details

qUUID returns true random Universally Unique IDentifiers (UUID) that conform to RFC 4122. The construction is based on the function qrandom to generate an input of n 128-bit numbers in hexadecimal representation. These numbers are converted to bit-representations, the 6-bit RFC 4122-required pattern for random UIDs is stamped onto these, and the result is converted back to hexadecimals giving 2^122 == 5.3e+36 possibilities. The resulting UUIDs are patterned like "e3da74ea-b88d-fea2-0b69-56a16caeda0a"; bits 61 to 64 are (00 01 00 00), and bits 71 to 72 are (00 01) (counting from 1).

The true random source is generated in real-time by measuring the quantum fluctuations of the vacuum. The official QRNG@ANU API currently supports only a maximum of 1,024 random numbers per request, thus requests for more numbers are split up into smaller requests of maximum 1,024 numbers. In fact, each request may take a couple of seconds to be served.

For further information on the underlying function to retrieve quantum random numbers, see qrandom.

Further information can be obtained from the ANU Quantum Random Number Generator FAQ and the list of references to scientific papers.

For the UUID specification see RFC 4122.

Value

qUUID returns a character vector of length n, class "character", type "character" containing n true random UUIDs conforming to RFC 4122.

References

Secure Quantum Communication group, Centre for Quantum Computing and Communication Technology, Department of Quantum Sciences, Research School of Physics and Engineering, The Australian National University, Canberra, ACT 0200, Australia. Welcome to the ANU Quantum Random Numbers Server. https://qrng.anu.edu.au/

Network Working Group (2005), A Universally Unique IDentifier (UUID) URN Namespace (RFC 4122). https://tools.ietf.org/html/rfc4122

See Also

qrandom

Examples


## generate five true random UUIDs
myUUIDs <- qUUID(5)


qrandom documentation built on Aug. 30, 2022, 9:07 a.m.

Related to qUUID in qrandom...