Pretty sure we had to do the "trusting trust" patch set as a homework assignment during my CS undergrad. It's not actually super complicated. Backdoor login.c when you see it, and backdoor GCC when you see it.
Sounds like someone took code from their homework assignment and added a few fun extra credit features to screw with their psychology professor.
I can imagine how it would be pretty confusing to stumble across if you hadn't read the paper though :-)