-
Notifications
You must be signed in to change notification settings - Fork 298
Keyring
The current End-to-End Keyring implementation was created at a time when we expected to only have a static key management model. As the project has evolved we've found that design is hard to modify and extend.
To solve this problem, as well as facilitate the integration with the keyserver and other key distribution strategies, this design proposal aims to refactor it so we can more easily accept external contributions and integrations, as well as facilitate the use of the library by third parties.
This will be done by splitting the keyring functionality into public and secret key services, and have different providers for each. Adding a new provider will be relatively straightforward and the Context will be able to expose some of this APIs through its import/export APIs.
The public key services are those that provide storage and discovery of keys (both locally and remotely). For starters we expect to have two (manual key import, and transparency key server), but other clients might need other services.
- Manually Imported / Verified Keys
- Transparency Backend Key Server / Client
- Alternate Systems
-
SearchKey(opt_emailAddress, opt_arguments)
-
Request:
- email address (optional)
- if no email provided, return all keys owned by user
- arguments (optional)
- auth credentials
- email address (optional)
-
Response:
- public key
-
Request:
-
UpdateKey(emailAddress, opt_publicKey, opt_arguments)
-
Request:
- email address
- public key (optional)
- empty = delete
- arguments (optional - for key servers)
- auth credentials
- self-revocation signature
-
Response:
- registered public key
-
Request:
The secret key services are those that provide key generation, storage, and signing and decryption services. All secret key transfer strategies are implemented within this API. The APIs exposed here act on a cryptographic primitive format (eg, RSA PKCS EME 1.5) and for starters will include secret keys managed by end-to-end as well as WebCrypto, Hardware and in the future potentially other secret key managers.
- E2E-managed keys
- 4880 File Import
- Secret Paper Import
- Key Server Rotation
- uKey Key Syncer
- WebCrypto
- Hardware
- External Key Manager (GnuPG bridge, other hardware, network oracle etc..)
-
GetStatus()
-
Response:
- status
- encrypted
- has passphrase
-
Response:
-
GenerateKey(emailAddress, type, opt_arguments)
-
Request:
- email address
- type (sign, or encrypt)
- arguments (optional)
-
Response:
- public key
- secret key handle
-
Request:
-
GetKeyImportOptions(opt_emailAddress)
-
Request:
- email address (optional)
-
Response:
- key import options
-
Request:
-
ImportKey(keyImportOption)
-
Request:
- key import option
-
Response:
- list of secret key handles
- list of public keys
-
Request:
-
GetKeyExportOptions(opt_secretKeyHandle)
-
Request:
- secret key handle (optional)
-
Response:
- key export options
-
Request:
-
ExportKey(keyExportOption)
-
Request:
- key export option
-
Request:
-
DeleteKey(secretKeyHandle)
-
Request:
- secret key handle
-
Request:
-
Sign(secretKeyHandle, dataToSign)
-
Request:
- secret key handle
- data to sign
-
Response:
- signature
-
Request:
-
Decrypt(secretKeyHandle, dataToDecrypt)
-
Request:
- secret key handle
- data to decrypt
-
Response:
- decrypted data
-
Request: