The block cipher $\displaystyle \left(\mathcal{P},\mathcal{C},\mathcal{K},\mathcal {E},\mathcal{D}\right)$ is defined as follows. The alphabet is {0,1}, block length is 3 and the key space $\displaystyle \mathcal{K}$ is $\displaystyle \mathbb{Z}_8$. Given a key $\displaystyle n\in\mathbb{Z}_8$ and a plaintext $\displaystyle p$, let $\displaystyle p'$ be $\displaystyle p$ written as a decimal number. We define $\displaystyle E_n(p)$ to be $\displaystyle p'+nmod8$ written as a 3-digit binary number (possibly with initial zeros), and we define $\displaystyle D_n(p)$ in exactly the same way. The functions $\displaystyle E_n$ and $\displaystyle D_n$ are the encryption and decryption functions respectively of the cryptosystem.

(a) Find $\displaystyle E_5(110),E_2(001),E_0(101).$

(b) Given an excryption key $\displaystyle n$, find a corresponding decryption key

Any help would be greatly appreciated, thanks=)