This is the (hopefuly) comprehensive set of functions needed for the key management API. 

I'd specifically love comment on which functions should be public, which should be private, and what structs I could use to hold some of the parameters for a session state (eg. keyring_pass, priv_keyring, etc.)