cipher-aes128-0.7: AES and common modes using AES-NI when available.

Safe HaskellNone
LanguageHaskell2010

Crypto.Cipher.AES128.Internal

Contents

Synopsis

Documentation

data RawKey128 Source

Constructors

RKey128 

Fields

lowK128 :: !Word64
 
highK128 :: !Word64
 

data RawKey192 Source

Constructors

RKey192 

Fields

lowK192 :: !Word64
 
midK192 :: !Word64
 
highK192 :: !Word64
 

data RawKey256 Source

Constructors

RKey256 

Fields

aK256 :: !Word64
 
bK256 :: !Word64
 
cK256 :: !Word64
 
dK256 :: !Word64
 

data GCM k Source

Constructors

GCM 

Fields

_gcmFP :: GCMpc
 
_keyFP :: k
 
_ctxFP2 :: ForeignPtr CTXStruct
 

generateKey128 Source

Arguments

:: Ptr Word64

Buffer of 16 bytes of key material

-> IO (Maybe AESKey128) 

generateKey192 Source

Arguments

:: Ptr Word64

Buffer of 16 bytes of key material

-> IO (Maybe AESKey192) 

generateKey256 Source

Arguments

:: Ptr Word64

Buffer of 16 bytes of key material

-> IO (Maybe AESKey256) 

encryptECB Source

Arguments

:: GetExpanded k 
=> k

The key

-> Ptr Word8

The result buffer

-> Ptr Word8

The source buffer

-> Int

The input size in blocks

-> IO () 

decryptECB Source

Arguments

:: GetExpanded k 
=> k

The key

-> Ptr Word8

The result buffer

-> Ptr Word8

The source buffer

-> Int

The input size in blocks

-> IO () 

encryptCTR Source

Arguments

:: GetExpanded k 
=> k 
-> Ptr Word8

IV

-> Ptr Word8

NEW IV

-> Ptr Word8

CT

-> Ptr Word8

PT

-> Int

Length in bytes

-> IO () 

decryptCTR Source

Arguments

:: GetExpanded k 
=> k 
-> Ptr Word8

IV

-> Ptr Word8

NEW IV

-> Ptr Word8

PT

-> Ptr Word8

CT

-> Int

Length in bytes

-> IO () 

Piece-meal functions

aadGCM :: GetExpanded k => GCM k -> Ptr Word8 -> Int -> IO () Source

Internal, will not be exported in a near-future release.

class GetExpanded a Source

Minimal complete definition

expandedKey