Added PK encryption support