Automated instantiation of side-channel attacks countermeasures for software cipher implementations