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.
danger! Deprecated! as of . reason: vague and underspecific.
this document written on is Semantic version 0.1.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.
<ul> of links.
/Favicond_/
All interactions MUST follow these global rules. If these rules are violated, the Implementation MUST abort the interaction and MAY notify the user (if any).
Applications MUST NOT connect to plain HTTP, Applications SHOULD try to change HTTP to HTTPS.
when a 404 or 500 is encountered Edges MUST read the Content-Type Header, if it states text/html the Edge SHOULD ignore the body
and state the feature isnt supported to the user.
Signature Verification MUST be done using the bytes As-Is (As Received), no Normalization, Canonicalization, Encoding change, or altering is allowed.
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:.As A Planet you need to have some endpoints open for standardized connection. This Specification does not make any REQUIREments about how you store your data, just that the data is delivered in these Formats.
When an Edge wants to sign up for your planet. you (reference to Your Planet) MUST
/Favicond_/favidid/auth, abort these steps for any other
Request Path with 400.
when those steps finish planets MUST return the following.
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>"
}
Session Information and How the User Keeps their login is Planet-Defined. FaviDiD only replaces Passwords, it does not dictate anything else.
<Nonce> MUST be replaced with the actual Nonce used for verification above,
exactly.
IncorrectNonce)
InvalidSignature)
planets MUST respond with Status Code 401
Content-Type: application/json
{
"proto": "FaviDiD-Auth",
"success": false,
"errorCode": "<errorCode>",
"nonce": "<Nonce>"
}
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 interpret Retry-After: 15
<Nonce> MUST be replaced with the Planet Generated Nonce used for verification above,
exactly.
<errorCode> MUST be replaced with the Failure Code described above.
Content-Type is not application/json
The Request Path MUST be /Favicond_/favidid/auth
As An Edge you need to accept the Planet Nonces and sign them with that Private-Key of the user.
When You Receive a Planet Nonce from The User. you MUST create a JWT (compact JWS, 3 base64url parts) with the header being (indentation whitespace is Edge-Defined)
{
"typ": "JWT",
"alg": "EdDSA",
"proto": "FaviDiD-Auth"
}
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. |
the Edge MUST HTTP POST /Favicond_/favidid/auth with the Authorization, scheme MUST be FaviDiD value MUST be the JWT as described above.
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.
Here i describe the intended Authentication flow.
Q0juNoxYOIGJwYzRTtWdWaA ){"iss":"/*my FaviDiD*/","sub":"/*my FaviDiD*/","aud":"antrequest.nl","iat":1776006426,"nbf":1776006376,"exp":1776006726,"nonce":"Q0juNoxYOIGJwYzRTtWdWaA"}
and converts it into base64url form eyJpc3MiOiIvKm15IEZhdmlEaUQqLyIsInN1YiI6Ii8qbXkgRmF2aURpRCovIiwiYXVkIjoiYW50cmVxdWVzdC5ubCIsImlhdCI6MTc3NjAwNjQyNiwibmJmIjoxNzc2MDA2Mzc2LCJleHAiOjE3NzYwMDY3MjYsIm5vbmNlIjoiUTBqdU5veFlPSUdKd1l6UlR0V2RXYUEifQ {"typ":"JWT","alg":"EdDSA","proto":"FaviDiD-Auth"}
and converts it into base64url form eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsInByb3RvIjoiRmF2aURpRC1BdXRoIn0 TI2VZ9x9rKthZ9vJ0nhT1QbiBLxsAhps0I2Kamh8LRo eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsInByb3RvIjoiRmF2aURpRC1BdXRoIn0.eyJpc3MiOiIvKm15IEZhdmlEaUQqLyIsInN1YiI6Ii8qbXkgRmF2aURpRCovIiwiYXVkIjoiYW50cmVxdWVzdC5ubCIsImlhdCI6MTc3NjAwNjQyNiwibmJmIjoxNzc2MDA2Mzc2LCJleHAiOjE3NzYwMDY3MjYsIm5vbmNlIjoiUTBqdU5veFlPSUdKd1l6UlR0V2RXYUEifQ.TI2VZ9x9rKthZ9vJ0nhT1QbiBLxsAhps0I2Kamh8LRo