Illegal? No. Rude? That depends
One time I offered to photograph an acquaintance's dog. She said it would be OK only if the images were never posted on the Web. Since I couldn't make such a promise, I kept my camera in the bag.
Maybe she thought dog-nappers might see her pet online and target it. Good trick, considering that I wouldn't be including the owner's name and address.
Recently I was at a public event. I took a few shots of the crowd. One attendee waved her hand in my direction. Waving at me or waving me off?
Later I had an opportunity to ask her about the gesture. She said she was indicating she didn't want her photo taken and put online, that such an action was illegal.
I explained no, it was legal. No different than a newspaper reporter or photojournalist taking her image and then publishing it afterwards. Public event.
She frowned. She said it was rude. I replied that I was taking a shot of the crowd, not just her. I should've added that rudeness is in the beholder's eye. Also, I wasn't using a flash so no one could complained about that.
It's amazing how people sometimes react to my camera. If someone is concerned about being imaged in public, I would advise them to look up when walking around downtown and many other places.
Maybe I'm not the problem. At least with me you can see the person behind the camera. You can even see me wave back.