FaviDiD is a Brand New way to Decentralized Identify you. using some cryptography Math you can identify yourself using a Private Key to sign your Requests and a Public Key for the service to verify it is from you.
to use FaviDiD you can use This Specification to insure interoperability. If you do not Like where this is going please fork.
this document written on is Semantic version 0.2.0. this document is self-published independently.
i am still Figuring things out. this is not final design and might be vague, impossible, or otherwise not implementable. im still seeking to bring this closer to my vision.
use the Ed25519 and create a Private-Key and a Public-Key, store them securely.
To create a Decentralized id, MUST follow these steps
did:favidid:.
ed25519:.
This produces a standard did:key identifier using the exact same raw 32-byte Ed25519 public key. It
is fully equivalent for signing and encryption purposes in this suite.
0xed (multicodec prefix for Ed25519 public
key).
z (multibase prefix for base58-btc).
did:key:.authentication happens as follows in order.
/Favicond_/favidid/auth to the Planet. with F-FaviDiD: set
to the user's FaviDiD. if the Edge possesses a non-expired PlanetaryCode for this Planet, the Edge SHOULD
send Authorization: PlanetaryCode <PlanetaryCode>
Authorization corrosponding to a valid user in the Planet's data, the Planet MUST respond
with 401 and
WWW-Authenticate with a FaviDiD challenge. FaviDiD challenge is
described below. a Planet MAY add other FaviDiD Challenges but FaviDiD0-2 MUST be present for this specification.
/Favicond_/favidid/auth with one of the following
in the Authorization Header (concatenated),
{"typ":"JWT","alg":"EdDSA","proto":"FaviDiD-Auth"}
and then a dot (which is eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsInByb3RvIjoiRmF2aURpRC1BdXRoIn0.) which is the JWT Header.
planets MUST respond with Status Code 200
Content-Type: application/json and a Body with At Least the following Keys.
{
"proto": "FaviDiD-Auth",
"success": true,
"nonce": "<Nonce>",
"PlanetaryCode": "<PlanetaryCode>",
"PlanetaryCode-ExpiresAt": "<PlanetaryCode-ExpiresAt>"
}
<Nonce> MUST be replaced with the actual Nonce used for verification above,
exactly.
<PlanetaryCode> MUST be replaced with a session token. the Planetary Code MAY be
kept for as long as the session is valid and hasnt expired yet.
<PlanetaryCode-ExpiresAt> MUST be set to when <PlanetaryCode>
expires, in the form of HTTP DATE. when it expires is Planet-Defined.
IncorrectNonce)
InvalidSignature)
InvalidEdPublicKey)
InvalidSyntax)
UnsupportedSignature)
UnsupportedEdPublicKey)
UnsupportedSyntax)
planets MUST respond with Status Code 401
Content-Type: application/json
{
"proto": "FaviDiD-Auth",
"success": false,
"errorCode": "<errorCode>"
}
The HTTP Retry-After Header SHOULD be set (MUST be either an integer number of seconds (e.g.
300) or an HTTP-date string (RFC 7231).) Indicating how long an Edge SHOULD wait before retrying.
if the value signals a date after 1 hour compared to the HTTP Date Header the Edge MUST
abort automatic Retries, and SHOULD honor the Request, only retrying at User Request. if not
set Edges SHOULD interpret Retry-After: 15
<Nonce> MUST be replaced with the Planet Generated Nonce used for
verification above, exactly.
<errorCode> SHOULD be replaced with the Failure Code described above, if not
wanted MUST be GenericError.
Content-Type is not application/json
a FaviDiD WWW-Authenticate Challenge or FaviDiD challenge is a string as Follows
FaviDiD.
FaviDiD.
Realm param.
Nonce param.
Valid ones include
FaviDiD0-2 Realm="My Realm" Nonce="TVpeqriJkhm5mKv1dKCA9BD"
FaviDiD0-72 Realm="My Other Realm" Nonce="Gak9QsoHZnYKH63C5PruBvs"
FaviDiD35 Realm="antRequest.nl" Nonce="2NjJfsBRa6QENCAmVSjYTs6X"
FaviDiD1 Nonce="2VMcxu85YRjj1MhyvJqMjo5X" Realm="index.php"
invalid ones include
FaviDiD0-2 Nonce="dtwkrVFNG8V9y9s3qbnE3jk" (omits Realm)
FaviDiD0-2 Realm="My Other Realm" (omits Nonce)
FaviDiD1.3 Nonce="92Vkf8RwzWyuxx5dSHadH8Q" Realm="index.php" (uses dot instead of minus)
FaviDiD.3 Nonce="ysbpKm6VL6guSmdE86EVv9S" Realm="index.php" (no major version)
the Payload MUST or MUST NOT have the following claims.
| Claim Name | Claim Value |
|---|---|
exp
| SHOULD be set 300 integers higher than iat.
|
iat
| MUST be set to the current time utc since the epoch of .
|
aud
| MUST be set to the Planet's Domain (it is assumed to be HTTPS as Edges and Planets MUST NOT use plain HTTP. |
iss
| MUST be set to your did (FaviDiD). |
sub
| MUST be set to your did (FaviDiD). |
nbf
| SHOULD be set 50 integers lower than iat.
|
jti
| MUST be set to an uuid (is ignored in this specification, Planets MAY use this in a Planet-Defined way). |
nonce
| MUST be set to the Nonce given by the Planet. |
FaviDiD Overview: FaviDiD uses two resolution paths — a restricted
profile of did:key (Ed25519-only) and a new lightweight method
did:favidid:ed25519:... optimized for raw key operations.
The Did Resolution (Full) Algorithm only applies to Decentralized id (W3C did:key way) DiDs. for Decentralized id (FaviDiD way) DiDs use Did Resolution (Basic)
To resolve a did:key (did-key), Decode did-key using https://w3c-ccg.github.io/did-key-spec/
and Store the result in did-doc. check conformance with the following RuleSet
0xed).
If everything succeeds Return the raw bytes of the Public Key.
If everything succeeds, an Implementation MAY choose to return the DID Document produced by the spec's algorithm.
The Did Resolution (Basic) Algorithm only applies to Decentralized id (FaviDiD way) DiDs. for Decentralized id (W3C did:key way) DiDs use Did Resolution (Full)
To resolve a did:favidid (did-favidid), SHOULD follow these steps
/^did:favidid:ed25519:(.+)$/
null.
null.
null.