tor-keymgr: Encode whether the key is public or private in the file extension.
There are 2 reasons to make this change:
- because having the word
private
in the extension will make it more difficult to accidentally misuse or misplace a private key (see !1618 (comment 2947461)) - because
Keystore
s will soon grow alist()
function returning all(ArtiPath, KeyType)
s in the keystore, and in order forArtiNativeKeystore
to implement this function, it will need to be able to reverse theKeyType -> file extension
mapping (if two differentKeyType
s are mapped to the same extension,ArtiNativeKeystore
s won't be able to reverse the mapping)