Production of hydrogen by direct thermal decomposition of water with the aid of a semipermeable membrane