Envoyer par SMS: Optimal verification of the Bell state and Greenberger–Horne–Zeilinger states in untrusted quantum networks