I think you mean to ask if they were
encrypted. Encoding means to represent abstract data using the underlying tokens of whatever transport or recording mechanism is available. For example, the Roman alphabet's upper-case letter 'A' is
encoded under the ASCII convention as the binary value 0x41 (expressed in hexadecimal notation). Other computer encodings exist for alphabetic letters, such as Unicode and EBCDIC.
Apollo telemetry was encoded in the sense that measurements were recorded in the Apollo computer's native numerical format (15-bit 1's-complement integers) or software-defined compositions such as double-precision vectors. Then those digitally-encoded values were rendered in a data structure ("telemetry frame") which was then further encoded for radio transmission via pulse-code modulation (PCM). That encodes the bit values onto the S-band radio frequency, although that particular kind of encoding is called
modulation -- the shaping of a radio waveform to express information.
Ditto in reverse for the command uplink. The data transfer rate was typically 2400 bits per second.
Modulation is necessary to any electronic method of communication. Encoding is necessary to any method of digital communication or storage.
In contrast, encryption is a transformation on data designed to hide the information from unauthorized examination. All encryption is encoding, but not all encoding is encryption.
Encryption is optional. But if you don't understand the encoding scheme then it's as good as encrypted. I can invent a new scheme for mapping letters to binary values in a computer, and if no one else understands or uses my method, then text stored by that method digitally in a computer is effectively also encrypted. (Substitution ciphers work that way.)
Apollo telemetry downlinks and command uplinks were not encrypted. The modulation (PCM) was an international standard, so demodulating the S-band signal to a digital bit stream was straightforward. Interpreting the bit stream as its logical telemetry values takes a bit more effort. The number of ways instrument measurement values can be structured and serialized as a bit stream is functionally infinite, so some foreknowledge of what those bits meant would have been needed.
No. Protection from eavesdropping was not a high priority goal compared to simplicity and reliability of communications. The Soviets seem to have felt the same way since at the time they did not encrypt their digital communications. In fact, some of their early space probes sent back photographs encoded as telefacsimile images, easily interpreted by third parties.
Yes, in theory.
The uplink method was simple and elegant. You may be familiar with the DSKY panel in the spacecraft which controlled the computer. It had a numerical keypad and a few functional keys. The syntax for a command would be to press the VERB button, enter the number of a predefined verb (e.g., 15 for "show on the display") the NOUN button followed by a noun number (e.g., 68 on the lunar for "descent rate information") and ENTER. Each physical key on the DSKY was represented in the command parser program (named PINBALL) by a number. A string of those numbers constituted a command to the computer to do something, such as stop or start a program, show information, or operate the spacecraft's navigation and propulsion systems.
Commands uplinked from the ground were simply expressed in the same format, as the codes for DSKY keys. It's as if the ground controllers had their own virtual keypad and the key codes were sent up on the uplink channel where they would go into PINBALL exactly as if they had been entered on the spacecraft control panel. PINBALL would then interpret and dispatch those commands without regard to where they came from.
The command and lunar modules used the same computer hardware and much of the same computer software. The noun-verb command syntax was the same, but each spacecraft used different verbs and nouns. The keypads were shaped differently, but had the same function.
A nefarious Soviet agent with access to an S-band transmitter, comparable digital encoding methods, and a big antenna could send to the lunar module the codes for the key sequence
VERB 40 NOUN 22 ENTER
which would reset the inertial references and cause the spacecraft to lose its orientation. Or a well-timed
VERB 34 ENTER 64 ENTER
would stop the program controlling the LM's descent. (However, for some critical programs such as P63, a watchdog restarts it.) Or if you wanted to be really frakkin' devious:
VERB 21 NOUN 02 ENTER 00413 ENTER +00001 ENTER
This insidious bit of mischief tells the lunar module that it has landed (it honestly has no other way of knowing), thereby inhibiting engine firings, RCS activities, etc. Not something you want to do in flight. Basically certain functions of the lunar module would just go dead and the astronauts probably wouldn't be able to figure out why in time. But on the post-landing audio when you hear Buzz Aldrin say, "Four-thirteen is in," he's confirming to Armstrong that he has "safed" the spacecraft after a successful landing. That's when you're supposed to use that command.
But here's the safety pin. The pilots had to
agree to allow ground control via this method. They have to reach over to the communications control panel and switch the UPLINK TELEMETRY mode switch to ACCEPT. Unless the switch is in that position, the computer will not accept keystroke codes from the ground. And typically the switch was not in that position.
When was that ever used?
Well, on Apollo 14 they discovered that the computer believed the ABORT button was being pressed. The button, among other things, set a bit in the computer memory that several computer programs consulted to determine what they should do. The pilots determined that the switch itself was faulty -- by setting the computer to display the contents of that memory location and tapping the control panel until the bit cleared to zero. Likely a blob of solder was trapped in the switch body and was floating about inside making intermittent contact.
So to keep that faulty switch from spuriously signaling an abort, Don Eyles (the software guru at MIT who basically programmed the whole lunar module) figured out within a couple of hours how to patch the software to ignore the button unless the pilots also took additional action. Then, before the spacecraft went behind the Moon and lost radio contact, uploaded the new program by means of keystroke commands that "poked" the new machine instructions into an unused piece of erasable memory and told the computer to use that instead. To do that, Ed Mitchell in the LM had to flip the switch to let Eyles do that from the ground. Otherwise the communications decoders on the LM would have been prevented from loading those keystroke codes into PINBALL's input buffer.
The rest is history.
So while it was theoretically possible to sabotage the Apollo spacecraft, it was impractical and politically inadvisable. Space law at the time was basically maritime law. The Apollo spacecraft were officially US-flagged vessels operating on the "high seas." As sovereign vessels on the high seas, sabotaging them would effectively be, under international law, an act either of piracy or of war. The desire of the Soviet Union to do that would be commensurate to their desire to attack a U.S. Navy warship.
The current incarnation of the MSFN and Deep Space networks allow for encryption.