81 lines
2.5 KiB
C
81 lines
2.5 KiB
C
/* _NVRM_COPYRIGHT_BEGIN_
|
|
*
|
|
* Copyright 2003-2016 by NVIDIA Corporation. All rights reserved. All
|
|
* information contained herein is proprietary and confidential to NVIDIA
|
|
* Corporation. Any use, reproduction, or disclosure without the written
|
|
* permission of NVIDIA Corporation is prohibited.
|
|
*
|
|
* _NVRM_COPYRIGHT_END_
|
|
*/
|
|
|
|
/* This file is autogenerated by ref2h.pl. Do not edit */
|
|
#ifndef BOOTROM_PKC_PARAMETERS_H
|
|
#define BOOTROM_PKC_PARAMETERS_H
|
|
|
|
#include "bootrom_pkc_parameters_macro.h"
|
|
|
|
struct ECC_sig
|
|
{
|
|
unsigned int R[1024 / 32];
|
|
unsigned int S[1024 / 32];
|
|
};
|
|
|
|
struct RSA_sig
|
|
{
|
|
unsigned int S[4096 / 32];
|
|
};
|
|
|
|
union pkc_sig
|
|
{
|
|
struct RSA_sig rsa3k_sig;
|
|
struct RSA_sig rsa4k_sig;
|
|
struct ECC_sig ecc256_sig;
|
|
struct ECC_sig ecc384_sig;
|
|
struct ECC_sig ecc521_sig;
|
|
};
|
|
|
|
struct RSA_pk
|
|
{
|
|
unsigned int n[4096 / 32]; // modulus
|
|
unsigned int e[4096 / 32]; // public key exponent
|
|
unsigned int np[4096 / 32]; // Montgomery pre-computered value for n
|
|
unsigned int ns_sqr[4096 / 32]; // Montgomery pre-computered value for n
|
|
};
|
|
|
|
// Curve C: y^2=x^3+ax+b (mod p)
|
|
struct ECC_pk
|
|
{
|
|
unsigned int p[1024 / 32]; // modulus of curve
|
|
unsigned int pp[1024 / 32]; // Montgomery pre-computered value for p, only useful for !ECC521
|
|
unsigned int ps_sqr[1024 / 32]; // Montgomery pre-computered value for p, only useful for !ECC521
|
|
unsigned int n[1024 / 32]; // order of curve
|
|
unsigned int np[1024 / 32]; // Montgomery pre-computered value for n, only useful for !ECC521
|
|
unsigned int ns_sqr[1024 / 32]; // Montgomery pre-computered value for n, only useful for !ECC521
|
|
unsigned int n640[1024 / 32];// 640 bit prime to help 521 bit modular multiplication, only useful for ECC521
|
|
unsigned int n640p[1024 / 32];// Montgomery pre-computered value for n640, only useful for ECC521
|
|
unsigned int n640s_sqr[1024 / 32];// Montgomery pre-computered value for n640, only useful for ECC521
|
|
unsigned int a[1024 / 32]; // coefficient of curve
|
|
unsigned int Gx[1024 / 32]; // base point
|
|
unsigned int Gy[1024 / 32]; // base point
|
|
unsigned int Qx[1024 / 32]; // public key
|
|
unsigned int Qy[1024 / 32]; // public key
|
|
};
|
|
|
|
union pkc_pk
|
|
{
|
|
struct RSA_pk rsa3k_pk;
|
|
struct RSA_pk rsa4k_pk;
|
|
struct ECC_pk ecc256_pk;
|
|
struct ECC_pk ecc384_pk;
|
|
struct ECC_pk ecc521_pk;
|
|
};
|
|
|
|
struct pkc_verification_parameters
|
|
{
|
|
union pkc_sig signature;
|
|
union pkc_pk* pk;
|
|
unsigned int hash_saving;
|
|
};
|
|
|
|
#endif
|