shake256_512.h File Reference

SHAKE256/512 hash function. More...

#include "core/crypto.h"
#include "xof/shake.h"

Go to the source code of this file.

Macros

#define SHAKE256_512_BLOCK_SIZE   136
 
#define SHAKE256_512_DIGEST_SIZE   64
 
#define SHAKE256_512_MIN_PAD_SIZE   1
 
#define SHAKE256_512_HASH_ALGO   (&shake256_512HashAlgo)
 

Typedefs

typedef ShakeContext Shake256_512Context
 SHAKE256/512 algorithm context. More...
 

Functions

error_t shake256_512Compute (const void *data, size_t length, uint8_t *digest)
 Digest a message using SHAKE256/512. More...
 
void shake256_512Init (Shake256_512Context *context)
 Initialize SHAKE256/512 message digest context. More...
 
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...
 
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.h.

Macro Definition Documentation

◆ SHAKE256_512_BLOCK_SIZE

#define SHAKE256_512_BLOCK_SIZE   136

Definition at line 39 of file shake256_512.h.

◆ SHAKE256_512_DIGEST_SIZE

#define SHAKE256_512_DIGEST_SIZE   64

Definition at line 41 of file shake256_512.h.

◆ SHAKE256_512_HASH_ALGO

#define SHAKE256_512_HASH_ALGO   (&shake256_512HashAlgo)

Definition at line 45 of file shake256_512.h.

◆ SHAKE256_512_MIN_PAD_SIZE

#define SHAKE256_512_MIN_PAD_SIZE   1

Definition at line 43 of file shake256_512.h.

Typedef Documentation

◆ Shake256_512Context

SHAKE256/512 algorithm context.

Definition at line 57 of file shake256_512.h.

Function Documentation

◆ shake256_512Compute()

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()

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()

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()

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

const HashAlgo shake256_512HashAlgo
extern

Definition at line 42 of file shake256_512.c.