"There can be no doubt that the mysterious warrior was a Sith"
How they figured it out was unimportant to whoever wrote the script. The important thing is that Yoda and Mace had enough plot exposition to show that the ideas of the Jedi had changed and they knew the Sith had returned.