XilinxProcessorIPLib/drivers/hdcp22_rx/src/xhdcp22_rx_crypt.c
static void XHdcp22Rx_Pkcs1MontMultFiosInit(XHdcp22_Rx *InstancePtr, u32 *N,
	const u32 *NPrime, int NDigits)
{
	/* Verify arguments */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(N != NULL);
	Xil_AssertVoid(NPrime != NULL);
	Xil_AssertVoid(NDigits == 16);

	/* Check Ready */
	while(XHdcp22_mmult_IsReady(&InstancePtr->MmultInst) == 0);

	/* Write Register N */
	XHdcp22_mmult_Write_N_Words(&InstancePtr->MmultInst, 0, (int *)N, NDigits);

	/* Write Register NPrime */
	XHdcp22_mmult_Write_NPrime_Words(&InstancePtr->MmultInst, 0, (int *)NPrime, NDigits);
}
/****************************************************************************/
/**
* This function initializes the Montgomery Multiplier (MMULT) hardware
* by writing the N and NPrime registers.
*
* U = MontMult(A,B,N)
*
* Reference:
* Analyzing and Comparing Montgomery Multiplication Algorithms
* IEEE Micro, 16(3):26-33,June 1996
* By: Cetin Koc, Tolga Acar, and Burton Kaliski
*
* @param	InstancePtr is a pointer to the MMULT instance.
* @param	N is the modulus
* @param	NPrime is a pre-computed constant, NPrime = (1-R*Rbar)/N
* @param	NDigits is the integer precision of the arguments (C,A,B,N,NPrime)
*
* @return	None.
*
* @note		None.
*****************************************************************************/
This function initializes the Montgomery Multiplier (MMULT) hardware
by writing the N and NPrime registers.



Analyzing and Comparing Montgomery Multiplication Algorithms
IEEE Micro, 16(3):26-33,June 1996
By: Cetin Koc, Tolga Acar, and Burton Kaliski
This function initializes the Montgomery Multiplier ( MMULT ) hardware by writing the N and NPrime registers . Analyzing and Comparing Montgomery Multiplication Algorithms IEEE Micro 16 ( 3 ) : 26 - 33 June 1996 By : Cetin Koc Tolga Acar and Burton Kaliski
static void XHdcp22Rx_Pkcs1MontMultFiosInit(XHdcp22_Rx *InstancePtr, u32 *N,
	const u32 *NPrime, int NDigits)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(N != NULL);
	Xil_AssertVoid(NPrime != NULL);
	Xil_AssertVoid(NDigits == 16);
	while(XHdcp22_mmult_IsReady(&InstancePtr->MmultInst) == 0);
	XHdcp22_mmult_Write_N_Words(&InstancePtr->MmultInst, 0, (int *)N, NDigits);
	XHdcp22_mmult_Write_NPrime_Words(&InstancePtr->MmultInst, 0, (int *)NPrime, NDigits);
}
static void XHdcp22Rx_Pkcs1MontMultFiosInit ( XHdcp22_Rx * InstancePtr , u32 * N , const u32 * NPrime , int NDigits ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( N != NULL ) ; Xil_AssertVoid ( NPrime != NULL ) ; Xil_AssertVoid ( NDigits == 16 ) ; while ( XHdcp22_mmult_IsReady ( & InstancePtr -> MmultInst ) == 0 ) ; XHdcp22_mmult_Write_N_Words ( & InstancePtr -> MmultInst , 0 , ( int * ) N , NDigits ) ; XHdcp22_mmult_Write_NPrime_Words ( & InstancePtr -> MmultInst , 0 , ( int * ) NPrime , NDigits ) ; }
This function initializes the Montgomery Multiplier (MMULT) hardware
by writing the N and NPrime registers.
This function initializes the Montgomery Multiplier ( MMULT ) hardware by writing the N and NPrime registers .
/* Verify arguments */ /* Check Ready */ /* Write Register N */ /* Write Register NPrime */