cryptonite-0.27: Cryptography Primitives sink

Crypto.Number.Basic

Description

Synopsis

# Documentation

sqrti returns two integers (l,b) so that l <= sqrt i <= b. The implementation is quite naive, use an approximation for the first number and use a dichotomy algorithm to compute the bound relatively efficiently.

Get the extended GCD of two integer using integer divMod

gcde a b find (x,y,gcd(a,b)) where ax + by = d

areEven :: [Integer] -> Bool Source #

Check if a list of integer are all even

Compute the binary logarithm of a integer

Compute the number of bits for an integer

Compute the number of bytes for an integer

Express an integer as an odd number and a power of 2