This circuit is on Circuitverse: https://circuitverse.org/users/151941/projects/encrypted-signal
This is a register circuit using d flip flops
This circuit overall takes up to 3 button inputs corresponding to 3 bit binary numbers into storage, allows the user to encrypt them in a sense to their choosing, then send an encrypted signal while the end product is decrypted back to the original message of numbers. This is done with 3 d flip flop arrays to showcase each stage of the process. The first stage directly after the keypad stores the initial input for you to verify, then the next array takes this input and will toggle based on which inputs you have selected in the encryption array choice box. The third and final array is the final ouput, which is different than the signal it recieves as you can see the encryption array and output array do not match.
This circuit as mentioned includes a keypad with 0-7 number choices, as well as four buttons. These buttons are as follows, a global reset button, a button to send the stored inputs to the encryption array, a button to encrypt the stored signals to your desired pattern, and a final button to send this signal to the output array. This ensures the signal between the encryption array and output array is different than the intended message.
This input process works backwards, so for example to input a code of 317, you would enter 713, then follow the encrytion process, which is as follows:
Enter desired code backwards with the keypad and use button to send signals to encryption array
Use the 3x3 grid on near the top to "encrypt" this stored signal to your liking and press the encrypt button. This will encrypt the current signal, and prime the output array to recieve the signal properly by toggling the inverse of the message, so when the message is sent it toggles one more time to the proper message. This encryption is a toggle, so if you choose a 1 in this grid, it will toggle that signal while being sent to the output.
Finally press the send signal button and you will see the final output on leds at the bottom of the simulation. To restart, you simply hit the reset button at the top.
I chose to use T flip flops for the encryption and output array so I could simply use the clock signal to change their input, this was done through the use of the and gate with the button to send the signals and or'd with the encryption array outputs which were simply the inputs from the grid anded with the encrypt button to form an enable bit.
Equations to Encryption array CLK: (Send Button)(Input array outputs)+(Encryption Array inputs choices)(Encrypt button)
The output array used the same logic with the different send output button instead of the send to encryption array button.