Quantum Dice QEaaS API 1.0.5
 
Loading...
Searching...
No Matches
Running CPP demo

Unpack the software

Unpack the software into a convenient directory. In that directory run:

make

you should find that in the BUILT subdirectory you now have:

qdremdemo
qdremdemo_ce
qdremdemo_norm

Run qdremdemo

The qdremdemo program fetches 100KB of random data. Try it out like this:

qdremdemo qeaas.q-dice.com 20804 qdservroot.pem zeffereor_chain.pem zeffereor.key >qd.rnd

Check to see that the file qd.rnd now contains 1024000 bytes of random data.

Run qdremdemo-ce

The qdremdemo_ce demonstrates the certification and entropy values accompanying randomness. Run it like this:

qdremdemo_ce qeaas.q-dice.com 20804 qdservroot.pem zeffereor_chain.pem zeffereor.key

It will fetch blocks of randomness and print their contents. Each line looks like this:

144 72.953125 8d 49 1b b0 e7 c6 81 cf

Where the first number is the number of unconditioned bits that were used in producing this block, the second is the estimate of the amount of entropy in those bits, and the eight hex values are the 64 bits of randomness in this block. In unusual circumstances, if the randomness generator is unable to generate sufficient entropy in a reasonable time, the value for entropy is less than 64 and this block should not be used. When you get a stream of random data without metadata (as with the other demo programs) the stream does not contain any data from blocks like these, so may be delayed arbitrarily.

Run qdremdemo-norm

The qdremdemo_norm demonstrates generation of random values according to a specific probability distribution using the standard C++ distributions. Try it like this:

qdremdemo_norm qeaas.q-dice.com 20804 qdservroot.pem zeffereor_chain.pem zeffereor.key

It would print out 42 values from a Gaussian normal distribution which has mean of 42 and standard deviation of 5.