If you want to feel safe out walking, you need a Jack Russell. Anyone who approaches me, while out walking, does so at their own peril. She's on a short lead but she's not very user friendly. She'll walk past people quite happily but I don't trust her an inch. In the house, with us, she's a happy, well adjusted, wonderful, affectionate, cuddly little princess. With strangers or out of the house, she will rip your arm off and beat you to death with the wet end. We love her very much.
I've worked with dogs for decades, the only time I have been bitten, when the dog meant business, was by a JRT. I've been nipped by quite a few dogs, over the years, but there is real intent when a Jack sinks their teething in to you.
Rescue GSDs are lovely dogs, if you know what you are doing. There is an awful lot of dog there if you have a nervy, sharp one. My Dad bred GSDs and, over the years, we've had loads of them. They are fine with small dogs too. It's sighthounds that are not so great with small dogs. There are a lot of scumbuckets out there who will mug you for your dog. Especially bigger ones.
Rather than getting a dog as a protective measure, have you considered a self defense course? Fun to do and teach you practical skills.