If it was wood siding, cold galvanized should have done the trick for hand nailing.
If it was some of the Hardie type sidings that are out there, you should have had hard chrome. These are found at your fastener supply house, not at HD or Lowe's. For weather exposure, NEVER scrimp on your nails. No generics; name brand only. Even those will not always turn out to be 100%.
I must say though that I have had good luck with the Bostich electro galvanized on all my installs, but you didn't say what you were using to nail, gun or hand, or what type of siding.
I use a product on my Hardie called Big Stretch which is a latex elastomeric sealer that doesn't allow moisture bleed through to seal joints, trim nails, and an errant nail or two in the field. No problems in many years.
If you put up Hardie or similar and you have more than a couple nails showing... you are probably screwed if they have started to rust.
Try sealing yoru rusted nails with a butyl based caulk (not latex) and prime/paint again.
Robert.