May be export `DH_GENERATOR_2` and do this twiddling in javascript?