Proving a secret is known without revealing it
What you want is the https://en.wikipedia.org/wiki/Socialist_millionaires 
Problem. 
This problem is orignally phrased as two people want to verify if they have the same amount of money without revealing anything more. 
Alice has a value $A$ and Bob has value $B$ and they want to verify $A =? B$
without either side revealing anything more than the result of the check. 
See the wiki page for algorithm description.