~ruther/vhdl-spi-2

ref: 330f5837d493e625d2de112bfe7cdeee7f7a4df1 vhdl-spi-2/vitis/spi_peripheral/zynq_fsbl/rsa.h -rw-r--r-- 1.5 KiB
330f5837 — Rutherther docs: add readme 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/******************************************************************************
* Copyright (c) 2012 - 2022 Xilinx, Inc.  All rights reserved.
* SPDX-License-Identifier: MIT
******************************************************************************/

/*****************************************************************************/
/**
*
* @file rsa.h
*
* This file contains the RSA algorithm functions
*
* <pre>
* MODIFICATION HISTORY:
*
* Ver	Who	Date		Changes
* ----- ---- -------- -------------------------------------------------------
* 4.00a sg	02/28/13 Initial release
* 5.0   vns     03/18/22 Modified prototype of AuthenticatePartition() API
*
* </pre>
*
* @note
*
******************************************************************************/
#ifndef ___RSA_H___
#define ___RSA_H___

#ifdef __cplusplus
extern "C" {
#endif
/***************************** Include Files *********************************/


#define RSA_PPK_MODULAR_SIZE			256
#define RSA_PPK_MODULAR_EXT_SIZE		256
#define RSA_PPK_EXPO_SIZE				64
#define RSA_SPK_MODULAR_SIZE			256
#define RSA_SPK_MODULAR_EXT_SIZE		256
#define RSA_SPK_EXPO_SIZE				64
#define RSA_SPK_SIGNATURE_SIZE			256
#define RSA_PARTITION_SIGNATURE_SIZE	256
#define RSA_SIGNATURE_SIZE				0x6C0 	/* Signature size in bytes */
#define RSA_HEADER_SIZE					4 		/* Signature header size in bytes */
#define RSA_MAGIC_WORD_SIZE				60		/* Magic word size in bytes */

void SetPpk(void );
u32 AuthenticatePartition(u8 *Ac, u8 *Hash);
u32 RecreatePaddingAndCheck(u8 *signature, u8 *hash);

#ifdef __cplusplus
}
#endif

#endif /* ___RSA_H___ */
Do not follow this link