Encapsulate keyrings as defrecord types.