Registration

Registration process

Have a look at the API specs for the relevant entry points.

Example: No challenge

In this simple example, we assume that the server does not use the challenge mechanism. See below for more information on challenges.

POST to https://kullo.example.com/accounts:

{
    "address": "someuser#example.com",
    "loginKey": "acac0ac64f4f954d1e3e5930e98df3f30aff130134e553457d38c096ecd7f5d5fecab4eb3f10185d8e0d4ab6e3295d237fca94706d1750601e037106b05f2201",
    "privateDataKey": "AK1WsmIxiuCWL1/0/RihIk/eZeSrMjHYLqqhY52EBSABenQHkB6MUncI7pKUdIxe",
    "keypairEncryption":
    {
        "pubkey": "...",
        "privkey": "...",
        "validFrom": "",
        "validUntil": ""
    },
    "keypairSigning":
    {
        "pubkey": "...",
        "privkey": "...",
        "validFrom": "",
        "validUntil": ""
    }
}

Response HTTP 200 OK:

{}

Challenges

A challenge is a task that the server asks the client to solve in order to process a registration. These can be used for protection against misuse, to enforce registration limits or for billing purposes.

There are multiple challenge types to account for different needs. In order to be able to register a Kullo account on an arbitraty server, a Kullo client SHOULD implement all of them.

Challenge type "blocked"

This challenge indicates that the given address cannot be registered on this server. The server accepts no answers to this challenge.

Example challenge

{
    "type": "blocked",
    "user": "someuser#example.com",
    "timestamp": 1409326432,
    "text": "The address 'someuser#example.com' cannot be registered."
}

Challenge type "captcha"

The server sends a base64 encoded PNG captcha to the client, including an encrypted expectedAnswer. As with all other captcha types, the client needs to send back the whole challenge in addition to the user's input (challengeAnswer).

Once the user typed in a wrong captcha code, the server MUST send back a new challenge where the captcha SHOULD be a new one.

Example challenge

{
    "type": "captcha",
    "user": "someuser#example.com",
    "timestamp": 1409326432,
    "text": "Please enter the code from the image.",
    "captcha": "iVBORw0KGgoAAAANSUhEUgAAAMgAAAAyCAMAAAAuj2TTAAADAFBMVEVRUVlOUl9TUWBSUmZWU2JZUmhWU25WVmpYVXBaVHVWVnZUWHFbWGdcVXdaWm9XW3RaWH5eV3ldWnRaW3thV39eWIViW3FdW4FaXIdgWoddW41qWYNiXIlkWo9lXoBpW4tlYXdiXZZkYXxhX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wSG+kFriiLFzXX575zYBxK2BWzifKxvUiqqujyn0kvPCC7miLvqNJx8ZFfBoHtaVV33kZlErz5kkbAACALykolAVVWmW1DQMvVKWKqFQEBUi4uvv21wbS5x+/+xfzcSa+yWUbMow2mjKmiBl1gm5ctOpgDpBI4GrHoeb9KIiDJJCuhqi5ntjzZjc2Tx/YsH9FPz5ScVA4UrMPF9IKwrS1WJkcv7c2LIlKZVXNlSo0utopNpyIC26zaI5YXRTJEcM/BQAA4Ess5xKW1gAREIPCGvCVzJ0qOu3f+Pkbz0Xu/OPvfH90YhDfhAww2mgDAEBQAPGoGcNI2VWGK6A6nLOby6hZozGbg8aVUeVe2Tj84elsfXt3OXow6TkmUkDCvpaNoHnLC/3Z5OnjiLKIC/CiwrlIsj1ecdvXP3wNAJ6aObTmrSMSgDyBnIozCgNlSWRVhCasrJBLlCgUvt99+8uv9WR976M/O3+y9KQ6S0mzlCzN0GBAG6hRM2IWC+jMGCHGinnL9i8+hZiiU6plevvZ8fH0S3r0/f2z3nHr4OLg0cziUH7NrfaXbZbdrvDF5aJ2EUREQQ0FwRwpg6PVojP/MH66weAczRyYM++dJbMOgwogz5P2JZSAjiiFhyRYWhq20BFcvfXGF26uyvlHf/3Oo0UpvRroNIM0I71sXwLaUCpA2Q7FKsWCGYDPU1KbgcmTIW4OttWbLkar2/3D+fvYtSnZ59khym4crz/9JT5fLLaojROxeHrCOpxF1JATZpYq1uXojaNY3dJmwIBz1Bmwjl2nO43P43g6IElOk+SsICOijBsQUzraS1RcRmb3y7+wu9Mm++jPPzjIMqTY/o3/D8KbKNMsDt1PAAAAAElFTkSuQmCC",
    "expectedAnswer": "sYahRHEwcWF5ZcQWEDhcAJSMhFb4j6K/ni6LNAvzYzE="
}

Challenge type "code"

The server asks the user to send a valid registration code (for example from a voucher) in order to register an arbitrary address, chosen by the user.

Example challenge

{
    "type": "code",
    "user": "someuser#example.com",
    "timestamp": 1409326432,
    "text": "Please enter an invite code."
}

Challenge type "reservation"

The server asks the user to send a valid reservation code in order to claim a specific address which was pre-registered.

Example challenge

{
    "type": "reservation",
    "user": "someuser#example.com",
    "timestamp": 1409326432,
    "text": "Please enter the reservation code for address 'someuser#example.com'."
}

Challenge type "reset"

The server asks the user to send the valid reset code for the given address in order to reset the account. This is useful if the user has lost all copies of his MasterKey and thus can no longer access his account. In this case, there is no hope to restore the user's data. All we can do is reset his account so he can at least keep his address.

By default, accounts don't have a corresponding reset code. Codes are generated on user demand by the server operator.

Resetting will delete all data from the account, leaving out only the pubVer keys, so that verifying messages sent before the reset still succeeds.

Example challenge

{
    "type": "reset",
    "user": "someuser#example.com",
    "timestamp": 1409326432,
    "text": "Please enter the reset code for address 'someuser#kullo.net'."
}

Example: Registration with code challenge

POST to https://kullo.example.com/accounts (without challenge):

{
    "address": "someuser#example.com",
    "loginKey": "acac0ac64f4f954d1e3e5930e98df3f30aff130134e553457d38c096ecd7f5d5fecab4eb3f10185d8e0d4ab6e3295d237fca94706d1750601e037106b05f2201",
    "privateDataKey": "AK1WsmIxiuCWL1/0/RihIk/eZeSrMjHYLqqhY52EBSABenQHkB6MUncI7pKUdIxe",
    "keypairEncryption":
    {
        "pubkey": "...",
        "privkey": "...",
        "validFrom": "",
        "validUntil": ""
    },
    "keypairSigning":
    {
        "pubkey": "...",
        "privkey": "...",
        "validFrom": "",
        "validUntil": ""
    }
}

Response HTTP 403 Forbidden with a challenge:

{
    "challenge":
    {
        "type": "code",
        "user": "someuser#example.com",
        "timestamp": 1406112445,
        "text": "Please enter a valid registration code"
    },
    "challengeAuth": "d719eccdb4383908a5351c8bacd4537fde05ecb7"
}

POST to https://kullo.example.com/accounts (with the challenge and the answer):

{
    "address": "someuser#example.com",
    "loginKey": "acac0ac64f4f954d1e3e5930e98df3f30aff130134e553457d38c096ecd7f5d5fecab4eb3f10185d8e0d4ab6e3295d237fca94706d1750601e037106b05f2201",
    "privateDataKey": "AK1WsmIxiuCWL1/0/RihIk/eZeSrMjHYLqqhY52EBSABenQHkB6MUncI7pKUdIxe",
    "keypairEncryption":
    {
        "pubkey": "...",
        "privkey": "...",
        "validFrom": "",
        "validUntil": ""
    },
    "keypairSigning":
    {
        "pubkey": "...",
        "privkey": "...",
        "validFrom": "",
        "validUntil": ""
    },
    "challenge":
    {
        "type": "code",
        "user": "someuser#example.com",
        "timestamp": 1406112637,
        "text": "Please enter a valid registration code"
    },
    "challengeAuth": "8c46b0372a5db313178fa8274d746aa80ca4b043",
    "challengeAnswer": "ABCD"
}

Response HTTP 200 OK:

{}