Signify Protocol #34
Replies: 5 comments 3 replies
-
We need to allow each Agent Worker to have its own user account so their database storage is owned by a unique user to that account. |
Beta Was this translation helpful? Give feedback.
-
Suggested terminology change, "Controller AID" should be renamed to "Client AID". |
Beta Was this translation helpful? Give feedback.
-
Must fully document how to share Salts amongst AIDs and the trade off when rotating a single Salt for many AIDs. |
Beta Was this translation helpful? Give feedback.
-
Add description of Hybrid Randy/Salty Key Generation Algorithm or Handy for short. Where each pair of siging and rotation key is generated from the same salt but the next pair is generated from a new salt. So almost Randy but not quite. |
Beta Was this translation helpful? Give feedback.
-
In addition to headers definition, the body structure (for request and response) should be described. Example of body:
|
Beta Was this translation helpful? Give feedback.
-
Signify/KERIA Request Authentication Protocol (SKRAP)
KERIA Service Endpoint Interfaces
The KERIA service will expose 3 separate HTTP endpoints on 3 separate network interfaces.
This separation allows for the Boot interface to be expose to internal infrastructure only (or disabled all together) while exposing the other two interfaces externally. If a KERIA instance is launched in static worker mode, meaning all agent workers are configured at start up only the Boot interface can be disabled completely.
Agent Worker Initialization
To initiate a connection between a Signify Client and a KERIA agent, the two sides will exchange KERI AIDs with the Signify Client AID (called the "Client AID") being the delegator for the KERIA agent worker AID (called the "Agent AID"). To establish the connection the following steps are performed:
Step One: Generate Client AID
The Signify Client generates the client AID as a transferable AID with a single signing key and single rotation key and provides the signed inception event out-of-bands to the KERIA service through the Boot interface. The HTTP request must be signed by the client AID using Signify Request Authentication described below. The algorithm for generating the signing and rotation key pairs for Client AID is as follows:
signify:controller00
andsignify:controller01
for the signing key and rotation key respectively.The follow is an example of a Client AID generated by the SignifyPy (Python implementation) Signify Client with a passcode of
0123456789abcdefghijk
Step Two: Agent Worker Creation
The KERIA service will create an Agent Worker on behalf of the new client and create the delegated, transferable Agent AID
with a single signing key and single rotation key specifying the Client AID as its delegator in its inception event.
The KERIA service will return the Agent AID inception event in a signed HTTP response, signed by the Agent AID. Agent AID keys
can be generated using a salt or truly random depending on the requirements of the service hosting the KERIA service.
Step Three: Signify Client Delegation Approval
Note that all HTTP requests against the Admin Interface must be signed by the Client AID and expect all responses to be signed by the Agent AID.
The Signify Client will approve the delegation of the client AID with an interaction event that it sends back to the KERIA service over the Admin interface.
Once these steps are complete the Signify Client can begin using the rest of the Admin interface to create AIDs, issue credentials, etc.
Reconnecting to Existing Agent Worker
Document the steps for retrieving state from the Admin interface and updating.
Key Generate Methods
The KERIA service supports the following key generation methods where the Signify Client generates the keys and only ever sends encrypted key material (if any) to the server.
For all key generation methods, the Signify Client creates and signs all KERI events, credentials, etc. ensuring that unencrypted private key material never leaves the client. The key generate methods are descrive in more detail in the following sections.
Salty Keys
The Salty Key algorithm is used to create a hierarchical deterministic key chain for each AID by generating a unique random salt for each AID and stretching the salt using Argon2 with a
path
that is calculated from the AIDs index relative to all other AIDs and the key index calculated by the total number of signing and rotation keys over the lifetime of the AID.The salt for each AID is encrypted with the X25519 encryption key generated from the passcode and stored on the server with other AID metadata, including the AID index and current key index.
The Signify Client API must accept the AID salt as an optional parameter to creating Salty Key AIDs allowing users to manage AID salts externally or to share Salts across AIDs if required.
The following Python data class represents the metadata storage for Salty Key AIDs:
Salty Key Salt Rotations
Document the procedure for rotating a new Salt in for a Salty Key AID.
Randy Keys
The Randy Key algorithm allows for all signing and rotation private keys to be generated solely from entropy and encrypted with the X25519 encryption key generated from the passcode and stored on the server alongside other AID metadata.
The server stores the encrypted private key material for signing and rotation keys in separate LMBD sub-databases as indexed qualified base 64 CESR encoded Cipher representations.
Group Keys
The Group Key algorithm is a special key generation algorith for distributed group multisig AIDs that does not manage and keys at all. Instead this algoritm allows for the specification of an AID of one of the other three types to be the "local" participant in a distributed group multisig AID.
All signing operations must be performed on the Signify Client on behalf of the "local" AID for this Signify Client indexed based on the local AID's location in both the signing key list and the rotation key list.
HSM Keys (Experimental)
The SignifyPy Signify Client defines an experimental interface for declaring external modules that can be used as Signify HSM Integration Modules to allow all key generation and event signing to occur in an external Hardware Security Module (HSM).
Two sample implementations have been defined to date, one using the Google KSM and one using a Trezure One external HSM.
The following psuedo Python class represents the current, experimental interface a SHIM has to implememnt to work with SignifyPy. It is anticipated that each Signify Client implementation defines a similar interface.
Passcode Rotation
To perform a passcode rotation, the Signify Client requires both old and new passcodes and must perform the following steps:
/agent/<Client AID>
Partial Client AID Rotaion in Support of Passcode Rotation
To provide post-quantum secure passcode recovery, a passcode recovery must be accompanied by partial rotation of the Client AID. This partial rotation is possible because the user will have to provide both old and new passcodes to initiate the process.
The partial rotation of the Client AID is accomplished by using the old passcode to regenerate the the prior rotation key pair called
R0
from the latest establishment event. In addition, two new key pairs are generated from the new passocde, one used for signing authority (S0) and one used for rotation authority (R1) in the new rotation event.The public key for
S0
is used as the first signing key in the new rotation event; it is giving a fractionally weighted threshold of "1". The public key forR0
is used as the second signing key in the new rotation event; it is giving a fractionally weighted threshold of "0". A Blake3 has is created of the public key forR1
and is used as the next rotation key commitment.The rotation event is signed with the private keys of both
S0
andR0
. An example of a partial rotation event of the Client AID from above follows with its signatures:With the following attached signatures:
The first signature satisfies the current signing threshold and has only one index, 0 for signing key index. The second signature satifies the prior rotation threshold and thus uses dual index code to specify a current signing index of 1 and a prior signing index of 0.
The following steps are followed to accept the passcode rotation:
Passcode Rotation Recovery
When each Agent Worker is loaded it will check for a saved old passcode to detect an aborted passcode rotation. If a saved encrypted old passcode is found the Agent Worker will
notify the client in the response to the state call that a passcode rotation recovery is needed and lock out all other operations until it is completed successfully.
To perform a passcode rotation recovery, the Signify Client requires only the new passcode and must perform the following steps:
/agent/<Client AID>
Signify Request/Response Authentication
Signify clients must sign all requests to the KERIA Admin Interface using the latest signing key of the Client AID and must expect all responses from the KERIA service be signed by the latest signing key of the Agent AID. Both request and response signing rely on the same set of HTTP headers to accomplish request/response signing.
Metadata Headers
Document
Signify-Resource
andSignify-Timestamp
headers here.Signature Input Header
Document the
Signagture-Input
header here with link to https://httpwg.org/http-extensions/draft-ietf-httpbis-message-signatures.htmlSignature Header
Docuemnt the signing method and
Signature
header.Beta Was this translation helpful? Give feedback.
All reactions