rlwe-challenges-0.1.0.1: Ring-LWE/LWR challenges using Lol.

Copyright(c) Eric Crockett 2011-2017
Chris Peikert 2011-2017
LicenseGPL-2
Maintainerecrockett0@email.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Crypto.RLWE.Challenges.Beacon

Description

Utility functions for working with the NIST Randomness Beacon.

Synopsis

Documentation

bytesPerBeacon :: BeaconOffset Source #

The number of bytes (512 / 8 = 64) per beacon.

beaconInterval :: BeaconEpoch Source #

The number of seconds (60) between beacon outputs.

data BeaconAddr Source #

Represents a byte offset in a beacon output at a particular time.

Constructors

BA !BeaconEpoch !BeaconOffset 

validBeaconAddr :: BeaconAddr -> Bool Source #

Tests whether a BeaconAddr is valid or not.

nextBeaconAddr :: BeaconAddr -> BeaconAddr Source #

Advances the beacon position by one byte, overflowing to the next beacon if necessary.

gmtDateToSeconds :: Int -> Int -> Integer -> Int -> Int -> Int Source #

The number of seconds elapsed from a given GMT time since the (GMT) epoch.

localDateToSeconds :: Int -> Int -> Integer -> Int -> Int -> IO BeaconEpoch Source #

The number of seconds elapsed from a given local time since the (GMT) epoch.

beaconFloor :: BeaconEpoch -> BeaconEpoch Source #

Yield the largest beacon epoch that does not exceed the input.