import public key fix
test if type is rsa
remove unsused variables