## Solution script ```python= import string cipher = "UFJKXQZQUNB" key = "SOLVECRYPTO" alphabet = string.ascii_uppercase uppercase_offset = ord('A') dicts = {} # Dictionary to store the dictionaries for k in key: key_loc = ord(k) - uppercase_offset dicts[k] = {} # Initialize an empty dictionary for k for i, a in enumerate(alphabet): dicts[k][alphabet[(i + key_loc) % 26]] = a plain="" for i,c in enumerate(cipher): plain+=dicts[key[i]][c] print("plain=",plain) ``` ### output ```shell ┌──(kali㉿kali)-[~/code] └─$ /bin/python /home/kali/code/easy1.py plain= CRYPTOISFUN ``` ## Easier way: online decoder https://www.boxentriq.com/code-breaking/one-time-pad ![](https://hackmd.io/_uploads/HkFghyAjh.png) ## ref - https://zh.wikipedia.org/zh-tw/%E4%B8%80%E6%AC%A1%E6%80%A7%E5%AF%86%E7%A2%BC%E6%9C%AC