South Korea was seeking "the toughest retaliation measures" after the North tested a nuclear weapon, an official said.