> Gerald has just learned about this program called Digital which allows him to create circuits. Gerald wants to send messages to his friend, also named Gerald, but doesn't want Gerald (a third one) to know what they are saying. Gerald, therefore, built this encryption circuit to prevent Gerald from reading his messages to Gerald.
> Author: MichaelK522
We're given two files: `circuit_1.dig` and  `encrypted.txt`. Eyeballing `encrypted.txt`, it looks like some 17 byte XOR. 
```00000000  42 36 41 34 36 45 45 39 31 33 42 33 33 45 31 39 20  |B6A46EE913B33E19 |00000011  42 43 41 36 37 42 44 35 31 30 42 34 33 36 33 32 20  |BCA67BD510B43632 |00000022  41 34 42 35 36 41 46 45 31 33 41 43 31 41 31 45 20  |A4B56AFE13AC1A1E |00000033  42 44 41 41 37 46 45 36 30 32 45 34 37 37 35 45 20  |BDAA7FE602E4775E |00000044  45 44 46 36 33 41 42 38 35 30 45 36 37 30 31 30     |EDF63AB850E67010|```
After looking at the circuit loaded in Digital, it becomes pretty obvious it's an eight byte XOR, with key `0xD4C70F8A67D5456D`. 
![](https://eb-h.github.io/assets/images/bcactf-2021/dec1_circuitry.png)
Here's the cyberchef Recipe:https://gchq.github.io/CyberChef/#recipe=From_Hex('Auto')XOR(%7B'option':'Hex','string':'D4C70F8A67D5456D'%7D,'Standard',false)To_Hexdump(17,false,false,false/disabled)
Flag: `bcactf{that_was_pretty_simple1239152735}`