I can't seem to put my fingers on it right now, but I recall a story by a photographer who took part in a workshop with Gary Winogrand, one of the greatest street photographers of all time.
Basically, if I recall, whenever a subject noticed Winogrand (which was hard not to have happen as he was not a small guy) he made a point of smiling at his subjects. The effect was disarming and he was obviously very successful in capturing the poetry of the street. Cartier Bresson took somewhat the opposite approach, sizing up the situation carefully, figuring out what he wanted to shoot then quickly moving the camera to has eye and getting the shot. He was small and tried to be as unobtrusive as possible.
Occasionally, we are all going to run into the goofball who takes it upon himself to lecture or harass you. If it's just an individual, just walk away, maybe with a "sorry, didn't mean any harm." If it's a police officer (and you are in the U.S., Canada or Europe) just tell them you are a hobbyist taking pictures. Be polite, but don't feel you have to surrender your ground or your equipment. You aren't doing anything wrong.
Streets are public places. There is no need to ask permission. There is no "right" to privacy in a public place. It gets a little dicier on private property. Most shopping malls, etc., won't let you photograph on their property. I've even seen security guards run off news teams from television stations. It's kind of a grey area, since they are inviting the public in and once you invite the public in, there is a case that can be made that the property is no longer private. Again, just apologize and move on.