Bio-inspired production of dihydrogen