The sender computes a toy keyed checksum tag over key plus message.

highlighted = computed this step

Sender computes a toy tag

The toy tag is the one's-complement checksum over key followed by message.

tag=0xd622\text{tag}=0xd622
Compute toy tagThe tag is the one's-complement checksum over key bytes followed by message bytes.Key plus message compute - computerowindexvalueword00x0f0eword10x7061word20x793dword30x3130raw sum0x000129dcfolded0x29ddresult0xd622

Fold then complement

The folded sum is 0x29dd, so the complement tag is 0xd622.

tag=0xd622\text{tag}=0xd622
Compute toy tagThe tag is the one's-complement checksum over key bytes followed by message bytes.Key plus message compute - computerowindexvalueword00x0f0eword10x7061word20x793dword30x3130raw sum0x000129dcfolded0x29ddresult0xd622

Attach the tag

The sender sends the message with tag 0xd622.

sent tag=0xd622\text{sent tag}=0xd622
Compute toy tagThe tag is the one's-complement checksum over key bytes followed by message bytes.Key plus message compute - computerowindexvalueword00x0f0eword10x7061word20x793dword30x3130raw sum0x000129dcfolded0x29ddresult0xd622

Summary

The tag is a deterministic check value made from key plus message.

toy tag=0xd622\text{toy tag}=0xd622
Compute toy tagThe tag is the one's-complement checksum over key bytes followed by message bytes.Key plus message compute - computerowindexvalueword00x0f0eword10x7061word20x793dword30x3130raw sum0x000129dcfolded0x29ddresult0xd622