TianoCore EDK2 master
Loading...
Searching...
No Matches
CryptXkcp.c File Reference

Go to the source code of this file.

Functions

UINTN EFIAPI LeftEncode (OUT UINT8 *EncBuf, IN UINTN Value)
 
UINTN EFIAPI RightEncode (OUT UINT8 *EncBuf, IN UINTN Value)
 

Detailed Description

Encode realted functions from Xkcp.

Copyright (c) 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Copyright 2022 The eXtended Keccak Code Package (XKCP) https://github.com/XKCP/XKCP Keccak, designed by Guido Bertoni, Joan Daemen, Michael Peeters and Gilles Van Assche. Implementation by the designers, hereby denoted as "the implementer". For more information, feedback or questions, please refer to the Keccak Team website: https://keccak.team/ To the extent possible under law, the implementer has waived all copyright and related or neighboring rights to the source code in this file. http://creativecommons.org/publicdomain/zero/1.0/

Definition in file CryptXkcp.c.

Function Documentation

◆ LeftEncode()

UINTN EFIAPI LeftEncode ( OUT UINT8 *  EncBuf,
IN UINTN  Value 
)

Encode function from XKCP.

Encodes the input as a byte string in a way that can be unambiguously parsed from the beginning of the string by inserting the length of the byte string before the byte string representation of input.

Parameters
[out]EncBufResult of left encode.
[in]ValueInput of left encode.
Return values
EncLenSize of encode result in bytes.

Definition at line 35 of file CryptXkcp.c.

◆ RightEncode()

UINTN EFIAPI RightEncode ( OUT UINT8 *  EncBuf,
IN UINTN  Value 
)

Encode function from XKCP.

Encodes the input as a byte string in a way that can be unambiguously parsed from the end of the string by inserting the length of the byte string after the byte string representation of input.

Parameters
[out]EncBufResult of right encode.
[in]ValueInput of right encode.
Return values
EncLenSize of encode result in bytes.

Definition at line 79 of file CryptXkcp.c.