applying encryption of the keys