How does Identification Friend or Foe (IFF) work? Are radar images of friendly planes recorded, or do friendly planes have transponders on them?
IFF systems use a transponder/interrogator combination to allow aircraft to issue challenges, receive responses, and do the friend or foe test. BAE Systems has a transponder product page with a little info, and Wikipedia (yeah yeah) has a reasonably thorough description and history of IFF.
According to NATO STANAG 4579 (abstract):
This NATO BRID is a millimetric wave question and answer system working in the Ka band. It comprises two main components, an interrogator, which allows a platform to question another platform with an encrypted message, and a transponder, which decodes the message and replies with an encrypted answer [emphasis mine]. Transponders will be fitted to all designated platforms, while interrogators will be fitted to only those designated platforms with an offensive or reconnaissance capability.