# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/mowhamadrexa/EECS3481Assignments/blob/main/Q12_3.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + [markdown] id="Lx37tqJNNoIj"
# For only one block, by definition, we have: $T = E(K, X)$, where $K$ is the key and $X$ is the message.<br>
# For a two-block message, the first block is $X$, and the second one, $X_{2}$, is $X \oplus T$. The MAC would be:<br>
# $E(K, X_2)=E(K,T\oplus(X\oplus T))=E(K, X)=T$

StarcoderdataJupyterScriptsDedupFiltered