Project Alice
Loading...
Searching...
No Matches
blake2.h File Reference
#include <stddef.h>
#include <stdint.h>
Include dependency graph for blake2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  blake2s_state__
 
struct  blake2b_state__
 
struct  blake2sp_state__
 
struct  blake2bp_state__
 
struct  blake2xs_state__
 
struct  blake2xb_state__
 

Macros

#define BLAKE2_PACKED(x)   x __attribute__((packed))
 

Typedefs

typedef struct blake2s_state__ blake2s_state
 
typedef struct blake2b_state__ blake2b_state
 
typedef struct blake2sp_state__ blake2sp_state
 
typedef struct blake2bp_state__ blake2bp_state
 
typedef struct blake2s_param__ blake2s_param
 
typedef struct blake2b_param__ blake2b_param
 
typedef struct blake2xs_state__ blake2xs_state
 
typedef struct blake2xb_state__ blake2xb_state
 

Enumerations

enum  blake2s_constant {
  BLAKE2S_BLOCKBYTES = 64 , BLAKE2S_OUTBYTES = 32 , BLAKE2S_KEYBYTES = 32 , BLAKE2S_SALTBYTES = 8 ,
  BLAKE2S_PERSONALBYTES = 8
}
 
enum  blake2b_constant {
  BLAKE2B_BLOCKBYTES = 128 , BLAKE2B_OUTBYTES = 64 , BLAKE2B_KEYBYTES = 64 , BLAKE2B_SALTBYTES = 16 ,
  BLAKE2B_PERSONALBYTES = 16
}
 
enum  { BLAKE2_DUMMY_1 = 1 / (int)(sizeof(blake2s_param) == BLAKE2S_OUTBYTES) , BLAKE2_DUMMY_2 = 1 / (int)(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) }
 

Functions

 BLAKE2_PACKED (struct blake2s_param__ { uint8_t digest_length;uint8_t key_length;uint8_t fanout;uint8_t depth;uint32_t leaf_length;uint32_t node_offset;uint16_t xof_length;uint8_t node_depth;uint8_t inner_length;uint8_t salt[BLAKE2S_SALTBYTES];uint8_t personal[BLAKE2S_PERSONALBYTES];})
 
 BLAKE2_PACKED (struct blake2b_param__ { uint8_t digest_length;uint8_t key_length;uint8_t fanout;uint8_t depth;uint32_t leaf_length;uint32_t node_offset;uint32_t xof_length;uint8_t node_depth;uint8_t inner_length;uint8_t reserved[14];uint8_t salt[BLAKE2B_SALTBYTES];uint8_t personal[BLAKE2B_PERSONALBYTES];})
 
int blake2s_init (blake2s_state *S, size_t outlen)
 
int blake2s_init_key (blake2s_state *S, size_t outlen, const void *key, size_t keylen)
 
int blake2s_init_param (blake2s_state *S, const blake2s_param *P)
 
int blake2s_update (blake2s_state *S, const void *in, size_t inlen)
 
int blake2s_final (blake2s_state *S, void *out, size_t outlen)
 
int blake2b_init (blake2b_state *S, size_t outlen)
 
int blake2b_init_key (blake2b_state *S, size_t outlen, const void *key, size_t keylen)
 
int blake2b_init_param (blake2b_state *S, const blake2b_param *P)
 
int blake2b_update (blake2b_state *S, const void *in, size_t inlen)
 
int blake2b_final (blake2b_state *S, void *out, size_t outlen)
 
int blake2sp_init (blake2sp_state *S, size_t outlen)
 
int blake2sp_init_key (blake2sp_state *S, size_t outlen, const void *key, size_t keylen)
 
int blake2sp_update (blake2sp_state *S, const void *in, size_t inlen)
 
int blake2sp_final (blake2sp_state *S, void *out, size_t outlen)
 
int blake2bp_init (blake2bp_state *S, size_t outlen)
 
int blake2bp_init_key (blake2bp_state *S, size_t outlen, const void *key, size_t keylen)
 
int blake2bp_update (blake2bp_state *S, const void *in, size_t inlen)
 
int blake2bp_final (blake2bp_state *S, void *out, size_t outlen)
 
int blake2xs_init (blake2xs_state *S, const size_t outlen)
 
int blake2xs_init_key (blake2xs_state *S, const size_t outlen, const void *key, size_t keylen)
 
int blake2xs_update (blake2xs_state *S, const void *in, size_t inlen)
 
int blake2xs_final (blake2xs_state *S, void *out, size_t outlen)
 
int blake2xb_init (blake2xb_state *S, const size_t outlen)
 
int blake2xb_init_key (blake2xb_state *S, const size_t outlen, const void *key, size_t keylen)
 
int blake2xb_update (blake2xb_state *S, const void *in, size_t inlen)
 
int blake2xb_final (blake2xb_state *S, void *out, size_t outlen)
 
int blake2s (void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen)
 
int blake2b (void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen)
 
int blake2sp (void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen)
 
int blake2bp (void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen)
 
int blake2xs (void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen)
 
int blake2xb (void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen)
 
int blake2 (void *out, size_t outlen, const void *in, size_t inlen, const void *key, size_t keylen)
 

Macro Definition Documentation

◆ BLAKE2_PACKED

#define BLAKE2_PACKED (   x)    x __attribute__((packed))

Definition at line 24 of file blake2.h.

Typedef Documentation

◆ blake2b_param

typedef struct blake2b_param__ blake2b_param

Definition at line 116 of file blake2.h.

◆ blake2b_state

◆ blake2bp_state

◆ blake2s_param

typedef struct blake2s_param__ blake2s_param

Definition at line 99 of file blake2.h.

◆ blake2s_state

◆ blake2sp_state

◆ blake2xb_state

◆ blake2xs_state

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BLAKE2_DUMMY_1 
BLAKE2_DUMMY_2 

Definition at line 129 of file blake2.h.

◆ blake2b_constant

Enumerator
BLAKE2B_BLOCKBYTES 
BLAKE2B_OUTBYTES 
BLAKE2B_KEYBYTES 
BLAKE2B_SALTBYTES 
BLAKE2B_PERSONALBYTES 

Definition at line 39 of file blake2.h.

◆ blake2s_constant

Enumerator
BLAKE2S_BLOCKBYTES 
BLAKE2S_OUTBYTES 
BLAKE2S_KEYBYTES 
BLAKE2S_SALTBYTES 
BLAKE2S_PERSONALBYTES 

Definition at line 31 of file blake2.h.

Function Documentation

◆ blake2()

int blake2 ( void *  out,
size_t  outlen,
const void *  in,
size_t  inlen,
const void *  key,
size_t  keylen 
)

Definition at line 284 of file blake2.c.

Here is the call graph for this function:

◆ BLAKE2_PACKED() [1/2]

BLAKE2_PACKED ( struct blake2b_param__ { uint8_t digest_length;uint8_t key_length;uint8_t fanout;uint8_t depth;uint32_t leaf_length;uint32_t node_offset;uint32_t xof_length;uint8_t node_depth;uint8_t inner_length;uint8_t reserved[14];uint8_t salt[BLAKE2B_SALTBYTES];uint8_t personal[BLAKE2B_PERSONALBYTES];}  )

◆ BLAKE2_PACKED() [2/2]

BLAKE2_PACKED ( struct blake2s_param__ { uint8_t digest_length;uint8_t key_length;uint8_t fanout;uint8_t depth;uint32_t leaf_length;uint32_t node_offset;uint16_t xof_length;uint8_t node_depth;uint8_t inner_length;uint8_t salt[BLAKE2S_SALTBYTES];uint8_t personal[BLAKE2S_PERSONALBYTES];}  )

◆ blake2b()

int blake2b ( void *  out,
size_t  outlen,
const void *  in,
size_t  inlen,
const void *  key,
size_t  keylen 
)

Definition at line 259 of file blake2.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blake2b_final()

int blake2b_final ( blake2b_state S,
void *  out,
size_t  outlen 
)

Definition at line 235 of file blake2.c.

Here is the caller graph for this function:

◆ blake2b_init()

int blake2b_init ( blake2b_state S,
size_t  outlen 
)

Definition at line 91 of file blake2.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blake2b_init_key()

int blake2b_init_key ( blake2b_state S,
size_t  outlen,
const void *  key,
size_t  keylen 
)

Definition at line 112 of file blake2.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blake2b_init_param()

int blake2b_init_param ( blake2b_state S,
const blake2b_param P 
)

Definition at line 77 of file blake2.c.

Here is the caller graph for this function:

◆ blake2b_update()

int blake2b_update ( blake2b_state S,
const void *  in,
size_t  inlen 
)

Definition at line 211 of file blake2.c.

Here is the caller graph for this function:

◆ blake2bp()

int blake2bp ( void *  out,
size_t  outlen,
const void *  in,
size_t  inlen,
const void *  key,
size_t  keylen 
)

◆ blake2bp_final()

int blake2bp_final ( blake2bp_state S,
void *  out,
size_t  outlen 
)

◆ blake2bp_init()

int blake2bp_init ( blake2bp_state S,
size_t  outlen 
)

◆ blake2bp_init_key()

int blake2bp_init_key ( blake2bp_state S,
size_t  outlen,
const void *  key,
size_t  keylen 
)

◆ blake2bp_update()

int blake2bp_update ( blake2bp_state S,
const void *  in,
size_t  inlen 
)

◆ blake2s()

int blake2s ( void *  out,
size_t  outlen,
const void *  in,
size_t  inlen,
const void *  key,
size_t  keylen 
)

◆ blake2s_final()

int blake2s_final ( blake2s_state S,
void *  out,
size_t  outlen 
)

◆ blake2s_init()

int blake2s_init ( blake2s_state S,
size_t  outlen 
)

◆ blake2s_init_key()

int blake2s_init_key ( blake2s_state S,
size_t  outlen,
const void *  key,
size_t  keylen 
)

◆ blake2s_init_param()

int blake2s_init_param ( blake2s_state S,
const blake2s_param P 
)

◆ blake2s_update()

int blake2s_update ( blake2s_state S,
const void *  in,
size_t  inlen 
)

◆ blake2sp()

int blake2sp ( void *  out,
size_t  outlen,
const void *  in,
size_t  inlen,
const void *  key,
size_t  keylen 
)

◆ blake2sp_final()

int blake2sp_final ( blake2sp_state S,
void *  out,
size_t  outlen 
)

◆ blake2sp_init()

int blake2sp_init ( blake2sp_state S,
size_t  outlen 
)

◆ blake2sp_init_key()

int blake2sp_init_key ( blake2sp_state S,
size_t  outlen,
const void *  key,
size_t  keylen 
)

◆ blake2sp_update()

int blake2sp_update ( blake2sp_state S,
const void *  in,
size_t  inlen 
)

◆ blake2xb()

int blake2xb ( void *  out,
size_t  outlen,
const void *  in,
size_t  inlen,
const void *  key,
size_t  keylen 
)

◆ blake2xb_final()

int blake2xb_final ( blake2xb_state S,
void *  out,
size_t  outlen 
)

◆ blake2xb_init()

int blake2xb_init ( blake2xb_state S,
const size_t  outlen 
)

◆ blake2xb_init_key()

int blake2xb_init_key ( blake2xb_state S,
const size_t  outlen,
const void *  key,
size_t  keylen 
)

◆ blake2xb_update()

int blake2xb_update ( blake2xb_state S,
const void *  in,
size_t  inlen 
)

◆ blake2xs()

int blake2xs ( void *  out,
size_t  outlen,
const void *  in,
size_t  inlen,
const void *  key,
size_t  keylen 
)

◆ blake2xs_final()

int blake2xs_final ( blake2xs_state S,
void *  out,
size_t  outlen 
)

◆ blake2xs_init()

int blake2xs_init ( blake2xs_state S,
const size_t  outlen 
)

◆ blake2xs_init_key()

int blake2xs_init_key ( blake2xs_state S,
const size_t  outlen,
const void *  key,
size_t  keylen 
)

◆ blake2xs_update()

int blake2xs_update ( blake2xs_state S,
const void *  in,
size_t  inlen 
)