Samantha

Parameters known by Samantha:

Chooses the key \( K \).

Computes the MAC \( HMAC_{S} \) for the message \( m \):

Step y/x

Enter the message (or integer) that Samantha wants to sign:

Press Enter to generate the parameters. Use the Left and Right arrow keys to navigate between steps.

Samantha chooses a 512-bit hexadecimal key \( K \) for the hash function \( \mathcal{H} \).

She then sends the key \( K \) to Victor through a secure channel.

Samantha uses the key \( K \), along with the 512-bit fixed hexadecimal strings \( opad = 36 \dots 36 \) and \( ipad = 5C \dots 5C \), to compute the MAC \( HMAC_{S} \) of the message \( m \), where \( \mathcal{H} \) is the SHA-1 hash function.

She then sends both the MAC \( HMAC_{S} \) and the message \( m \) to Victor.

Like Samantha, Victor uses the key, the fixed hexadecimal strings \( opad = 36 \dots 36 \) and \( ipad = 5C \dots 5C \), and the SHA-1 hash function \( \mathcal{H} \) to compute the MAC \( HMAC_{V} \) of the message \( m \).

Victor verifies the MAC of the message \( m \).

If the two MACs are equal, he knows that the message was written and signed by Samantha, i.e., nobody has tampered with the message.

Victor

Parameters known by Victor:

Receives the key \( K \).

Receives the message \( m \) and the MAC \( HMAC_{S} \).

Computes the MAC \( HMAC_{V} \) for the message \( m \):

Verifies the MAC for the message: