cryptnox-pos 1.0.0
Standalone USDC payment terminal firmware (ESP32 + Cryptnox smart card)
Loading...
Searching...
No Matches
keccak256.h File Reference

Original Keccak-256 digest as used by Ethereum. More...

#include <stdint.h>
#include <stddef.h>
Include dependency graph for keccak256.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void keccak256 (const uint8_t *input, size_t length, uint8_t digest[32])
 Compute the Keccak-256 digest of a buffer.

Detailed Description

Original Keccak-256 digest as used by Ethereum.

Definition in file keccak256.h.

Function Documentation

◆ keccak256()

void keccak256 ( const uint8_t * input,
size_t length,
uint8_t digest[32] )

Compute the Keccak-256 digest of a buffer.

Ethereum uses the original Keccak-256 (0x01 padding), NOT the NIST-finalised SHA3-256 (0x06 padding).

Parameters
[in]inputInput bytes (may be NULL only if length is 0).
[in]lengthNumber of input bytes.
[out]digest32-byte output digest.

Definition at line 120 of file keccak256.cpp.

References keccak_f1600(), KECCAK_RATE, and KECCAK_STATE_LANE.

Referenced by admin_derive(), card_read_payouts(), eth_addr_format(), eth_addr_parse(), and sign_and_broadcast().