The "rolling code" is used as PART of the encryption algorithm to validate the keyfob. The base and the fob both keep track of the "rolling code" and increment it with each keypress. It's also used to resync the base with the keyfob just in case you have kids who like to press buttons when you're out of base station range. (this is how car locking and garage doors, and maybe many other systems work)
The base station still has to have stored the keyfob unique ID and the shared secret key. That all gets dumped into the encryption algorithm.