> For the complete documentation index, see [llms.txt](https://docs.cyphernet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cyphernet.io/group-1/cypherid.md).

# CypherID

CypherId is a self-sovereign decentralized ID system.

1. Identities (and signed identities, i.e. identity certificates)
2. Identity profiles
3. Identity attestation
4. Contact books

### Identities

Identities consist of:

1. Public key on a specific curve, serialized in one of the pre-defined formats
2. Optional revocation single-use-seal defined using specific proof-of-publication medium
3. Optional signature over the public key, its curve and revocation single-use-seal (or its absence). If the signature is present the identity is called a "certificate"
4. Optional mnemonic must be absent in some formats (like QR code or strict binary & text).

Identities may be represented in multiple ways:

1. As a simply-copyable ASCII string using base58 encoding starting with `ssi` prefix, enhanced with error detection checksum and optional mnemonic suffix (not covering signature even if present, but always covering seal).&#x20;
2. As a URI in form using `ssi:` schema:\
   `ssi:<baid58>/bc/<txid>/<vout>?[sig=<base36cert>]#<mnemonic>`
3. As a QR code, using URI representation from the above, in alphanumeric mode
4. In one of Strict Encoding representations, as strict binary, strict text or JSON or YAML. Text formats may contain optional mnemonic fields, but they must always be absent in the binary serialization (since it can be re-generated from the SSI data)

{% code lineNumbers="true" %}

```haskell
data SSI ::
    key secp256k1(compact [U8^33] | xonly [U8^32]) | curve25519(compact [u8^32]),
    seal (bc(txid [U8^32], vout U16))?,
    sig (schnorr([U8 ^ 64..65]) | ecdsa([U8 ^ 65]) | eddsa([U8 ^ 64]))?
    profile Profile?
    
type SSIExt over SSI
    {- 
    fn read_mnemonic :: (ssi SSI) -> (mnemo Mnemonic)
        let checksum := crc32 (ssi.key, ssi.seal)
        mnemo := mnemonic (checksum)
    -}
    read mnemonic :: [([AlphaSmall ^ 3..8])^3]
        crc32 key, seal |> mnemonic
    
    check !! SSIError -- fn check :: (SSI) -> (() | SSIError)
        {- this is a lambda function
           fn _match :: (ssi) -> (() | SSIError)
               _match1 ssi
               
           fn _match1 :: (ssi) -> (() | SSIError)
               (and (eq ssi.key.@ty, 0), (eq ssi.sig.@ty, 1))
         -}
        key, sig =>
            -- this a function table where each row is a lambda:
            -- fn _ :: (_ _, _) -> (() | SSIError)
            secp256k1(_), schnorr(_) -> (),
            secp256k1(_), ecdsa(_) -> (),
            curve25519(_), eddsa(_) -> (),
            .. -> !! SSIError.invalidSigScheme
 
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cyphernet.io/group-1/cypherid.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
