Aluminum will form a thin layer of aluminum oxide, which helps prevent corrosion. Anodizing is a process where the oxide layer is increased for a harder, more corrosion resistant finish. Anodizing can also be done using dyes, which color the oxide layer. On sailboats, most anodizing is either silver, gold, or black. Once the anodizing is worn off, there's probably not much you can do about it, unless you found a commercial anodizing shop that could accommodate the length of the mast, and could re-anodize it for you. That would mean, of course, that you'd have to strip off all the fittings, to get the bare mast extrusion. Personally, I think this would be cost and effort prohibitive.
The mast and boom on my Boston Whaler Harpoon 4.6 were made by Kenyon, and they were not anodized as such. They were painted, and I have heard it was some form of cross linked polyurethane. I had good luck prettying up the boom using VHT Epoxy Suspension Paint sourced from a local auto parts store. I did sand the existing coating before painting with the rattle can. The finish seems hard, and doesn't appear to rub off on the gelcoat of the cockpit, like the old, degenerating paint was doing. However, I also try to minimize rubbing where the previous owner did not.
If you decided to paint the spar, I don't know that you should sand off any of the intact anodizing. Zinc chromate used to be the preferred primer paint for etching etching aluminum prior to painting with a marine enamel. I think I would discuss with a rep from one of the main marine paint manufacturers such as Interlux or Pettit to see what they recommend. It may be that they recommend sanding the anodizing, and then priming and painting. I do know that aluminum large boat masts are painted with Awlgrip. I personally wouldn't go to the trouble and expense of painting a 17' boat's mast with Awlgrip. Of course, outboard motor and sterndrive units are aluminum, and they are painted, and you can buy paint from the manufacturers, much like auto touch up paint. I'd be fairly certain this paint is simply an enamel.
Sorry, no real advice here, except the zinc chromate under enamel. But certainly the paint companies would have info for you.