XilinxProcessorIPLib/drivers/hdcp22_rx_dp/src/xhdcp22_rx.c
static void *XHdcp22Rx_StateB3(XHdcp22_Rx *InstancePtr)
{
	/* Verify arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);

	/* Update state */
	InstancePtr->Info.AuthenticationStatus = XHDCP22_RX_AUTHENTICATION_BUSY;
	InstancePtr->Info.CurrentState = InstancePtr->Info.NextState;

	/* Check error condition */
	if(InstancePtr->Info.ErrorFlag & XHDCP22_RX_ERROR_FLAG_DDC_BURST)
	{
		XHdcp22Rx_ResetDdc(InstancePtr, FALSE, TRUE, TRUE, TRUE);
		XHdcp22Rx_ResetAfterError(InstancePtr);
		return (void *)XHdcp22Rx_StateB0;
	}

	/* Compute Ks */
	XHdcp22Rx_ProcessMessageSKESendEks(InstancePtr);

	/* Transition to next state is conditioned on operating mode */
	if(InstancePtr->Config.Mode == XHDCP22_RX_RECEIVER)
	{
		InstancePtr->Info.NextState = XHDCP22_RX_STATE_B4_AUTHENTICATED;
		return (void *)XHdcp22Rx_StateB4; /* Transition B3->B4, Receiver */
	}
	else
	{
		InstancePtr->Info.NextState = XHDCP22_RX_STATE_C4_WAIT_FOR_DOWNSTREAM;
		return (void *)XHdcp22Rx_StateC4; /* Transition B3->C4, Repeater */
	}
}
/*****************************************************************************/
/**
* This function implements the Receiver State B3 (ComputeKs). The
* receiver decrypts Edkey(Ks) to derive Ks. The cipher is updated
* with the session key and enabled within 200ms after the encrypted
* session key is received.
*
* @param    InstancePtr is a pointer to the XHdcp22_Rx core instance.
*
* @return   Pointer to the function that implements the next state.
*
* @note     When an unexpected or malformed message is received the
*           system is reset to the default state B0 to allow graceful
*           recovery from error.
******************************************************************************/
This function implements the Receiver State B3 (ComputeKs). The
receiver decrypts Edkey(Ks) to derive Ks. The cipher is updated
with the session key and enabled within 200ms after the encrypted
session key is received.
This function implements the Receiver State B3 ( ComputeKs ) . The receiver decrypts Edkey ( Ks ) to derive Ks . The cipher is updated with the session key and enabled within 200ms after the encrypted session key is received .
static void *XHdcp22Rx_StateB3(XHdcp22_Rx *InstancePtr)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	InstancePtr->Info.AuthenticationStatus = XHDCP22_RX_AUTHENTICATION_BUSY;
	InstancePtr->Info.CurrentState = InstancePtr->Info.NextState;
	if(InstancePtr->Info.ErrorFlag & XHDCP22_RX_ERROR_FLAG_DDC_BURST)
	{
		XHdcp22Rx_ResetDdc(InstancePtr, FALSE, TRUE, TRUE, TRUE);
		XHdcp22Rx_ResetAfterError(InstancePtr);
		return (void *)XHdcp22Rx_StateB0;
	}
	XHdcp22Rx_ProcessMessageSKESendEks(InstancePtr);
	if(InstancePtr->Config.Mode == XHDCP22_RX_RECEIVER)
	{
		InstancePtr->Info.NextState = XHDCP22_RX_STATE_B4_AUTHENTICATED;
		return (void *)XHdcp22Rx_StateB4; 
	}
	else
	{
		InstancePtr->Info.NextState = XHDCP22_RX_STATE_C4_WAIT_FOR_DOWNSTREAM;
		return (void *)XHdcp22Rx_StateC4; 
	}
}
static void * XHdcp22Rx_StateB3 ( XHdcp22_Rx * InstancePtr ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; InstancePtr -> Info . AuthenticationStatus = XHDCP22_RX_AUTHENTICATION_BUSY ; InstancePtr -> Info . CurrentState = InstancePtr -> Info . NextState ; if ( InstancePtr -> Info . ErrorFlag & XHDCP22_RX_ERROR_FLAG_DDC_BURST ) { XHdcp22Rx_ResetDdc ( InstancePtr , FALSE , TRUE , TRUE , TRUE ) ; XHdcp22Rx_ResetAfterError ( InstancePtr ) ; return ( void * ) XHdcp22Rx_StateB0 ; } XHdcp22Rx_ProcessMessageSKESendEks ( InstancePtr ) ; if ( InstancePtr -> Config . Mode == XHDCP22_RX_RECEIVER ) { InstancePtr -> Info . NextState = XHDCP22_RX_STATE_B4_AUTHENTICATED ; return ( void * ) XHdcp22Rx_StateB4 ; } else { InstancePtr -> Info . NextState = XHDCP22_RX_STATE_C4_WAIT_FOR_DOWNSTREAM ; return ( void * ) XHdcp22Rx_StateC4 ; } }
This function implements the Receiver State B3 (ComputeKs).
This function implements the Receiver State B3 ( ComputeKs ) .
/* Verify arguments */ /* Update state */ /* Check error condition */ /* Compute Ks */ /* Transition to next state is conditioned on operating mode */ /* Transition B3->B4, Receiver */ /* Transition B3->C4, Repeater */