blake2s128.c File Reference

BLAKE2s-128 hash function. More...

#include "core/crypto.h"
#include "hash/blake2s128.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL
 

Functions

error_t blake2s128Compute (const void *data, size_t length, uint8_t *digest)
 Digest a message using BLAKE2s-128. More...
 
void blake2s128Init (Blake2s128Context *context)
 Initialize BLAKE2s-128 hash computation. More...
 
void blake2s128Update (Blake2s128Context *context, const void *data, size_t length)
 Update BLAKE2s-128 hash computation. More...
 
void blake2s128Final (Blake2s128Context *context, uint8_t *digest)
 Finish BLAKE2s-128 hash computation. More...
 

Variables

const uint8_t blake2s128Oid [11] = {0x43, 0x06, 0x01, 0x04, 0x01, 0x8D, 0x3A, 0x0C, 0x02, 0x02, 0x04}
 
const HashAlgo blake2s128HashAlgo
 

Detailed Description

BLAKE2s-128 hash function.

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneCrypto Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file blake2s128.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 30 of file blake2s128.c.

Function Documentation

◆ blake2s128Compute()

error_t blake2s128Compute ( const void *  data,
size_t  length,
uint8_t *  digest 
)

Digest a message using BLAKE2s-128.

Parameters
[in]dataPointer to the message being hashed
[in]lengthLength of the message
[out]digestPointer to the calculated digest
Returns
Error code

Definition at line 66 of file blake2s128.c.

◆ blake2s128Final()

void blake2s128Final ( Blake2s128Context context,
uint8_t *  digest 
)

Finish BLAKE2s-128 hash computation.

Parameters
[in]contextPointer to the BLAKE2s context
[out]digestCalculated digest (optional parameter)

Definition at line 105 of file blake2s128.c.

◆ blake2s128Init()

void blake2s128Init ( Blake2s128Context context)

Initialize BLAKE2s-128 hash computation.

Parameters
[in]contextPointer to the BLAKE2s context to initialize

Definition at line 78 of file blake2s128.c.

◆ blake2s128Update()

void blake2s128Update ( Blake2s128Context context,
const void *  data,
size_t  length 
)

Update BLAKE2s-128 hash computation.

Parameters
[in]contextPointer to the BLAKE2s context
[in]dataPointer to the buffer being hashed
[in]lengthLength of the buffer

Definition at line 92 of file blake2s128.c.

Variable Documentation

◆ blake2s128HashAlgo

const HashAlgo blake2s128HashAlgo
Initial value:
=
{
"BLAKE2s-128",
sizeof(blake2s128Oid),
}
error_t(* HashAlgoCompute)(const void *data, size_t length, uint8_t *digest)
Definition: crypto.h:1020
const uint8_t blake2s128Oid[11]
Definition: blake2s128.c:40
error_t blake2s128Compute(const void *data, size_t length, uint8_t *digest)
Digest a message using BLAKE2s-128.
Definition: blake2s128.c:66
void(* HashAlgoInit)(void *context)
Definition: crypto.h:1021
void(* HashAlgoUpdate)(void *context, const void *data, size_t length)
Definition: crypto.h:1022
#define BLAKE2S128_BLOCK_SIZE
Definition: blake2s128.h:37
BLAKE2s algorithm context.
Definition: blake2s.h:48
void blake2s128Update(Blake2s128Context *context, const void *data, size_t length)
Update BLAKE2s-128 hash computation.
Definition: blake2s128.c:92
void blake2s128Final(Blake2s128Context *context, uint8_t *digest)
Finish BLAKE2s-128 hash computation.
Definition: blake2s128.c:105
#define BLAKE2S128_DIGEST_SIZE
Definition: blake2s128.h:39
void blake2s128Init(Blake2s128Context *context)
Initialize BLAKE2s-128 hash computation.
Definition: blake2s128.c:78
void(* HashAlgoFinal)(void *context, uint8_t *digest)
Definition: crypto.h:1023

Definition at line 43 of file blake2s128.c.

◆ blake2s128Oid

const uint8_t blake2s128Oid[11] = {0x43, 0x06, 0x01, 0x04, 0x01, 0x8D, 0x3A, 0x0C, 0x02, 0x02, 0x04}

Definition at line 40 of file blake2s128.c.