Encryted public key, added function