I know for sure that repressions in the USSR at thirties had been en masse illegal in the sense that the laws existed at that period of time there's no word about, say, executing people without any judgement - and there have been thousands of such executions.
Today I've realized that I don't know almost nothing about the legal grounds of mass killings of jews, gypsies, homosexuals and other oppressed social groups.
There's an article on Nuremberg Laws in wikipedia. As far as I understand, jews were deprived of citizenship and there were described some actions prohibited for non-citizens - for example, one can not "display the Reich and national flag or the national colors". Breaches of these rules were punished by imprisonment.
But what for the things that had actually happened? Did there existed laws on, say, sending children to concentration camps? Had the procedure of mass execution formulated, stated or regulated by any legislative act? If such acts existed, had the Parliament voted for them?