There are two main categories of keyless entry systems used in cars today. One is the active kind - a fob with a button. You press the button and the fob sends out a radio signal to the receiver in the car that is always listening. The second category is the passive systems. These are fobs that you simply carry around in your pocket - no need to press any buttons. The fob is actually a radio receiver and transmitter. The car is always sending out periodic queries and when the fob comes in range it receives the car's queries and responds appropriately to unlock the car.
The circuitry of the active fob is simpler to implement. It stays off all the time unless a button is pressed. So it is easier to power. It is much harder to manage the power on a passive fob. It needs to be sleeping most of the time and then periodically wake up and do a rough check of whether there is any radio activity that might be a query. Since the car cannot know when the fob might be listening, it must transmit its queries almost continuously. That is not too hard. But it is really hard to build a fob circuit that can run for a year on a tiny battery, considering that it needs to be waking up and powering up a radio receiver circuit every few seconds or so all the time.
As for the security required, just google "rolling codes" for the technology used by the active fob systems. The passive systems are actually easier for the encryption because the fob has both a transmitter and a receiver and can therefore use traditional challenge-and-response protocol based on a random challenge. As an example of a rolling code you could google "keyloq", a rolling code technology developed by Microchip.
One other method that is not too practical is a remotely-powered fob. In this method you get the fob close enough to a place on the car where inductive power is being transmitted. If this power is strong enough to power up the fob without a battery then you don't need to make the fob wake up on its own and listen every few seconds. The downside of this method is that it is darn hard to get inductive power to go any distance through the air - especially if that power is being supplied by a car battery 24/7. Just carrying the fob in your pocket would not be close enough. You would have to take it out and place it somewhere. You could use higher inductive power if that power were only switched on when you pressed a button on the car. But then you have to have a button on the car.