raaz-0.2.1: The raaz cryptographic library.

Safe Haskell | None
Language | Haskell2010

Raaz.Cipher.ChaCha20

Description

The Chacha20 cipher.

Synopsis

- data ChaCha20
- chacha20 :: ChaCha20
- data KEY
- data IV
- data Counter

# Documentation

data ChaCha20 Source #

The type associated with the ChaCha20 cipher.

Instances

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 Methods recommended :: ChaCha20 -> Implementation ChaCha20 Source #
Primitive ChaCha20 Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Associated Types type Implementation ChaCha20 :: Type 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 Key ChaCha20 = (KEY, IV, Counter)
type Implementation ChaCha20 Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal type Implementation ChaCha20 = SomeCipherI ChaCha20

chacha20 :: ChaCha20 Source #

The chacha20 stream cipher.

data KEY Source #

The key type.

Instances

Show KEY Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods showsPrec :: Int -> KEY -> ShowS Source # show :: KEY -> String Source # showList :: [KEY] -> ShowS Source #
IsString KEY Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods fromString :: String -> KEY Source #
Storable KEY Source # |

Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

sizeOf :: KEY -> Int Source #

alignment :: KEY -> Int Source #

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

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

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

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

peek :: Ptr KEY -> IO KEY Source #

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

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

Show IV Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods showsPrec :: Int -> IV -> ShowS Source # show :: IV -> String Source # showList :: [IV] -> ShowS Source #
IsString IV Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods fromString :: String -> IV Source #
Storable IV Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods sizeOf :: IV -> Int Source # alignment :: IV -> Int Source # peekElemOff :: Ptr IV -> Int -> IO IV Source # pokeElemOff :: Ptr IV -> Int -> IV -> IO () Source # peekByteOff :: Ptr b -> Int -> IO IV Source # pokeByteOff :: Ptr b -> Int -> IV -> IO () Source # peek :: Ptr IV -> IO IV Source # poke :: Ptr IV -> IV -> IO () Source #
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

Eq Counter Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods (==) :: Counter -> Counter -> Bool Source # (/=) :: Counter -> Counter -> Bool Source #
Num Counter Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods (+) :: Counter -> Counter -> Counter Source # (-) :: Counter -> Counter -> Counter Source # (*) :: Counter -> Counter -> Counter Source # negate :: Counter -> Counter Source # abs :: Counter -> Counter Source # signum :: Counter -> Counter Source # fromInteger :: Integer -> Counter Source #
Ord Counter Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods compare :: Counter -> Counter -> Ordering Source # (<) :: Counter -> Counter -> Bool Source # (<=) :: Counter -> Counter -> Bool Source # (>) :: Counter -> Counter -> Bool Source # (>=) :: Counter -> Counter -> Bool Source # max :: Counter -> Counter -> Counter Source # min :: Counter -> Counter -> Counter Source #
Show Counter Source # |
Instance details Defined in Raaz.Cipher.ChaCha20.Internal Methods showsPrec :: Int -> Counter -> ShowS Source # show :: Counter -> String Source # showList :: [Counter] -> ShowS Source #
Storable Counter Source # |

Instance details

Defined in Raaz.Cipher.ChaCha20.Internal

Methods

sizeOf :: Counter -> Int Source #

alignment :: Counter -> Int Source #

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

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

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

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

peek :: Ptr Counter -> IO Counter Source #

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

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 #