tiger.h File Reference

Tiger hash function. More...

#include "core/crypto.h"

Go to the source code of this file.

Data Structures

struct  TigerContext
 Tiger algorithm context. More...
 

Macros

#define TIGER_BLOCK_SIZE   64
 
#define TIGER_DIGEST_SIZE   24
 
#define TIGER_MIN_PAD_SIZE   9
 
#define TIGER_HASH_ALGO   (&tigerHashAlgo)
 

Functions

error_t tigerCompute (const void *data, size_t length, uint8_t *digest)
 Digest a message using Tiger. More...
 
void tigerInit (TigerContext *context)
 Initialize Tiger message digest context. More...
 
void tigerUpdate (TigerContext *context, const void *data, size_t length)
 Update the Tiger context with a portion of the message being hashed. More...
 
void tigerFinal (TigerContext *context, uint8_t *digest)
 Finish the Tiger message digest. More...
 
void tigerProcessBlock (TigerContext *context)
 Process message in 16-word blocks. More...
 

Variables

const uint8_t TIGER_OID [9]
 
const HashAlgo tigerHashAlgo
 

Detailed Description

Tiger hash function.

License

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

Copyright (C) 2010-2024 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.4.0

Definition in file tiger.h.

Macro Definition Documentation

◆ TIGER_BLOCK_SIZE

#define TIGER_BLOCK_SIZE   64

Definition at line 38 of file tiger.h.

◆ TIGER_DIGEST_SIZE

#define TIGER_DIGEST_SIZE   24

Definition at line 40 of file tiger.h.

◆ TIGER_HASH_ALGO

#define TIGER_HASH_ALGO   (&tigerHashAlgo)

Definition at line 44 of file tiger.h.

◆ TIGER_MIN_PAD_SIZE

#define TIGER_MIN_PAD_SIZE   9

Definition at line 42 of file tiger.h.

Function Documentation

◆ tigerCompute()

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

Digest a message using Tiger.

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 386 of file tiger.c.

◆ tigerFinal()

void tigerFinal ( TigerContext context,
uint8_t *  digest 
)

Finish the Tiger message digest.

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

Definition at line 491 of file tiger.c.

◆ tigerInit()

void tigerInit ( TigerContext context)

Initialize Tiger message digest context.

Parameters
[in]contextPointer to the Tiger context to initialize

Definition at line 431 of file tiger.c.

◆ tigerProcessBlock()

void tigerProcessBlock ( TigerContext context)

Process message in 16-word blocks.

Parameters
[in]contextPointer to the Tiger context

Definition at line 538 of file tiger.c.

◆ tigerUpdate()

void tigerUpdate ( TigerContext context,
const void *  data,
size_t  length 
)

Update the Tiger context with a portion of the message being hashed.

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

Definition at line 452 of file tiger.c.

Variable Documentation

◆ TIGER_OID

const uint8_t TIGER_OID[9]
extern

Definition at line 357 of file tiger.c.

◆ tigerHashAlgo

const HashAlgo tigerHashAlgo
extern

Definition at line 360 of file tiger.c.