XilinxProcessorIPLib/drivers/hdcp22_tx/src/xhdcp22_tx_crypt.c
int XHdcp22Tx_VerifySRM(const u8* SrmPtr, int SrmSize,
	const u8* KpubDcpNPtr, int KpubDcpNSize,
	const u8* KpubDcpEPtr, int KpubDcpESize)
{
	/* Verify arguments */
	Xil_AssertNonvoid(SrmPtr != NULL);
	Xil_AssertNonvoid(KpubDcpNPtr != NULL);
	Xil_AssertNonvoid(KpubDcpEPtr != NULL);
	Xil_AssertNonvoid(SrmSize > 0);
	Xil_AssertNonvoid(KpubDcpNSize > 0);
	Xil_AssertNonvoid(KpubDcpESize > 0);

	int Result = XST_SUCCESS;

	Result = XHdcp22Tx_RsaSignatureVerify (
				(u8 *)SrmPtr,
                    SrmSize - XHDCP22_TX_SRM_SIGNATURE_SIZE,
				SrmPtr + (SrmSize - XHDCP22_TX_SRM_SIGNATURE_SIZE),
				KpubDcpNPtr, KpubDcpNSize,
				KpubDcpEPtr, KpubDcpESize);

	return Result;
}
/*****************************************************************************/
/**
*
* This function verifies a HDCP2 system renewability message (SRM) block.
*
* @param  SrmPtr is a pointer to the SRM.
* @param  SrmSize is the size of the SRM in bytes.
* @param  KpubDcpNPtr is a pointer to the N-value of the DCP LLC key.
* @param  KpubDcpNSize is the size of the N-value of the DCP LLC key.
* @param  KpubDcpEPtr iis a pointer to the E-value of the DCP LLC key.
* @param  KpubDcpESize is the size of the E-value of the DCP LLC key.
*
* @return
*         - XST_SUCCESS if the SRM block is valid.
*         - XST_FAILURE if the SRM block is invalid.
* @note   None.
*
******************************************************************************/
This function verifies a HDCP2 system renewability message (SRM) block.
This function verifies a HDCP2 system renewability message ( SRM ) block .
int XHdcp22Tx_VerifySRM(const u8* SrmPtr, int SrmSize,
	const u8* KpubDcpNPtr, int KpubDcpNSize,
	const u8* KpubDcpEPtr, int KpubDcpESize)
{
	Xil_AssertNonvoid(SrmPtr != NULL);
	Xil_AssertNonvoid(KpubDcpNPtr != NULL);
	Xil_AssertNonvoid(KpubDcpEPtr != NULL);
	Xil_AssertNonvoid(SrmSize > 0);
	Xil_AssertNonvoid(KpubDcpNSize > 0);
	Xil_AssertNonvoid(KpubDcpESize > 0);
	int Result = XST_SUCCESS;
	Result = XHdcp22Tx_RsaSignatureVerify (
				(u8 *)SrmPtr,
                    SrmSize - XHDCP22_TX_SRM_SIGNATURE_SIZE,
				SrmPtr + (SrmSize - XHDCP22_TX_SRM_SIGNATURE_SIZE),
				KpubDcpNPtr, KpubDcpNSize,
				KpubDcpEPtr, KpubDcpESize);
	return Result;
}
int XHdcp22Tx_VerifySRM ( const u8 * SrmPtr , int SrmSize , const u8 * KpubDcpNPtr , int KpubDcpNSize , const u8 * KpubDcpEPtr , int KpubDcpESize ) { Xil_AssertNonvoid ( SrmPtr != NULL ) ; Xil_AssertNonvoid ( KpubDcpNPtr != NULL ) ; Xil_AssertNonvoid ( KpubDcpEPtr != NULL ) ; Xil_AssertNonvoid ( SrmSize > 0 ) ; Xil_AssertNonvoid ( KpubDcpNSize > 0 ) ; Xil_AssertNonvoid ( KpubDcpESize > 0 ) ; int Result = XST_SUCCESS ; Result = XHdcp22Tx_RsaSignatureVerify ( ( u8 * ) SrmPtr , SrmSize - XHDCP22_TX_SRM_SIGNATURE_SIZE , SrmPtr + ( SrmSize - XHDCP22_TX_SRM_SIGNATURE_SIZE ) , KpubDcpNPtr , KpubDcpNSize , KpubDcpEPtr , KpubDcpESize ) ; return Result ; }
This function verifies a HDCP2 system renewability message (SRM) block.
This function verifies a HDCP2 system renewability message ( SRM ) block .
/* Verify arguments */