Add possibility to import/export RSA/DSA keys in multiple formats

Yes I know, this will break backwards compatibility with the current state of the develop branch, but it will bring back backwards compatibility to v1.17

Any comments?