raaz-0.2.1: The raaz cryptographic library.
Safe HaskellNone
LanguageHaskell2010

Raaz.Cipher.ChaCha20

Description

The Chacha20 cipher.

Synopsis

Documentation

data ChaCha20 Source #

The type associated with the ChaCha20 cipher.

Instances

Instances details
Describable ChaCha20 Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

name :: ChaCha20 -> String Source #

description :: ChaCha20 -> String Source #

Recommendation ChaCha20 Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Recommendation

Primitive ChaCha20 Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Associated Types

type Implementation ChaCha20 Source #

Methods

blockSize :: ChaCha20 -> BYTES Int Source #

StreamCipher ChaCha20 Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Cipher ChaCha20 Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

type Key ChaCha20 Source #

The key for ChaCha20.

Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

type Implementation ChaCha20 Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

chacha20 :: ChaCha20 Source #

The chacha20 stream cipher.

data KEY Source #

The key type.

Instances

Instances details
Show KEY Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

showsPrec :: Int -> KEY -> ShowS

show :: KEY -> String

showList :: [KEY] -> ShowS

IsString KEY Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

fromString :: String -> KEY

Storable KEY Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

sizeOf :: KEY -> Int

alignment :: KEY -> Int

peekElemOff :: Ptr KEY -> Int -> IO KEY

pokeElemOff :: Ptr KEY -> Int -> KEY -> IO ()

peekByteOff :: Ptr b -> Int -> IO KEY

pokeByteOff :: Ptr b -> Int -> KEY -> IO ()

peek :: Ptr KEY -> IO KEY

poke :: Ptr KEY -> KEY -> IO ()

EndianStore KEY Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

store :: Ptr KEY -> KEY -> IO () Source #

load :: Ptr KEY -> IO KEY Source #

adjustEndian :: Ptr KEY -> Int -> IO () Source #

Encodable KEY Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

toByteString :: KEY -> ByteString Source #

fromByteString :: ByteString -> Maybe KEY Source #

unsafeFromByteString :: ByteString -> KEY Source #

RandomStorable KEY Source # 
Instance details

Defined in Raaz.Random

Methods

fillRandomElements :: Memory mem => Int -> Ptr KEY -> RT mem () Source #

data IV Source #

The IV for the chacha20

Instances

Instances details
Show IV Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

showsPrec :: Int -> IV -> ShowS

show :: IV -> String

showList :: [IV] -> ShowS

IsString IV Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

fromString :: String -> IV

Storable IV Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

sizeOf :: IV -> Int

alignment :: IV -> Int

peekElemOff :: Ptr IV -> Int -> IO IV

pokeElemOff :: Ptr IV -> Int -> IV -> IO ()

peekByteOff :: Ptr b -> Int -> IO IV

pokeByteOff :: Ptr b -> Int -> IV -> IO ()

peek :: Ptr IV -> IO IV

poke :: Ptr IV -> IV -> IO ()

EndianStore IV Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

store :: Ptr IV -> IV -> IO () Source #

load :: Ptr IV -> IO IV Source #

adjustEndian :: Ptr IV -> Int -> IO () Source #

Encodable IV Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

toByteString :: IV -> ByteString Source #

fromByteString :: ByteString -> Maybe IV Source #

unsafeFromByteString :: ByteString -> IV Source #

RandomStorable IV Source # 
Instance details

Defined in Raaz.Random

Methods

fillRandomElements :: Memory mem => Int -> Ptr IV -> RT mem () Source #

data Counter Source #

The counter type for chacha20

Instances

Instances details
Eq Counter Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

(==) :: Counter -> Counter -> Bool

(/=) :: Counter -> Counter -> Bool

Num Counter Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Ord Counter Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

compare :: Counter -> Counter -> Ordering

(<) :: Counter -> Counter -> Bool

(<=) :: Counter -> Counter -> Bool

(>) :: Counter -> Counter -> Bool

(>=) :: Counter -> Counter -> Bool

max :: Counter -> Counter -> Counter

min :: Counter -> Counter -> Counter

Show Counter Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

showsPrec :: Int -> Counter -> ShowS

show :: Counter -> String

showList :: [Counter] -> ShowS

Storable Counter Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

sizeOf :: Counter -> Int

alignment :: Counter -> Int

peekElemOff :: Ptr Counter -> Int -> IO Counter

pokeElemOff :: Ptr Counter -> Int -> Counter -> IO ()

peekByteOff :: Ptr b -> Int -> IO Counter

pokeByteOff :: Ptr b -> Int -> Counter -> IO ()

peek :: Ptr Counter -> IO Counter

poke :: Ptr Counter -> Counter -> IO ()

EndianStore Counter Source # 
Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

store :: Ptr Counter -> Counter -> IO () Source #

load :: Ptr Counter -> IO Counter Source #

adjustEndian :: Ptr Counter -> Int -> IO () Source #