Accidentally, an article in this week's Economist addresses the first issue, i.e. software implementation. If software can be ensured to be functionally equivalent with differences in underlying code, that would potentially restrict mass-targeted attacks.