forked from Xilinx/u-boot-xlnx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto/fsl - Add progressive hashing support using hardware accelerat…
…ion. Currently only normal hashing is supported using hardware acceleration. Added support for progressive hashing using hardware. Signed-off-by: Ruchika Gupta <[email protected]> Signed-off-by: Gaurav Rana <[email protected]> CC: Simon Glass <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: York Sun <[email protected]>
- Loading branch information
gaurav rana
authored and
York Sun
committed
Feb 25, 2015
1 parent
7ee8c47
commit 94e3c8c
Showing
8 changed files
with
302 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2014 Freescale Semiconductor, Inc. | ||
* | ||
* SPDX-License-Identifier: GPL-2.0+ | ||
* | ||
*/ | ||
|
||
#ifndef _SHA_H | ||
#define _SHA_H | ||
|
||
#include <fsl_sec.h> | ||
#include <hash.h> | ||
#include "jr.h" | ||
|
||
/* We support at most 32 Scatter/Gather Entries.*/ | ||
#define MAX_SG_32 32 | ||
|
||
/* | ||
* Hash context contains the following fields | ||
* @sha_desc: Sha Descriptor | ||
* @sg_num: number of entries in sg table | ||
* @len: total length of buffer | ||
* @sg_tbl: sg entry table | ||
* @hash: index to the hash calculated | ||
*/ | ||
struct sha_ctx { | ||
uint32_t sha_desc[64]; | ||
uint32_t sg_num; | ||
uint32_t len; | ||
struct sg_entry sg_tbl[MAX_SG_32]; | ||
u8 hash[HASH_MAX_DIGEST_SIZE]; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters