Made some methods public in BasicKeyChain and clean deterministic key generation.