I will be honest here (and I love animals and have a dog myself) - a dog that growls and bites without obvious provocation is a danger and a liability issue.
No amount of training, no amount of time gone by without incident will ever reduce the liability or restore my faith in that animal.
If you have adopted this dog from a rescue, find out if your adoption contract contains any kind of return clause. Some rescues require that any animal they adopt out is returned to them if you are not able to keep it for any reason. You should still fully disclose what happened, but this would obviously be the best solution.
If that is not possible I would have him put down.
A dog that growls and bites is not adoptable by anyone else. Some people certainly choose to keep the animal and try to resolve issues with intense training and medication, but honestly I don't that that is a safe option if you have young children in the home. You would pretty much have to dedicate most of your time to rehabilitate an animal like that for the rest of that dog's life. That may be an option for some people, but it is not for most.
Do NOT rehome the dog privately. Not even if you fully disclose the issues. If this dog is rehomed, even if you were completely honest about what happened, and causes some serious injury to someone you may be held liable!
It sucks, but sometimes putting an animal down really is the only responsible solution.
Good luck.