XilinxProcessorIPLib/drivers/hdcp22_rx/src/xhdcp22_rx_crypt.c
static void XHdcp22Rx_Pkcs1MontMultFios(XHdcp22_Rx *InstancePtr, u32 *U,
	u32 *A, u32 *B, int NDigits)
{
	/* Verify arguments */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(U != NULL);
	Xil_AssertVoid(A != NULL);
	Xil_AssertVoid(B != NULL);
	Xil_AssertVoid(NDigits == 16);

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

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

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

	/* Run MontMult */
	XHdcp22_mmult_Start(&InstancePtr->MmultInst);

	/* Poll Result */
	while(XHdcp22_mmult_IsDone(&InstancePtr->MmultInst) == 0);

	/* Read Register U */
	XHdcp22_mmult_Read_U_Words(&InstancePtr->MmultInst, 0, (int *)U, NDigits);
}
/****************************************************************************/
/**
* This function runs the Montgomery Multiplier (MMULT) hardware to perform
* the modular multiplication operation required by RSA decryption.
*
* U = MontMult(A,B,N)
*
* @param	InstancePtr is a pointer to the MMULT instance.
* @param	U is the MMM result
* @param	A is the n-residue input, A' = A*R mod N
* @param	B is the n-residue input, B' = B*R mod N
* @param	NDigits is the integer precision of the arguments (C,A,B,N,NPrime)
*
* @return	None.
*
* @note		None.
*****************************************************************************/
This function runs the Montgomery Multiplier (MMULT) hardware to perform
the modular multiplication operation required by RSA decryption.


This function runs the Montgomery Multiplier ( MMULT ) hardware to perform the modular multiplication operation required by RSA decryption .
static void XHdcp22Rx_Pkcs1MontMultFios(XHdcp22_Rx *InstancePtr, u32 *U,
	u32 *A, u32 *B, int NDigits)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(U != NULL);
	Xil_AssertVoid(A != NULL);
	Xil_AssertVoid(B != NULL);
	Xil_AssertVoid(NDigits == 16);
	while(XHdcp22_mmult_IsReady(&InstancePtr->MmultInst) == 0);
	XHdcp22_mmult_Write_A_Words(&InstancePtr->MmultInst, 0, (int *)A, NDigits);
	XHdcp22_mmult_Write_B_Words(&InstancePtr->MmultInst, 0, (int *)B, NDigits);
	XHdcp22_mmult_Start(&InstancePtr->MmultInst);
	while(XHdcp22_mmult_IsDone(&InstancePtr->MmultInst) == 0);
	XHdcp22_mmult_Read_U_Words(&InstancePtr->MmultInst, 0, (int *)U, NDigits);
}
static void XHdcp22Rx_Pkcs1MontMultFios ( XHdcp22_Rx * InstancePtr , u32 * U , u32 * A , u32 * B , int NDigits ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( U != NULL ) ; Xil_AssertVoid ( A != NULL ) ; Xil_AssertVoid ( B != NULL ) ; Xil_AssertVoid ( NDigits == 16 ) ; while ( XHdcp22_mmult_IsReady ( & InstancePtr -> MmultInst ) == 0 ) ; XHdcp22_mmult_Write_A_Words ( & InstancePtr -> MmultInst , 0 , ( int * ) A , NDigits ) ; XHdcp22_mmult_Write_B_Words ( & InstancePtr -> MmultInst , 0 , ( int * ) B , NDigits ) ; XHdcp22_mmult_Start ( & InstancePtr -> MmultInst ) ; while ( XHdcp22_mmult_IsDone ( & InstancePtr -> MmultInst ) == 0 ) ; XHdcp22_mmult_Read_U_Words ( & InstancePtr -> MmultInst , 0 , ( int * ) U , NDigits ) ; }
This function runs the Montgomery Multiplier (MMULT) hardware to perform
the modular multiplication operation required by RSA decryption.
This function runs the Montgomery Multiplier ( MMULT ) hardware to perform the modular multiplication operation required by RSA decryption .
/* Verify arguments */ /* Check Ready */ /* Write Register A */ /* Write Register B */ /* Run MontMult */ /* Poll Result */ /* Read Register U */