Refactor PKs + encrypt/decrypt functionality for key transfers