GREAT QUESTION!
Absolutely completely and entirely, dogs to recognize one another by scent and they will file the scent away and remember it. That is why dogs do the butt sniff first (to determine if this is friend or foe) butts don't have teeth
And then they will sniff breath which is the life force.