shake256_512.c File Reference

SHAKE256/512 hash function. More...

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

Go to the source code of this file.

Macros

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL
 

Functions

__weak_func error_t shake256_512Compute (const void *data, size_t length, uint8_t *digest)
 Digest a message using SHAKE256/512. More...
 
__weak_func void shake256_512Init (Shake256_512Context *context)
 Initialize SHAKE256/512 message digest context. More...
 
__weak_func void shake256_512Update (Shake256_512Context *context, const void *data, size_t length)
 Update the SHAKE256/512 context with a portion of the message being hashed. More...
 
__weak_func void shake256_512Final (Shake256_512Context *context, uint8_t *digest)
 Finish the SHAKE256/512 message digest. More...
 

Variables

const HashAlgo shake256_512HashAlgo
 

Detailed Description

SHAKE256/512 hash function.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2026 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
2.6.6

Definition in file shake256_512.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 32 of file shake256_512.c.

Function Documentation

◆ shake256_512Compute()

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

Digest a message using SHAKE256/512.

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 68 of file shake256_512.c.

◆ shake256_512Final()

__weak_func void shake256_512Final ( Shake256_512Context *  context,
uint8_t *  digest 
)

Finish the SHAKE256/512 message digest.

Parameters
[in]contextPointer to the SHAKE256/512 context
[out]digestCalculated digest

Definition at line 140 of file shake256_512.c.

◆ shake256_512Init()

__weak_func void shake256_512Init ( Shake256_512Context *  context)

Initialize SHAKE256/512 message digest context.

Parameters
[in]contextPointer to the SHAKE256/512 context to initialize

Definition at line 113 of file shake256_512.c.

◆ shake256_512Update()

__weak_func void shake256_512Update ( Shake256_512Context *  context,
const void *  data,
size_t  length 
)

Update the SHAKE256/512 context with a portion of the message being hashed.

Parameters
[in]contextPointer to the SHAKE256/512 context
[in]dataPointer to the buffer being hashed
[in]lengthLength of the buffer

Definition at line 127 of file shake256_512.c.

Variable Documentation

◆ shake256_512HashAlgo

void(* HashAlgoInit)(void *context)
Definition: crypto.h:1174
#define TRUE
Definition: os_port.h:50
#define SHAKE256_512_BLOCK_SIZE
Definition: shake256_512.h:39
#define SHAKE256_512_DIGEST_SIZE
Definition: shake256_512.h:41
void(* HashAlgoUpdate)(void *context, const void *data, size_t length)
Definition: crypto.h:1175
__weak_func void shake256_512Final(Shake256_512Context *context, uint8_t *digest)
Finish the SHAKE256/512 message digest.
Definition: shake256_512.c:140
#define SHAKE256_512_MIN_PAD_SIZE
Definition: shake256_512.h:43
const uint8_t SHAKE256_OID[9]
Definition: shake.c:50
__weak_func void shake256_512Init(Shake256_512Context *context)
Initialize SHAKE256/512 message digest context.
Definition: shake256_512.c:113
__weak_func error_t shake256_512Compute(const void *data, size_t length, uint8_t *digest)
Digest a message using SHAKE256/512.
Definition: shake256_512.c:68
SHAKE algorithm context.
Definition: shake.h:53
void(* HashAlgoFinal)(void *context, uint8_t *digest)
Definition: crypto.h:1176
__weak_func void shake256_512Update(Shake256_512Context *context, const void *data, size_t length)
Update the SHAKE256/512 context with a portion of the message being hashed.
Definition: shake256_512.c:127
error_t(* HashAlgoCompute)(const void *data, size_t length, uint8_t *digest)
Definition: crypto.h:1171