Merge keys.ts with encryption functions into a `crypto` package. (A separate `keychain` package will contain logic for key derivation and etc.)