<?xml version='1.0'?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
<rfc ipr="trust200902" docName="draft-hallambaker-mesh-reference-06" category="info">
<?rfc toc="yes"?>  
<?rfc symrefs="yes"?>  
<?rfc sortrefs="yes"?>  
<?rfc compact="yes"?>  
<?rfc subcompact="no"?>  
<front>
<title abbrev="Mathematical Mesh Reference">Mathematical Mesh: Reference</title>
<author fullname="Phillip Hallam-Baker" initials="P. M." surname="Hallam-Baker">
<organization>Comodo Group Inc.</organization>
<address>
<email>philliph@comodo.com</email>
</address>
</author>
<date day="18" month="September" year="2017"/>
<area/>
<workgroup/>
<abstract>
<t>
The Mathematical Mesh ?The Mesh? is an end-to-end secure infrastructure that facilitates the exchange of configuration and credential data between multiple user devices. The core protocols of the Mesh are described with examples of common use cases and reference data.</t>
<t>
This document is also available online at <eref target="http://prismproof.org/Documents/draft-hallambaker-mesh-reference.html">
http://prismproof.org/Documents/draft-hallambaker-mesh-reference.html</eref>
.</t>
</abstract>
</front>
<middle>
<section title="Introduction" anchor="s-1">
<t>
NB: The reference material in this document is generated from the schema used to derive the source code. The tool used to create this material has not been optimized to produce output for the IETF documentation format at this time. Consequently, the formatting is currently sub-optimal.</t>
</section>
<section title="Definitions" anchor="s-2">
<t>
This section presents the related specifications and standard, the terms that are used as terms of art within the documents and the terms used as requirements language.</t>
<section title="Requirements Language" anchor="s-2_1">
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119">
[RFC2119]</xref>
.</t>
</section>
<section title="Defined Terms" anchor="s-2_2">
<t>
The terms of art used in this document are described in the Mesh Architecture Guide <xref target="draft-hallambaker-mesh-architecture">
[draft-hallambaker-mesh-architecture]</xref>
.</t>
</section>
<section title="Related Specifications" anchor="s-2_3">
<t>
The architecture of the Mathematical Mesh is described in the Mesh Architecture Guide <xref target="draft-hallambaker-mesh-architecture">
[draft-hallambaker-mesh-architecture]</xref>
. The Mesh documentation set and related specifications are described in this document.</t>
</section>
<section title="Implementation Status" anchor="s-2_4">
<t>
The implementation status of the reference code base is described in the companion document <xref target="draft-hallambaker-mesh-developer">
[draft-hallambaker-mesh-developer]</xref>
.</t>
</section>
</section>
<section title="Protocol Overview" anchor="s-3">
<t>
[Account request does not specify the portal in the request body, only the HTTP package includes this information. This is probably a bug.] </t>
<section title="Creating a new portal account" anchor="s-3_1">
<t>
A user interacts with a Mesh service through a Mesh portal provider  with which she establishes a portal account.  </t>
<t>
For user convenience, a portal account identifier has the familiar  &lt;username&gt;@&lt;domain&gt; format established in [~RFC822]. </t>
<t>
For example Alice selects example.com as her  portal provider and chooses the account name alice. Her portal account identifier is alice. </t>
<t>
A user MAY establish accounts with multiple portal providers and/or change their portal provider at any time they choose. </t>
<section title="Checking Account Identifier for uniqueness" anchor="s-3_1_1">
<t>
The first step in creating a new account is to check to see if the chosen account identifier is available. This allows a client to  validate user input and if necessary warn the user that they need  to choose a new account identifier when the data is first entered. </t>
<t>
The ValidateRequest message contains the requested account identifier and an optional language parameter to allow the service to provide informative error messages in a language the user understands. The Language field contains a list of ISO language identifier codes  in order of preference, most preferred first. </t>
<figure anchor="s-3_1_1-3">
<artwork>
<![CDATA[POST /.well-known/mmm/HTTP/1.1
Host: example.com
Content-Length: 90

{
  "ValidateRequest": {
    "Account": "test@prismproof.org",
    "Language": ["en-uk"]}}]]></artwork>
</figure>
<t>
The ValidateResponse message returns the result of the validation request in the Valid field. Note that even if the value true is returned, a subsequent account creation request MAY still fail. </t>
<figure anchor="s-3_1_1-5">
<artwork>
<![CDATA[HTTP/1.1 200 OK
Date: Mon 18 Sep 2017 04:26:53
Content-Length: 190

{
  "ValidateResponse": {
    "Status": 201,
    "StatusDescription": "Operation completed successfully",
    "Valid": true,
    "Minimum": 1,
    "InvalidCharacters": ".,:;{}()[]<>?|\\@#"}}]]></artwork>
</figure>
<t>
[Note that for the sake of concise presentation, the HTTP binding information is omitted from future examples.] </t>
</section>
</section>
<section title="Creating a new user profile" anchor="s-3_2">
<t>
The first step in creating a new personal profile is to create a Master Profile object. This contains the long term Master Signing Key that will remain constant for the life of the profile, at least  one Online Signature Key to be used for administering the personal profile and (optionally), one or more master escrow keys. </t>
<t>
For convenience, the descriptions of the Master Signing Key,  Online Signing Keys and Escrow Keys typically include PKIX  certificates signed by the Master Signing Key. This allows  PKIX based applications to make use of PKIX certificate chains to express the same trust relationships described in the Mesh. </t>
<figure anchor="s-3_2-3">
<artwork>
<![CDATA[{
  "MasterProfile": {
    "Identifier": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
    "MasterSignatureKey": {
      "UDF": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
      "X509Certificate": "
MIIFXTCCBEWgAwIBAgIRAO4lVl8XvXHmnLVO7Y_uumowDQYJKoZIhvcNAQENBQAw
LjEsMCoGA1UEAxYjTUNGUTctTUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYw
...
NpT-YZeFhK1Fa3AcuUBhoLDkrSnJFRHYj19JSHXFnzIt"
,
      "PublicParameters": {
        "PublicKeyRSA": {
          "kid": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
          "n": "
y0yq1NLVAEuZCzGPR_YFxJlvWH-QyiJOBhHeILjCoWYfoiQKp-FthIyK5EyWT_5T
oRCdGMEh6rCkPpE369Ulx7hqvurhRW_XVXwojUox1afNW6QBu5S-usIeh0CGbRT8
v_fWefjtJQkfnv9o10zX93XMOnCC3t6R9L_apvFAvzqIjsAZWMuPcFlKBuRLXzSA
e-fBS6GRPbhzK5pvtkcZ5VGoxMIDi7Lx0YCP9qIHXRIdeM5nn8uZxtgiz0llWokw
Fr8y9KnnRHq2cYOcuOgGkfTf5PjExwG3dEvhFSUrLI4hQYHBmPS9nHsook4kyVWQ
fzhh5mg9RxNanzXuB_nz1Q"
,
          "e": "
AQAB"
}}},
    "MasterEscrowKeys": [{
        "UDF": "MBHK6-BY4CY-WV7QP-CRVLQ-KNTNY-ZIJ6F",
        "X509Certificate": "
MIIFXTCCBEWgAwIBAgIRAI9a_sgdTt7vVulDCwV--skwDQYJKoZIhvcNAQENBQAw
LjEsMCoGA1UEAxYjTUNGUTctTUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYw
...
FNm77_d-jSpmkGIBchbBNradXoBxC-cnZtz_TXXSFsVc"
,
        "PublicParameters": {
          "PublicKeyRSA": {
            "kid": "MBHK6-BY4CY-WV7QP-CRVLQ-KNTNY-ZIJ6F",
            "n": "
ufbxrsYOeupOcbyo0hxTAbvWNcD44YfAydFz6-ZSUSAEML9fUFkj4_n3gLz742Fm
PKpmab3vaaKjq9LTt18oMKp2hqxh7xKxIaNzv5ABLpBBI9AQ5uSInivNxpd9I2Zb
i7Up_8GNJwmfdPL0rGeUGyon0dyEGcj-s439NMhGXn-us1X61-jEAYDY_ObhQF7s
6OXC2uHQProd2GuDNvKRBSiTjV8pCu48dXg0N9tMICtvt3IEYR0S5nm4AWSYlQKy
QY4QNQ5Blg6vzTycphe6aSu0DwAmvy4EznYaRhZnnYetLl5mD21Gr2wUwvwb-RrG
YHREemz3cxvl35KKc59dBQ"
,
            "e": "
AQAB"
}}}],
    "OnlineSignatureKeys": [{
        "UDF": "MCURC-P23JV-PVSLE-JPPJO-65QB2-6BNEI",
        "X509Certificate": "
MIIFXTCCBEWgAwIBAgIRAJxgDfp834fYUf5Y1XmzHnswDQYJKoZIhvcNAQENBQAw
LjEsMCoGA1UEAxYjTUNGUTctTUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYw
...
9BAdMXUcNhRSOTXdi1pjn9QYx86L8PxIcBcAvYQyDNfg"
,
        "PublicParameters": {
          "PublicKeyRSA": {
            "kid": "MCURC-P23JV-PVSLE-JPPJO-65QB2-6BNEI",
            "n": "
0UWt5lAp-wVdch500PxJHgoxkwexryTteKVu7UEg7SS3Ig0rzwiZz0KgjpiGu09R
WArK-JhpIcFFJjxMYUVAgL5xqWVC9JML8O6hj7bPjpjeUM0PTa5JcAKuMdXXzO-V
0tFvNeI_52qrZPEdCAXlaZmj4I85dsdtNyniXQgykePV9M5a7fI2M2wZ-8F-qEeL
-C43w_g2W5zlK2LOpGR_UPpDH45p7VRN_WaV0Bzr11ZAIo1WYSovDJAMkMlOn_Zi
uabgiVDFvIVOLR3kLzVB0j8S8abxxPiwD5vgwLuPu9q5FXfDzWJAd2gqw2mSYqFT
dNrrr4W7pfwSTYOw8_bzQQ"
,
            "e": "
AQAB"
}}}]}}]]></artwork>
</figure>
<t>
The Master Profile is always signed using the Master Signing Key: </t>
<figure anchor="s-3_2-5">
<artwork>
<![CDATA[{
  "SignedMasterProfile": {
    "Identifier": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
    "SignedData": {
      "unprotected": {
        "dig": "S512"},
      "payload": "
ewogICJNYXN0ZXJQcm9maWxlIjogewogICAgIklkZW50aWZpZXIiOiAiTUNGUTct
TUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYiLAogICAgIk1hc3RlclNpZ25h
...
QUIifX19XX19"
,
      "signatures": [{
          "header": {
            "kid": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF"},
          "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCm9yQlJrRWIwTUduaGdQSUll
eTFmam5QZkc2aFlXOXpjdkZ0MVpDMVlISVZDWUN4RjB1dlJQRHU2MVA5dnVVNmgK
cnp1ZnhYU21nZWNqc0ZaTVgxY1g4USJ9"
,
          "signature": "
gnWbTtze2P981plb1yzdJumrQuyOZLf4jRTmiqZffg3gSpqtYPRCqidtJ6yqO7wN
PTji2ecbWOYkqzppH9jUH5N5jjXkCR78lnBj7GSIfguQ6cFuOncpBEJ7Xs4lVU-h
TP23yzVnhRKlFMthcthCJ5Yn1FuzX1oUYEAZPXUe64bURNRJxJkLpmECWRYl8IZa
Sk3sotniX15EwbgWJbCRansOpFZzD44Ak4o1GwDYPKifvx9dmrbRXpBDQirpLCWE
vANYSVVS74tCkPb0zbTI1qL6UQaCv4XV8pX7hQBpaG8KEn3wi9BujQtSJqG7zUN_
-6w6qYf8cC9SVUE3NQ_pgA"
}]}}}]]></artwork>
</figure>
<t>
Since the device used to create the personal profile is typically connected to the profile, a Device profile entry is created  for it. This contains a Device Signing Key, a Device Encryption Key and a Device Authentication Key: </t>
<figure anchor="s-3_2-7">
<artwork>
<![CDATA[{
  "JoseWebSignature": {
    "unprotected": {
      "dig": "S512"},
    "payload": "
ewogICJEZXZpY2VQcm9maWxlIjogewogICAgIklkZW50aWZpZXIiOiAiTURCQTUt
TFpMRFotTkdZWlQtUjdWMkUtQ09UMjctRVAyS1YiLAogICAgIk5hbWVzIjogWyJE
...
VzRNU0dRIiwKICAgICAgICAgICJlIjogIgpBUUFCIn19fX19"
,
    "signatures": [{
        "header": {
          "kid": "MDBA5-LZLDZ-NGYZT-R7V2E-COT27-EP2KV"},
        "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCmtLTzFNeGRHbXdHS2FnRTNZ
X2ZWazltZENpTzMtS2xpUlZBX3d1Sm1DZ0JPN1J4bi12eVp6VjFmZG9ZU3h1c2YK
MExVWGl2M2kzbkVIbkJDS0I0US04QSJ9"
,
        "signature": "
vI8ZRS0xegVWrQRXbytEL1Ooy509Bpo6lOu4zCQcoOpSDTIMkI3ovPei82YH1ar0
EPLibXUzfKqojQJTVnvpr57deSxcf_Y2v67cah1_OVyuIbZIw7Jd-0UjyHRlGbAd
6uXYXt37ocbd_KLvdjgNw-QHkdIdVhIoYJGYvliCNFbPIhqjIm1-DCrKeO_7MNRr
oYbCTfDsnk6cHQi5JtDfqzyfyRWsr0untvw8G9EaHijellQUpu9HFwdJ-kVYwnOz
0G23Nxz0UCNMI2fXKHICs9B7vdxsZXj2LXeZu7SVmmqHRKM3sO7_DzA7cXdLSjvg
SIB7D3V85pED_fcxpFGy7w"
}]}}]]></artwork>
</figure>
<t>
The Device Profile is signed using the Device Signing Key: </t>
<figure anchor="s-3_2-9">
<artwork>
<![CDATA[{
  "SignedDeviceProfile": {
    "Identifier": "MDBA5-LZLDZ-NGYZT-R7V2E-COT27-EP2KV",
    "SignedData": {
      "unprotected": {
        "dig": "S512"},
      "payload": "
ewogICJEZXZpY2VQcm9maWxlIjogewogICAgIklkZW50aWZpZXIiOiAiTURCQTUt
TFpMRFotTkdZWlQtUjdWMkUtQ09UMjctRVAyS1YiLAogICAgIk5hbWVzIjogWyJE
...
VzRNU0dRIiwKICAgICAgICAgICJlIjogIgpBUUFCIn19fX19"
,
      "signatures": [{
          "header": {
            "kid": "MDBA5-LZLDZ-NGYZT-R7V2E-COT27-EP2KV"},
          "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCmtLTzFNeGRHbXdHS2FnRTNZ
X2ZWazltZENpTzMtS2xpUlZBX3d1Sm1DZ0JPN1J4bi12eVp6VjFmZG9ZU3h1c2YK
MExVWGl2M2kzbkVIbkJDS0I0US04QSJ9"
,
          "signature": "
vI8ZRS0xegVWrQRXbytEL1Ooy509Bpo6lOu4zCQcoOpSDTIMkI3ovPei82YH1ar0
EPLibXUzfKqojQJTVnvpr57deSxcf_Y2v67cah1_OVyuIbZIw7Jd-0UjyHRlGbAd
6uXYXt37ocbd_KLvdjgNw-QHkdIdVhIoYJGYvliCNFbPIhqjIm1-DCrKeO_7MNRr
oYbCTfDsnk6cHQi5JtDfqzyfyRWsr0untvw8G9EaHijellQUpu9HFwdJ-kVYwnOz
0G23Nxz0UCNMI2fXKHICs9B7vdxsZXj2LXeZu7SVmmqHRKM3sO7_DzA7cXdLSjvg
SIB7D3V85pED_fcxpFGy7w"
}]}}}]]></artwork>
</figure>
<t>
A personal profile would typically contain at least one application when first created. For the sake of demonstration, we will do this later. </t>
<t>
The personal profile thus consists of the master profile and  the device profile: </t>
<figure anchor="s-3_2-12">
<artwork>
<![CDATA[{
  "PersonalProfile": {
    "Identifier": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
    "SignedMasterProfile": {
      "Identifier": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
      "SignedData": {
        "unprotected": {
          "dig": "S512"},
        "payload": "
ewogICJNYXN0ZXJQcm9maWxlIjogewogICAgIklkZW50aWZpZXIiOiAiTUNGUTct
TUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYiLAogICAgIk1hc3RlclNpZ25h
...
QUIifX19XX19"
,
        "signatures": [{
            "header": {
              "kid": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF"},
            "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCm9yQlJrRWIwTUduaGdQSUll
eTFmam5QZkc2aFlXOXpjdkZ0MVpDMVlISVZDWUN4RjB1dlJQRHU2MVA5dnVVNmgK
cnp1ZnhYU21nZWNqc0ZaTVgxY1g4USJ9"
,
            "signature": "
gnWbTtze2P981plb1yzdJumrQuyOZLf4jRTmiqZffg3gSpqtYPRCqidtJ6yqO7wN
PTji2ecbWOYkqzppH9jUH5N5jjXkCR78lnBj7GSIfguQ6cFuOncpBEJ7Xs4lVU-h
TP23yzVnhRKlFMthcthCJ5Yn1FuzX1oUYEAZPXUe64bURNRJxJkLpmECWRYl8IZa
Sk3sotniX15EwbgWJbCRansOpFZzD44Ak4o1GwDYPKifvx9dmrbRXpBDQirpLCWE
vANYSVVS74tCkPb0zbTI1qL6UQaCv4XV8pX7hQBpaG8KEn3wi9BujQtSJqG7zUN_
-6w6qYf8cC9SVUE3NQ_pgA"
}]}},
    "Devices": [{
        "Identifier": "MDBA5-LZLDZ-NGYZT-R7V2E-COT27-EP2KV",
        "SignedData": {
          "unprotected": {
            "dig": "S512"},
          "payload": "
ewogICJEZXZpY2VQcm9maWxlIjogewogICAgIklkZW50aWZpZXIiOiAiTURCQTUt
TFpMRFotTkdZWlQtUjdWMkUtQ09UMjctRVAyS1YiLAogICAgIk5hbWVzIjogWyJE
...
VzRNU0dRIiwKICAgICAgICAgICJlIjogIgpBUUFCIn19fX19"
,
          "signatures": [{
              "header": {
                "kid": "MDBA5-LZLDZ-NGYZT-R7V2E-COT27-EP2KV"},
              "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCmtLTzFNeGRHbXdHS2FnRTNZ
X2ZWazltZENpTzMtS2xpUlZBX3d1Sm1DZ0JPN1J4bi12eVp6VjFmZG9ZU3h1c2YK
MExVWGl2M2kzbkVIbkJDS0I0US04QSJ9"
,
              "signature": "
vI8ZRS0xegVWrQRXbytEL1Ooy509Bpo6lOu4zCQcoOpSDTIMkI3ovPei82YH1ar0
EPLibXUzfKqojQJTVnvpr57deSxcf_Y2v67cah1_OVyuIbZIw7Jd-0UjyHRlGbAd
6uXYXt37ocbd_KLvdjgNw-QHkdIdVhIoYJGYvliCNFbPIhqjIm1-DCrKeO_7MNRr
oYbCTfDsnk6cHQi5JtDfqzyfyRWsr0untvw8G9EaHijellQUpu9HFwdJ-kVYwnOz
0G23Nxz0UCNMI2fXKHICs9B7vdxsZXj2LXeZu7SVmmqHRKM3sO7_DzA7cXdLSjvg
SIB7D3V85pED_fcxpFGy7w"
}]}}],
    "Applications": []}}]]></artwork>
</figure>
<t>
The personal profile is then signed using the Online Signing Key: </t>
<figure anchor="s-3_2-14">
<artwork>
<![CDATA[{
  "SignedPersonalProfile": {
    "Identifier": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
    "SignedData": {
      "unprotected": {
        "dig": "S512"},
      "payload": "
ewogICJQZXJzb25hbFByb2ZpbGUiOiB7CiAgICAiSWRlbnRpZmllciI6ICJNQ0ZR
Ny1NQVE3Ti1NVUU2SC03TDNLTC1NMzMzUS1CUFVFRiIsCiAgICAiU2lnbmVkTWFz
...
dGlvbnMiOiBbXX19"
,
      "signatures": [{
          "header": {
            "kid": "MCURC-P23JV-PVSLE-JPPJO-65QB2-6BNEI"},
          "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCmF5NU1uQU1ORDA0ZWgzMEJf
T3RQYnpLdFN6ekd4UW5LS0M3VnZqU1ZkUlhqM2dmQ3BOZHN2U2pSc1JqZGFFWDMK
M2oxSnZ6SDJwYm03UmtZMHl6NzRNdyJ9"
,
          "signature": "
G6_MLrhberYQJTmEyBhlGgITkYNR5qYa-3Fnic0yF_npZOLBDiBzTblUOhxg0-4B
firilJ6PWwb1FRc-GxakchPs4BY-Kn5s10Gbss0M6TAtRrejmvVtxplGgiXwI3am
00aNPryRO_134_d7DYePT_Er2X2ZEVX7_-M2dRogj7m-ldhXWBmZE5_ZOolqAe3a
f6rLJNwdTmG8XDopNmYm-N8e3yOKMUWxpKa1oGAq1izvFJqtOSRSTn25AcX5fJDS
wQpoGV2-4Pz2rQcAQ5-cIsoVFccWNIXxwKu7X9QVX-T21fEH-xot1oA03pxmzJgR
-DV4r9e6Xn6wDvAUHSbsOg"
}]}}}]]></artwork>
</figure>
<section title="Publishing a new user profile" anchor="s-3_2_1">
<t>
Once the signed personal profile is created, the client can finaly make the request for the service to create the account. The request object  contains the requested account identifier and profile: </t>
<figure anchor="s-3_2_1-2">
<artwork>
<![CDATA[{
  "CreateRequest": {
    "Account": "test@prismproof.org",
    "Profile": {
      "SignedPersonalProfile": {
        "Identifier": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
        "SignedData": {
          "unprotected": {
            "dig": "S512"},
          "payload": "
ewogICJQZXJzb25hbFByb2ZpbGUiOiB7CiAgICAiSWRlbnRpZmllciI6ICJNQ0ZR
Ny1NQVE3Ti1NVUU2SC03TDNLTC1NMzMzUS1CUFVFRiIsCiAgICAiU2lnbmVkTWFz
...
dGlvbnMiOiBbXX19"
,
          "signatures": [{
              "header": {
                "kid": "MCURC-P23JV-PVSLE-JPPJO-65QB2-6BNEI"},
              "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCmF5NU1uQU1ORDA0ZWgzMEJf
T3RQYnpLdFN6ekd4UW5LS0M3VnZqU1ZkUlhqM2dmQ3BOZHN2U2pSc1JqZGFFWDMK
M2oxSnZ6SDJwYm03UmtZMHl6NzRNdyJ9"
,
              "signature": "
G6_MLrhberYQJTmEyBhlGgITkYNR5qYa-3Fnic0yF_npZOLBDiBzTblUOhxg0-4B
firilJ6PWwb1FRc-GxakchPs4BY-Kn5s10Gbss0M6TAtRrejmvVtxplGgiXwI3am
00aNPryRO_134_d7DYePT_Er2X2ZEVX7_-M2dRogj7m-ldhXWBmZE5_ZOolqAe3a
f6rLJNwdTmG8XDopNmYm-N8e3yOKMUWxpKa1oGAq1izvFJqtOSRSTn25AcX5fJDS
wQpoGV2-4Pz2rQcAQ5-cIsoVFccWNIXxwKu7X9QVX-T21fEH-xot1oA03pxmzJgR
-DV4r9e6Xn6wDvAUHSbsOg"
}]}}}}}]]></artwork>
</figure>
<t>
The service reports the success (or failure) of the account creation request: </t>
<figure anchor="s-3_2_1-4">
<artwork>
<![CDATA[{
  "CreateResponse": {
    "Status": 201,
    "StatusDescription": "Operation completed successfully"}}]]></artwork>
</figure>
</section>
</section>
<section title="Connecting a device profile to a user profile" anchor="s-3_3">
<t>
Connecting a device to a profile requires the client on the new device to interact with a client on a device that has administration capabilities, i.e. it has access to an Online Signing Key. Since clients cannot  interact directly with other clients, a service is required to  mediate the connection. This service is provided by a Mesh portal provider. </t>
<t>
All service transactions are initiated by the clients. First the  connecting device posts ConnectStart, after which it may poll for the outcome of the connection request using ConnectStatus. </t>
<t>
Periodically, the Administration Device polls for a list of pending connection requests using ConnectPending. After posting a request, the administration device posts the result using ConnectComplete: </t>
<figure anchor="s-3_3-4">
<artwork>
<![CDATA[Connecting                  Mesh                 Administration
  Device                   Service                   Device

	|                         |                         |
	|      ConnectStart       |                         |
	| ----------------------> |                         |
	|                         |      ConnectPending     |
	|                         | <---------------------- |
	|                         |                         |
	|                         |      ConnectComplete    |
	|                         | <---------------------- |
	|      ConnectStatus      |                         |
	| ----------------------> |                         |]]></artwork>
</figure>
<t>
The first step in the process is for the client to generate a device profile. Ideally the device profile is bound to the device in a read-only fashion such that applications running on the  device can make use of the deencryption and authentication keys but these private keys cannot be extracted from the device: </t>
<figure anchor="s-3_3-6">
<artwork>
<![CDATA[{
  "DeviceProfile": {
    "Identifier": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
    "Names": ["Default"],
    "Description": "Unknown",
    "DeviceSignatureKey": {
      "UDF": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
      "PublicParameters": {
        "PublicKeyRSA": {
          "kid": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
          "n": "
xD8Id4Q0ejWFGam9SEsJnWcKumcCHyecfCDmCN8aqygbmcNgo-W4vBXs83eJ_qW7
uzoOJXdS5-5xMnsRK0C-ruCjRQEtbh0GHPqmssK8fWRGGAoyqN1tUMPlugavbyEE
FQZHU5Zol7z9VxvpbQh1IwKmKcYt5TOFOz0z2f5HbnzMD2QoSgiK8kHUdJf8zStL
2JxjNIhpkBz2c8gU1hk4l4b-vpd4qDwRuqEb6Qty5flie2BzorTjLKv3AvvqhshA
kUAPeHS4Bps1CgpHGqwmynsTkuGDlSCdQAIHfZ-tKMZN-fIWDeJiYa9GrUxCIXXg
11sxc0UjSZPwOYj_MTaRCQ"
,
          "e": "
AQAB"
}}},
    "DeviceAuthenticationKey": {
      "UDF": "MB4Z4-6UMPE-MNKFE-YDOZN-OBMAJ-UYYQ3",
      "PublicParameters": {
        "PublicKeyRSA": {
          "kid": "MB4Z4-6UMPE-MNKFE-YDOZN-OBMAJ-UYYQ3",
          "n": "
xkXoHEnKaKb4EQF32NBkflUZUkEm1bo33Yzjto5ne0ZOlKQ0LGdZ6woTHMAQ7RRP
Ad52om_qMecUohKyoRk9OutsLxqGWndPAdTZcNwm0sthVNNC4w3ZuyiRvrIAWB_e
ymL591ZyLPSxqGpt57E3ajSN_Ao7ciLZ30_-eR_XKFsWx1acj78K-pW7sqoSMi5p
0NtIhnpLchcdrlGuAh9n0H0hI-31A_2baqX_AltGYcc4ZFLM8JYtm4ZN4jZHavTo
DB3lIQH-dU9VCkL81jQ1OH1BpnhRaeu0yLCYbcaHM4woP4em3WgtxSLSqmLaPcnq
iJ1Porcb3gJHZ0rly53s6Q"
,
          "e": "
AQAB"
}}},
    "DeviceEncryptiontionKey": {
      "UDF": "MAGB2-ANCIZ-O3GCH-DROQO-KIDPP-7E26X",
      "PublicParameters": {
        "PublicKeyRSA": {
          "kid": "MAGB2-ANCIZ-O3GCH-DROQO-KIDPP-7E26X",
          "n": "
taTPTKcKxqeOk1t-6iiQ5A08u5sgVnM04K-Aj9_QbWR-xyMmfWnBKu_rNj06dMPI
jlXSNzv9O7YCKvKaGSOh_uwVY3jvsgWwMmeVNG8VRqzDlMQ59J1wnjdJB-mctOBq
Ka9Ce0sCzehdzrTK1a_BCWl7vLgszvL0IbLkw1l-dxrTRJ2MHU5BETq-npwasXBr
2h86eQ0b0Rlurr8gUc0I5e9GKP4tV4fqlnyqrCsXc_WtI2_5wmFD_5zb9nisL3t3
hvr5ukdlxtG0D4d1d-_ztgsk5GOWU9TPBQmYG6Xz23CmeWeeyCTBfSj8QlqfbkkT
hUVPhYKz2E3k7c1oA47OrQ"
,
          "e": "
AQAB"
}}}}}]]></artwork>
</figure>
<t>
The device profile is then signed: </t>
<figure anchor="s-3_3-8">
<artwork>
<![CDATA[{
  "SignedDeviceProfile": {
    "Identifier": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
    "SignedData": {
      "unprotected": {
        "dig": "S512"},
      "payload": "
ewogICJEZXZpY2VQcm9maWxlIjogewogICAgIklkZW50aWZpZXIiOiAiTUNaS0kt
T0tUUUYtTTNLUVktRktHVFUtVDNTT0ktSzMzSTMiLAogICAgIk5hbWVzIjogWyJE
...
ICAgICAgICAgImUiOiAiCkFRQUIifX19fX0"
,
      "signatures": [{
          "header": {
            "kid": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3"},
          "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCjFsZkFIOHEwbGFVN0k2TkFw
SDhxZkwyTEJ2azBEV3A5T1BDY1pwWnhsTC1iTi1ZUjhuQV8zanZIanlGNnBDN2oK
SF8xREJ5WHdLVmhYWUFUM0FtMkVmdyJ9"
,
          "signature": "
D6zqFeO_RelamJq43ya9A3Qyfm67rffwgbGLgHSRECxTiQgTeoGHcKzeeUHvLyS5
XYEGR-CrNm65GTHJyfPcQGfV1qnCOd_BclzvfcBi5vJ1R9_m54IVwNvf5VlnGecT
YSeCaTMLUsnags04dSV0nSXIWgMpYf8I9g4luq_KAuFedqJKHXUG4vmpR6gKsM_Q
UT9ChhD2uK1Sql13lF9BYSKpkH6oRMLdWCTHuoQZ_MSU8d-BTQSYbwoRNMUHjhDc
woUYQuXYM-eX5aM3v20qr86-JT7BUSM4XwH_Lf--eT4DQ8EabYgwKXmfzQDNG846
xkjV4ZUZdSOlvlSNiUAtag"
}]}}}]]></artwork>
</figure>
<section title="Profile Authentication" anchor="s-3_3_1">
<t>
One of the main architecutral principles of the Mesh is  bilateral authentication. Every device that is connected to a  Mesh profile MUST authenticate the profile it is connecting to and every Mesh profile administrator MUST authenticate devices that are connected. </t>
<t>
Having created the necessary profile, the device MUST verify  that it is connecting to the correct Mesh profile. The best  mechanism for achieving this purpose depends on the capabilities  of the device being connected. The administration device  obviously requires some means of communicating with the  user to serve its function. But the device being connected may have a limited display capability or no user interaction  capability at all. </t>
<section title="Interactive Devices" anchor="s-3_3_1_1">
<t>
If the device has user input and display capabilities, it can verify that it is connecting to the correct display by first requesting the user enter the portal account of the profile  they wish to connect to, retreiving the profile associated  with the device and displaying the profile fingerprint.  </t>
<t>
The client requests the profile for the requested account name: </t>
<figure anchor="s-3_3_1_1-3">
<artwork>
<![CDATA[{
  "GetRequest": {
    "Account": "test@prismproof.org",
    "Multiple": false}}]]></artwork>
</figure>
<t>
The response contains the requested profile information. </t>
<figure anchor="s-3_3_1_1-5">
<artwork>
<![CDATA[{
  "GetResponse": {
    "Status": 201,
    "StatusDescription": "Operation completed successfully",
    "Entries": [{
        "SignedPersonalProfile": {
          "Identifier": "MCFQ7-MAQ7N-MUE6H-7L3KL-M333Q-BPUEF",
          "SignedData": {
            "unprotected": {
              "dig": "S512"},
            "payload": "
ewogICJQZXJzb25hbFByb2ZpbGUiOiB7CiAgICAiSWRlbnRpZmllciI6ICJNQ0ZR
Ny1NQVE3Ti1NVUU2SC03TDNLTC1NMzMzUS1CUFVFRiIsCiAgICAiU2lnbmVkTWFz
...
dGlvbnMiOiBbXX19"
,
            "signatures": [{
                "header": {
                  "kid": "MCURC-P23JV-PVSLE-JPPJO-65QB2-6BNEI"},
                "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCmF5NU1uQU1ORDA0ZWgzMEJf
T3RQYnpLdFN6ekd4UW5LS0M3VnZqU1ZkUlhqM2dmQ3BOZHN2U2pSc1JqZGFFWDMK
M2oxSnZ6SDJwYm03UmtZMHl6NzRNdyJ9"
,
                "signature": "
G6_MLrhberYQJTmEyBhlGgITkYNR5qYa-3Fnic0yF_npZOLBDiBzTblUOhxg0-4B
firilJ6PWwb1FRc-GxakchPs4BY-Kn5s10Gbss0M6TAtRrejmvVtxplGgiXwI3am
00aNPryRO_134_d7DYePT_Er2X2ZEVX7_-M2dRogj7m-ldhXWBmZE5_ZOolqAe3a
f6rLJNwdTmG8XDopNmYm-N8e3yOKMUWxpKa1oGAq1izvFJqtOSRSTn25AcX5fJDS
wQpoGV2-4Pz2rQcAQ5-cIsoVFccWNIXxwKu7X9QVX-T21fEH-xot1oA03pxmzJgR
-DV4r9e6Xn6wDvAUHSbsOg"
}]}}}]}}]]></artwork>
</figure>
<t>
Having received the profile data, the user can then  verify that the device is attempting to  connect to the correct profile by verifying that the  fingerprint shown by the device attempting to connect is correct. </t>
</section>
<section title="Constrained Interaction Devices" anchor="s-3_3_1_2">
<t>
Connection of an Internet of Things 'IoT' device that does  not have the ability to accept user input requires a mechanism by which the user can identify the device they wish to connect  to their profile and a mechanism to authenticate the profile  to the device. </t>
<t>
If the connecting device has a wired communication capability such as a USB port, this MAY be used to effect the device  connection using a standardized interaction profile. But  an increasing number of constrained IoT devices are only  capable of wireless communication. </t>
<t>
Configuration of such devices for the purpose of the Mesh requires that we also consider configuration of the wireless networking capabilities at the same time. The precise mechanism by which  this is achieved is therefore outside the scope of this particular  document. However prototypes have been built and are being considered that make use of some or all of the following communication techniques: </t>
<t><list style="symbols">
<t>
 Wired serial connection (RS232, RS485). </t>
<t>
 DHCP signalling. </t>
<t>
 Machine readable device identifiers (barcodes, QRCodes). </t>
<t>
 Default device profile installed during manufacture. </t>
<t>
 Optical communication path using camera on administrative device and status light on connecting device to communicate the device  identifier, challenge nonce and confirm profile fingerprint. </t>
<t>
 Speech output on audio capable connecting device. </t>
</list></t>
</section>
</section>
<section title="Connection request" anchor="s-3_3_2">
<t>
After the user verifies the device fingerprint as correct, the  client posts a device connection request to the portal: </t>
<figure anchor="s-3_3_2-2">
<artwork>
<![CDATA[{
  "ConnectStartRequest": {
    "SignedRequest": {
      "Identifier": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
      "SignedData": {
        "unprotected": {
          "dig": "S512"},
        "payload": "
ewogICJDb25uZWN0aW9uUmVxdWVzdCI6IHsKICAgICJQYXJlbnRVREYiOiAiTUNG
UTctTUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYiLAogICAgIkRldmljZSI6
...
fX0sCiAgICAiRGV2aWNlRGF0YSI6IFtdfX0"
,
        "signatures": [{
            "header": {
              "kid": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3"},
            "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCjQ1dkRWQkg0VndGTHhWZ0lX
VlI2MGxGSm1KY1B1aUI4aUo5V1g2TWhlSU9VZGZsUmtzcEQ2ZHpza3F1cjdWZC0K
YVZyQ0lQR29jVldLVEF6OUFZN0U2QSJ9"
,
            "signature": "
kZn-7SOivXJjkhLiSZkz5KMM0X6dHnxNIvqIhBRMbldcmSGNadU3-pLz6UjHqMKR
1dYa4lmyPU1_9fv-z5T1JwCte5w7byv8HfJcqfbUgqtaVe5AIm7DugurvqKjOFb-
uFM9FJKI356CuVJ4Qie7U_Xh3LJ0HJF5ipMWJOqskm2zh2DN7d3-hYGymwtEE8NZ
_TqnmE1VlKZKUgnkrjFU1FgmAdBzp3zFJExFZzCOWcbxbqkohY3jiCIFecHqt8g7
RLSMqQST4VcL3KvIMLrvcXYdJGQixu_iFViMI66ijjdeuMaUHpK4NaMpMYk-0mcJ
65qFw1xv8rHL6S4QLdolng"
}]}},
    "AccountID": "test@prismproof.org"}}]]></artwork>
</figure>
<t>
The portal verifies that the request is accepable and returns  the transaction result: </t>
<figure anchor="s-3_3_2-4">
<artwork>
<![CDATA[{
  "ConnectStartResponse": {}}]]></artwork>
</figure>
</section>
<section title="Administrator Polls Pending Connections" anchor="s-3_3_3">
<t>
The client can poll the portal for the status of pending requests at any time (modulo any service throttling restrictions at the  service side). But the request status will only change when an update is posted by an administration device. </t>
<t>
Since the user is typically connecting a device to their profile, the next step in connecting the device is to start the administration client. When started, the client polls for pending connection  requests using ConnectPendingRequest. </t>
<figure anchor="s-3_3_3-3">
<artwork>
<![CDATA[{
  "ConnectPendingRequest": {
    "AccountID": "test@prismproof.org"}}]]></artwork>
</figure>
<t>
The service responds with a list of pending requests: </t>
<figure anchor="s-3_3_3-5">
<artwork>
<![CDATA[{
  "ConnectPendingResponse": {
    "Pending": [{
        "Identifier": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
        "SignedData": {
          "unprotected": {
            "dig": "S512"},
          "payload": "
ewogICJDb25uZWN0aW9uUmVxdWVzdCI6IHsKICAgICJQYXJlbnRVREYiOiAiTUNG
UTctTUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYiLAogICAgIkRldmljZSI6
...
fX0sCiAgICAiRGV2aWNlRGF0YSI6IFtdfX0"
,
          "signatures": [{
              "header": {
                "kid": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3"},
              "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCjQ1dkRWQkg0VndGTHhWZ0lX
VlI2MGxGSm1KY1B1aUI4aUo5V1g2TWhlSU9VZGZsUmtzcEQ2ZHpza3F1cjdWZC0K
YVZyQ0lQR29jVldLVEF6OUFZN0U2QSJ9"
,
              "signature": "
kZn-7SOivXJjkhLiSZkz5KMM0X6dHnxNIvqIhBRMbldcmSGNadU3-pLz6UjHqMKR
1dYa4lmyPU1_9fv-z5T1JwCte5w7byv8HfJcqfbUgqtaVe5AIm7DugurvqKjOFb-
uFM9FJKI356CuVJ4Qie7U_Xh3LJ0HJF5ipMWJOqskm2zh2DN7d3-hYGymwtEE8NZ
_TqnmE1VlKZKUgnkrjFU1FgmAdBzp3zFJExFZzCOWcbxbqkohY3jiCIFecHqt8g7
RLSMqQST4VcL3KvIMLrvcXYdJGQixu_iFViMI66ijjdeuMaUHpK4NaMpMYk-0mcJ
65qFw1xv8rHL6S4QLdolng"
}]}}]}}]]></artwork>
</figure>
</section>
<section title="Administrator updates and publishes the personal profile." anchor="s-3_3_4">
<t>
The device profile is added to the Personal profile which is then signed by the online signing key. The administration client publishes the updated profile to the Mesh through the portal: </t>
<figure anchor="s-3_3_4-2">
<artwork>
<![CDATA[{
  "ConnectPendingRequest": {
    "AccountID": "test@prismproof.org"}}]]></artwork>
</figure>
<t>
As usual, the service returns the response code: </t>
<figure anchor="s-3_3_4-4">
<artwork>
<![CDATA[{
  "ConnectPendingResponse": {
    "Pending": [{
        "Identifier": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
        "SignedData": {
          "unprotected": {
            "dig": "S512"},
          "payload": "
ewogICJDb25uZWN0aW9uUmVxdWVzdCI6IHsKICAgICJQYXJlbnRVREYiOiAiTUNG
UTctTUFRN04tTVVFNkgtN0wzS0wtTTMzM1EtQlBVRUYiLAogICAgIkRldmljZSI6
...
fX0sCiAgICAiRGV2aWNlRGF0YSI6IFtdfX0"
,
          "signatures": [{
              "header": {
                "kid": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3"},
              "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCjQ1dkRWQkg0VndGTHhWZ0lX
VlI2MGxGSm1KY1B1aUI4aUo5V1g2TWhlSU9VZGZsUmtzcEQ2ZHpza3F1cjdWZC0K
YVZyQ0lQR29jVldLVEF6OUFZN0U2QSJ9"
,
              "signature": "
kZn-7SOivXJjkhLiSZkz5KMM0X6dHnxNIvqIhBRMbldcmSGNadU3-pLz6UjHqMKR
1dYa4lmyPU1_9fv-z5T1JwCte5w7byv8HfJcqfbUgqtaVe5AIm7DugurvqKjOFb-
uFM9FJKI356CuVJ4Qie7U_Xh3LJ0HJF5ipMWJOqskm2zh2DN7d3-hYGymwtEE8NZ
_TqnmE1VlKZKUgnkrjFU1FgmAdBzp3zFJExFZzCOWcbxbqkohY3jiCIFecHqt8g7
RLSMqQST4VcL3KvIMLrvcXYdJGQixu_iFViMI66ijjdeuMaUHpK4NaMpMYk-0mcJ
65qFw1xv8rHL6S4QLdolng"
}]}}]}}]]></artwork>
</figure>
</section>
<section title="Administrator posts completion request." anchor="s-3_3_5">
<t>
Having accepted the device and connected it to the profile, the administration client creates and signs a connection completion result which is posted to the portal using ConnectCompleteRequest: </t>
<figure anchor="s-3_3_5-2">
<artwork>
<![CDATA[{
  "ConnectCompleteRequest": {
    "Result": {
      "Identifier": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
      "SignedData": {
        "unprotected": {
          "dig": "S512"},
        "payload": "
ewogICJDb25uZWN0aW9uUmVzdWx0IjogewogICAgIkRldmljZSI6IHsKICAgICAg
IklkZW50aWZpZXIiOiAiTUNaS0ktT0tUUUYtTTNLUVktRktHVFUtVDNTT0ktSzMz
...
MnF6Clg0X0NwM1ltOTZoNjlLUXBiZUM0ZFEifV19fX19fQ"
,
        "signatures": [{
            "header": {
              "kid": "MCURC-P23JV-PVSLE-JPPJO-65QB2-6BNEI"},
            "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCjRkZEpmMF9Qc2FwZUVFMDJf
SzdMT3FneUZrWC01YXdOLTBLQndvRnRoQ3diT1hnbXRDR2RadWt0bU9vT1YxUEEK
U0xqc2RJX3R1QkRjQm9OSGg5VGRfZyJ9"
,
            "signature": "
R6KQt_WAF3uz5DWRCL6zYvLS8_VNbNvEO7L40jFunA0OwfuvojCnRAqXQaVOVJon
hD9Q8gsjPt1nyQY0THJLGAv8SlQMlQ4L-l-PjNWhF0IVt9ZQe4AkDeV2Ua8sf2xA
MahVApuqSs7Ut4OQJPQ8j_DxdWDPVzxABaOTclMOpwz0TTLy-r7IYYWob2y03nzV
TSEeCgLTSkxAsEAAJqPxutMBDgzLO_-AfCYSNqHlMYqHdVVvLDUytQt1pYsTqL-5
57RcssggByeKv2Wm5v8NebgPuYJKlBPueFH6_5Koo_uFUPTU8aydrvVnBCLsm9pL
0OW9DQKR-xV4G9cXg6taOA"
}]}},
    "AccountID": "test@prismproof.org"}}]]></artwork>
</figure>
<t>
Again, the service returns the response code: </t>
<figure anchor="s-3_3_5-4">
<artwork>
<![CDATA[{
  "ConnectCompleteResponse": {}}]]></artwork>
</figure>
</section>
<section title="Connecting device polls for status update." anchor="s-3_3_6">
<t>
As stated previously, the connecting device polls the portal  periodically to determine the status of the pending request using ConnectStatusRequest: </t>
<figure anchor="s-3_3_6-2">
<artwork>
<![CDATA[{
  "ConnectStatusRequest": {
    "AccountID": "test@prismproof.org",
    "DeviceID": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3"}}]]></artwork>
</figure>
<t>
If the response is that the connection status has not changed, the service MAY return a response that specifies a minimum  retry interval. In this case however there is a connection result:  </t>
<figure anchor="s-3_3_6-4">
<artwork>
<![CDATA[{
  "ConnectStatusResponse": {
    "Result": {
      "Identifier": "MCZKI-OKTQF-M3KQY-FKGTU-T3SOI-K33I3",
      "SignedData": {
        "unprotected": {
          "dig": "S512"},
        "payload": "
ewogICJDb25uZWN0aW9uUmVzdWx0IjogewogICAgIkRldmljZSI6IHsKICAgICAg
IklkZW50aWZpZXIiOiAiTUNaS0ktT0tUUUYtTTNLUVktRktHVFUtVDNTT0ktSzMz
...
MnF6Clg0X0NwM1ltOTZoNjlLUXBiZUM0ZFEifV19fX19fQ"
,
        "signatures": [{
            "header": {
              "kid": "MCURC-P23JV-PVSLE-JPPJO-65QB2-6BNEI"},
            "protected": "
ewogICJhbGciOiAiUlM1MTIiLAogICJ2YWwiOiAiCjRkZEpmMF9Qc2FwZUVFMDJf
SzdMT3FneUZrWC01YXdOLTBLQndvRnRoQ3diT1hnbXRDR2RadWt0bU9vT1YxUEEK
U0xqc2RJX3R1QkRjQm9OSGg5VGRfZyJ9"
,
            "signature": "
R6KQt_WAF3uz5DWRCL6zYvLS8_VNbNvEO7L40jFunA0OwfuvojCnRAqXQaVOVJon
hD9Q8gsjPt1nyQY0THJLGAv8SlQMlQ4L-l-PjNWhF0IVt9ZQe4AkDeV2Ua8sf2xA
MahVApuqSs7Ut4OQJPQ8j_DxdWDPVzxABaOTclMOpwz0TTLy-r7IYYWob2y03nzV
TSEeCgLTSkxAsEAAJqPxutMBDgzLO_-AfCYSNqHlMYqHdVVvLDUytQt1pYsTqL-5
57RcssggByeKv2Wm5v8NebgPuYJKlBPueFH6_5Koo_uFUPTU8aydrvVnBCLsm9pL
0OW9DQKR-xV4G9cXg6taOA"
}]}}}}]]></artwork>
</figure>
<t>
[Should probably unpack further.] </t>
</section>
</section>
<section title="Adding an application profile to a user profile" anchor="s-3_4">
<t>
Application profiles are published separately from the  personal profile to which they are linked. This allows a  device to be given administration capability for a particular application without granting administration capability for  the profile itself and the ability to connect additional  profiles and devices. </t>
<t>
Another advantage of this separation is that an application  profile might be managed by a separate party. In an enterprise, the application profile for a user's corporate email account  could be managed by the corporate IT department. </t>
<t>
A user MAY have multiple application profiles for the same application. If a user has three email accounts, they would  have three email application profiles, one for each account. </t>
<t>
In this example, the user has requested a PaswordProfile to be created. When populated, this records the usernames and passwords for the various Web sites that the user has created accounts at  and has requested the Web browser store in the Mesh. </t>
<t>
Unlike a traditional password management service, the data stored the Password Profile is encrypted end to end and can only be  decrypted by the devices that hold a decryption key. </t>
<figure anchor="s-3_4-6">
<artwork>
<![CDATA[{Example.PasswordProfile1}]]></artwork>
</figure>
<t>
The application profile is published to the Mesh in the same way as any other profile update, via a a Publish transaction: </t>
<t>
% Point = Example.Traces.Get (Example.LabelApplicationWeb1); {Point.Messages[0].String()} </t>
<t>
The service returns a status response. </t>
<t>
{Point.Messages[1].String()} </t>
<t>
Note that the degree of verification to be performed by the service when an application profile is published is an open question. </t>
<t>
Having created the application profile, the administration client adds it to the personal profile and publishes it: </t>
<t>
{Point.Messages[0].String()} </t>
<t>
Note that if the publication was to happen in the reverse order, with the personal profile being published before the application profile, the personal profile might be rejected by the portal for  inconsistency as it links to a non existent application profile. Though the value of such a check is debatable. It might well be preferable to not make such checks as it permits an application profile to have a degree of anonymity. </t>
<t>
{Point.Messages[1].String()} </t>
</section>
<section title="Creating a recovery profile" anchor="s-3_5">
<t>
The Mesh invites users to put all their data eggs in one cryptographic basket. If the private keys in their master profile are lost, they could lose all their digital assets. </t>
<t>
The debate over the desirability of key escrow is a complex one. Not least because voluntary key escrow by the user to protect the user's digital assets is frequently conflated with mechanisms to support 'Lawful Access' through government managed backdoors. </t>
<t>
Accidents happen and so do disasters. For most users and most applications, data loss is a much more important concern than data disclosure. The option  of using a robust key recovery mechanism is therefore essential for use of  strong cryptography is to become ubiquitous. </t>
<t>
There are of course circumstances in which some users may prefer to risk losing some of their data rather than risk disclosure. Since any key recovery infrastructure necessarily introduces the risk of coercion, the choice of whether to use key recovery or not is left to the user to  decide. </t>
<t>
The Mesh permits users to escrow their private keys in the Mesh itself in an OfflineEscrowEntry. Such entries are encrypted using the strongest degree of encryption available under a symmetric key.  The symmetric key is then in turn split using Shamir secret sharing using an n of m threshold scheme. </t>
<t>
The OfflineEscrowEntry identifier is a UDF fingerprint of the symmetric key used to encrypt the data. This guarantees that a party that has the decryption key has the ability to locate the corresponding Escrow entry. </t>
<t>
The OfflineEscrowEntry is published using the usual Publish transaction: </t>
<t>
{Point.Messages[0].String()} </t>
<t>
The response indicates success or failure: </t>
<t>
{Point.Messages[1].String()} </t>
</section>
<section title="Recovering a profile" anchor="s-3_6">
<t>
To recover a profile, the user MUST supply the necessary number of  secret shares. These are then used to calculate the UDF fingerprint to use as the locator in a Get transaction: </t>
<t>
{Point.Messages[0].String()} </t>
<t>
If the transaction succeeds, GetResponse is returned with the  requested data. </t>
<t>
{Point.Messages[1].String()} </t>
<t>
The client can now decrypt the OfflineEscrowEntry to recover the  private key(s). </t>
</section>
</section>
<section title="Shared Classes" anchor="s-4">
<t>
The following classes are used as common elements in Mesh profile specifications.a </t>
<section title="Cryptographic Data Classes" anchor="s-4_1">
<t>
Most Mesh objects are signed and/or encrypted. For consistency all Mesh classes make use of the cryptographic data classes described in this section. </t>
<section title="Structure: PublicKey" anchor="s-4_1_1">
<t>
The PublicKey class is used to describe public key pairs and  trust assertions associated with a public key. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
UDF fingerprint of the public key parameters/ </t>
<t>
Binary (Optional) </t>
<t>
List of X.509 Certificates </t>
<t>
Binary [0..Many] </t>
<t>
X.509 Certificate chain. </t>
<t>
Binary (Optional) </t>
<t>
X.509 Certificate Signing Request.  </t>
</list></t>
</section>
<section title="Structure: SignedData" anchor="s-4_1_2">
<t>
Container for JOSE signed data and related attributes. </t>
<t>
 </t>
<t><list style="hanging">
<t>
Binary (Optional) </t>
<t>
The signed data  </t>
</list></t>
</section>
<section title="Structure: EncryptedData" anchor="s-4_1_3">
<t>
Container for JOSE encrypted data and related attributes. </t>
<t>
 </t>
<t><list style="hanging">
<t>
Binary (Optional) </t>
<t>
The encrypted data  </t>
</list></t>
</section>
</section>
<section title="Common Application Classes" anchor="s-4_2">
<section title="Structure: Connection" anchor="s-4_2_1">
<t>
Describes network connection parameters for an application </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
DNS address of the server </t>
<t>
Integer (Optional) </t>
<t>
TCP/UDP Port number </t>
<t>
String (Optional) </t>
<t>
DNS service prefix as described in [!RFC6335] </t>
<t>
String [0..Many] </t>
<t>
Describes the security mode to use. Valid choices are Direct/Upgrade/None </t>
<t>
String (Optional) </t>
<t>
Username to present to the service for authentication </t>
<t>
String (Optional) </t>
<t>
Password to present to the service for authentication </t>
<t>
String (Optional) </t>
<t>
Service connection parameters in URI format </t>
<t>
String (Optional) </t>
<t>
List of the supported/acceptable authentication mechanisms, preferred mechanism first. </t>
<t>
Integer (Optional) </t>
<t>
Service timeout in seconds. </t>
<t>
Boolean (Optional) </t>
<t>
If set, the client should poll the specified service intermittently for updates.  </t>
</list></t>
</section>
</section>
</section>
<section title="Mesh Profile Objects" anchor="s-5">
<section title="Base Profile Objects" anchor="s-5_1">
<section title="Structure: Entry" anchor="s-5_1_1">
<t>
Base class for all Mesh Profile objects. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Globally unique identifier that remains constant for the lifetime of the  entry.  </t>
</list></t>
</section>
<section title="Structure: SignedProfile" anchor="s-5_1_2">
<t>
 </t>
<t><list style="hanging">
<t>
 Entry  </t>
</list></t>
<t>
Contains a signed profile entry </t>
<t>
 </t>
<t><list style="hanging">
<t>
JoseWebSignature (Optional) </t>
<t>
The signed profile. </t>
<t>
Note that each child of SignedProfile requires that the Payload field of the SignedData object contain an object of a specific type.  For example, a SignedDeviceProfile object MUST contain a Payload field that contains a DeviceProfile object. </t>
<t>
Advice (Optional) </t>
<t>
Additional data that is not authenticated.  </t>
</list></t>
</section>
<section title="Structure: Advice" anchor="s-5_1_3">
<t>
Additional data bound to a signed profile that is not authenticated. </t>
<t>
 </t>
<t><list style="hanging">
<t>
DateTime (Optional) </t>
<t>
If specified, the profile was the default profile at the specified  date and time. The current default for that type of profile is the profile with the most recent Default timestamp.  </t>
</list></t>
</section>
<section title="Structure: PortalAdvice" anchor="s-5_1_4">
<t>
 </t>
<t><list style="hanging">
<t>
 Advice  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
String [0..Many] </t>
<t>
A portal address at which this profile is registered.  </t>
</list></t>
</section>
<section title="Structure: Profile" anchor="s-5_1_5">
<t>
 </t>
<t><list style="hanging">
<t>
 Entry  </t>
</list></t>
<t>
Parent class from which all profile types are derived </t>
<t>
 </t>
<t><list style="hanging">
<t>
String [0..Many] </t>
<t>
Fingerprints of index terms for profile retrieval. The use of the fingerprint of the name rather than the name itself is a precaution against enumeration attacks and other forms of abuse. </t>
<t>
DateTime (Optional) </t>
<t>
The time instant the profile was last modified. </t>
<t>
String (Optional) </t>
<t>
A Uniform Notary Token providing evidence that a signature was performed after the notary token was created.  </t>
</list></t>
</section>
</section>
<section title="Device Profile Classes" anchor="s-5_2">
<section title="Structure: SignedDeviceProfile" anchor="s-5_2_1">
<t>
 </t>
<t><list style="hanging">
<t>
 SignedProfile  </t>
</list></t>
<t>
Contains a signed device profile </t>
<t>
[No fields] </t>
</section>
<section title="Structure: DeviceProfile" anchor="s-5_2_2">
<t>
 </t>
<t><list style="hanging">
<t>
 Profile  </t>
</list></t>
<t>
Describes a mesh device. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Description of the device </t>
<t>
PublicKey (Optional) </t>
<t>
Key used to sign certificates for the DAK and DEK. The fingerprint of the DSK is the UniqueID of the Device Profile </t>
<t>
PublicKey (Optional) </t>
<t>
Key used to authenticate requests made by the device. </t>
<t>
PublicKey (Optional) </t>
<t>
Key used to pass encrypted data to the device such as a DeviceUseEntry  </t>
</list></t>
</section>
<section title="Structure: DevicePrivateProfile" anchor="s-5_2_3">
<t>
Private portion of device encryption profile.  </t>
<t>
 </t>
<t><list style="hanging">
<t>
Key (Optional) </t>
<t>
Private portion of the DeviceSignatureKey </t>
<t>
Key (Optional) </t>
<t>
Private portion of the DeviceAuthenticationKey </t>
<t>
Key (Optional) </t>
<t>
Private portion of the DeviceEncryptiontionKey  </t>
</list></t>
</section>
</section>
<section title="Master Profile Objects" anchor="s-5_3">
<section title="Structure: SignedMasterProfile" anchor="s-5_3_1">
<t>
 </t>
<t><list style="hanging">
<t>
 SignedProfile  </t>
</list></t>
<t>
Contains a signed Personal master profile </t>
<t>
[No fields] </t>
</section>
<section title="Structure: MasterProfile" anchor="s-5_3_2">
<t>
 </t>
<t><list style="hanging">
<t>
 Profile  </t>
</list></t>
<t>
Describes the long term parameters associated with a personal profile. </t>
<t>
 </t>
<t><list style="hanging">
<t>
PublicKey (Optional) </t>
<t>
The root of trust for the Personal PKI, the public key of the PMSK  is presented as a self-signed X.509v3 certificate with Certificate  Signing use enabled. The PMSK is used to sign certificates for the  PMEK, POSK and PKEK keys. </t>
<t>
PublicKey [0..Many] </t>
<t>
A Personal Profile MAY contain one or more PMEK keys to enable escrow  of private keys used for stored data.  </t>
<t>
PublicKey [0..Many] </t>
<t>
A Personal profile contains at least one POSK which is used to sign  device administration application profiles.  </t>
</list></t>
</section>
</section>
<section title="Personal Profile Objects" anchor="s-5_4">
<section title="Structure: SignedPersonalProfile" anchor="s-5_4_1">
<t>
 </t>
<t><list style="hanging">
<t>
 SignedProfile  </t>
</list></t>
<t>
Contains a signed Personal current profile </t>
<t>
[No fields] </t>
</section>
<section title="Structure: PersonalProfile" anchor="s-5_4_2">
<t>
 </t>
<t><list style="hanging">
<t>
 Profile  </t>
</list></t>
<t>
Describes the current applications and devices connected to a  personal master profile. </t>
<t>
 </t>
<t><list style="hanging">
<t>
SignedMasterProfile (Optional) </t>
<t>
The corresponding master profile.  The profile MUST be signed by the PMSK. </t>
<t>
SignedDeviceProfile [0..Many] </t>
<t>
The set of device profiles connected to the profile. The profile MUST be signed by the DSK in the profile. </t>
<t>
ApplicationProfileEntry [0..Many] </t>
<t>
Application profiles connected to this profile.  </t>
</list></t>
</section>
<section title="Structure: ApplicationProfileEntry" anchor="s-5_4_3">
<t>
Personal profile entry describing the privileges of specific devices. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
The unique identifier of the application </t>
<t>
String (Optional) </t>
<t>
The application type </t>
<t>
String (Optional) </t>
<t>
Optional friendly name identifying the application. </t>
<t>
String [0..Many] </t>
<t>
List of devices authorized to sign application profiles </t>
<t>
String [0..Many] </t>
<t>
List of devices authorized to read private parts of application  profiles.  </t>
</list></t>
</section>
</section>
<section title="Application Profile Objects" anchor="s-5_5">
<section title="Structure: SignedApplicationProfile" anchor="s-5_5_1">
<t>
 </t>
<t><list style="hanging">
<t>
 SignedProfile  </t>
</list></t>
<t>
Contains a signed device profile </t>
<t>
[No fields] </t>
</section>
<section title="Structure: ApplicationProfile" anchor="s-5_5_2">
<t>
 </t>
<t><list style="hanging">
<t>
 Profile  </t>
</list></t>
<t>
Parent class from which all application profiles inherit. </t>
<t>
[No fields] </t>
</section>
<section title="Structure: ApplicationProfilePrivate" anchor="s-5_5_3">
<t>
 </t>
<t><list style="hanging">
<t>
 Entry  </t>
</list></t>
<t>
The base class for all private profiles. </t>
<t>
[No fields] </t>
</section>
<section title="Structure: ApplicationDevicePublic" anchor="s-5_5_4">
<t>
 </t>
<t><list style="hanging">
<t>
 Entry  </t>
</list></t>
<t>
Describes the public per device data </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Description of the device for convenience of the user. </t>
<t>
String (Optional) </t>
<t>
Fingerprint of device that this key corresponds to.  </t>
</list></t>
</section>
<section title="Structure: ApplicationDevicePrivate" anchor="s-5_5_5">
<t>
 </t>
<t><list style="hanging">
<t>
 Entry  </t>
</list></t>
<t>
Describes the private per device data </t>
<t>
[No fields] </t>
</section>
</section>
<section title="Key Escrow Objects" anchor="s-5_6">
<section title="Structure: EscrowEntry" anchor="s-5_6_1">
<t>
 </t>
<t><list style="hanging">
<t>
 Entry  </t>
</list></t>
<t>
Contains escrowed data </t>
<t>
 </t>
<t><list style="hanging">
<t>
JoseWebEncryption (Optional) </t>
<t>
The encrypted escrow data   </t>
</list></t>
</section>
<section title="Structure: OfflineEscrowEntry" anchor="s-5_6_2">
<t>
 </t>
<t><list style="hanging">
<t>
 EscrowEntry  </t>
</list></t>
<t>
Contains data escrowed using the offline escrow mechanism. </t>
<t>
[No fields] </t>
</section>
<section title="Structure: OnlineEscrowEntry" anchor="s-5_6_3">
<t>
 </t>
<t><list style="hanging">
<t>
 EscrowEntry  </t>
</list></t>
<t>
Contains data escrowed using the online escrow mechanism. </t>
<t>
[No fields] </t>
</section>
<section title="Structure: EscrowedKeySet" anchor="s-5_6_4">
<t>
A set of escrowed keys.  </t>
<t>
[No fields] </t>
</section>
</section>
</section>
<section title="Portal Connection" anchor="s-6">
<section title="Connection Request and Response Structures" anchor="s-6_1">
<section title="Structure: ConnectionRequest" anchor="s-6_1_1">
<t>
Describes a connection request. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
UDF of Mesh Profile to which connection is requested. </t>
<t>
SignedDeviceProfile (Optional) </t>
<t>
The Device profile to be connected  </t>
</list></t>
</section>
<section title="Structure: SignedConnectionRequest" anchor="s-6_1_2">
<t>
 </t>
<t><list style="hanging">
<t>
 SignedProfile  </t>
</list></t>
<t>
Contains a ConnectionRequest signed by the  corresponding device signature key. </t>
<t>
[No fields] </t>
</section>
<section title="Structure: ConnectionResult" anchor="s-6_1_3">
<t>
Describes the result of a connection request. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 ConnectionRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
The result of the connection request. Valid responses are: Accepted, Refused, Query.  </t>
</list></t>
</section>
<section title="Structure: SignedConnectionResult" anchor="s-6_1_4">
<t>
 </t>
<t><list style="hanging">
<t>
 SignedProfile  </t>
</list></t>
<t>
Contains a signed connection result </t>
<t>
[No fields] </t>
</section>
</section>
</section>
<section title="Mesh Portal Service Reference" anchor="s-7">
<t><list style="hanging">
<t>
_mmm._tcp </t>
<t>
/.well-known/mmm </t>
</list></t>
<t>
Every Mesh Portal Service transaction consists of exactly one request followed by exactly one response. Mesh Service transactions MAY cause modification of the data stored in the Mesh Portal or the Mesh itself but do not cause changes to the connection state. The protocol itself is thus idempotent. There is no set sequence in which operations are required to be performed. It is not necessary to perform a Hello transaction prior to a ValidateAccount, Publish or any other transaction. </t>
<section title="Request Messages" anchor="s-7_1">
<t>
A Mesh Portal Service request consists of a payload object that inherits from the MeshRequest class. When using the  HTTP binding, the request MUST specify the portal DNS address in the HTTP Host field.  </t>
<section title="Message: MeshRequest" anchor="s-7_1_1">
<t>
Base class for all request messages. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Name of the Mesh Portal Service to which the request  is directed.  </t>
</list></t>
</section>
</section>
<section title="Response Messages" anchor="s-7_2">
<t>
A Mesh Portal Service response consists of a payload object that inherits from the MeshResponse class. When using the HTTP binding, the response SHOULD report the Status response code in the HTTP response  message. However the response code returned in the payload object MUST always be considered authoritative. </t>
<section title="Message: MeshResponse" anchor="s-7_2_1">
<t>
Base class for all response messages. Contains only the status code and status description fields. </t>
<t>
[No fields] </t>
</section>
</section>
<section title="Imported Objects" anchor="s-7_3">
<t>
The Mesh Service protocol makes use of JSON objects defined in the JOSE Signatgure and Encryption specifications. </t>
</section>
<section title="Common Structures" anchor="s-7_4">
<t>
The following common structures are used in the protocol messages: </t>
<section title="Structure: KeyValue" anchor="s-7_4_1">
<t>
Describes a Key/Value structure used to make queries for records matching one or more selection criteria. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
The data retrieval key. </t>
<t>
String (Optional) </t>
<t>
The data value to match.  </t>
</list></t>
</section>
<section title="Structure: SearchConstraints" anchor="s-7_4_2">
<t>
Specifies constraints to be applied to a search result. These  allow a client to limit the number of records returned, the quantity of data returned, the earliest and latest data returned, etc. </t>
<t>
 </t>
<t><list style="hanging">
<t>
DateTime (Optional) </t>
<t>
Only data published on or after the specified time instant  is requested. </t>
<t>
DateTime (Optional) </t>
<t>
Only data published before the specified time instant is requested. This excludes data published at the specified time instant. </t>
<t>
Integer (Optional) </t>
<t>
Maximum number of data entries to return. </t>
<t>
Integer (Optional) </t>
<t>
Maximum number of data bytes to return. </t>
<t>
String (Optional) </t>
<t>
Specifies a page key returned in a previous search operation in which the number of responses exceeded the specified bounds. </t>
<t>
When a page key is specified, all the other search parameters except for MaxEntries and MaxBytes are ignored and the service returns the next set of data responding to the earlier query.  </t>
</list></t>
</section>
</section>
<section title="Transaction: Hello" anchor="s-7_5">
<t>
 </t>
<t><list style="hanging">
<t>
 HelloRequest </t>
<t>
 HelloResponse  </t>
</list></t>
<t>
Report service and version information.  </t>
<t>
The Hello transaction provides a means of determining which protocol versions, message encodings and transport protocols are supported by the service. </t>
</section>
<section title="Transaction: ValidateAccount" anchor="s-7_6">
<t>
 </t>
<t><list style="hanging">
<t>
 ValidateRequest </t>
<t>
 ValidateResponse  </t>
</list></t>
<t>
Request validation of a proposed name for a new account. </t>
<t>
For validation of a user's account name during profile creation. </t>
<section title="Message: ValidateRequest" anchor="s-7_6_1">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
Describes the proposed account properties. Currently, these are limited to the account name but could be extended in future versions of the protocol. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Account name requested </t>
<t>
Boolean (Optional) </t>
<t>
If true, request a reservation for the specified account name. Note that the service is not obliged to honor reservation  requests. </t>
<t>
String [0..Many] </t>
<t>
List of ISO language codes in order of preference. For creating explanatory text.  </t>
</list></t>
</section>
<section title="Message: ValidateResponse" anchor="s-7_6_2">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshResponse  </t>
</list></t>
<t>
States whether the proposed account properties are acceptable and (optional) returns an indication of what properties are valid. </t>
<t>
Note that receiving a 'Valid' responseto a Validate Request does not guarantee creation of the account. In addition to the possibility  that the account namecould be requested by another user between the  Validate and Create transactions, a portal service MAY perform more  stringent validation criteria when an account is actually being  created. For example, checking with the authoritative list of current accounts rather than a cached copy. </t>
<t>
 </t>
<t><list style="hanging">
<t>
Boolean (Optional) </t>
<t>
If true, the specified account identifier is acceptable. If false, the account identifier is rejected. </t>
<t>
Integer (Optional) </t>
<t>
Specifies the minimum length of an account name. </t>
<t>
Integer (Optional) </t>
<t>
Specifies the maximum length of an account name. </t>
<t>
String (Optional) </t>
<t>
A list of characters that the service  does not accept in account names. The list of characters  MAY not be exhaustive but SHOULD include any illegal characters in the proposed account name. </t>
<t>
String (Optional) </t>
<t>
Text explaining the reason an account name was rejected.  </t>
</list></t>
</section>
</section>
<section title="Transaction: CreateAccount" anchor="s-7_7">
<t>
 </t>
<t><list style="hanging">
<t>
 CreateRequest </t>
<t>
 CreateResponse  </t>
</list></t>
<t>
Request creation of a new portal account. </t>
<t>
Unlike a profile, a mesh account is specific to a particular  Mesh portal. A mesh account must be created and accepted before a profile can be published. </t>
<section title="Message: CreateRequest" anchor="s-7_7_1">
<t>
Request creation of a new portal account. The request specifies the requested account identifier and the Mesh profile to be associated  with the account. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Account identifier requested.  </t>
</list></t>
</section>
<section title="Message: CreateResponse" anchor="s-7_7_2">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshResponse  </t>
</list></t>
<t>
Reports the success or failure of a Create transaction. </t>
<t>
[No fields] </t>
</section>
</section>
<section title="Transaction: DeleteAccount" anchor="s-7_8">
<t>
 </t>
<t><list style="hanging">
<t>
 DeleteRequest </t>
<t>
 DeleteResponse  </t>
</list></t>
<t>
Request deletion of a portal account. </t>
<t>
Deletes a portal account but not the underlying profile. Once registered, profiles are permanent. </t>
<section title="Message: DeleteRequest" anchor="s-7_8_1">
<t>
Request deletion of a new portal account. The request specifies the requested account identifier. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Account identifier to be deleted.  </t>
</list></t>
</section>
<section title="Message: DeleteResponse" anchor="s-7_8_2">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshResponse  </t>
</list></t>
<t>
Reports the success or failure of a Delete transaction. </t>
<t>
[No fields] </t>
</section>
</section>
<section title="Transaction: Get" anchor="s-7_9">
<t>
 </t>
<t><list style="hanging">
<t>
 GetRequest </t>
<t>
 GetResponse  </t>
</list></t>
<t>
Search for data in the mesh that matches a set of properties described by a sequence of key/value pairs. </t>
<section title="Message: GetRequest" anchor="s-7_9_1">
<t>
Describes the Portal or Mesh data to be retreived. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Lookup by profile ID </t>
<t>
String (Optional) </t>
<t>
Lookup by Account ID </t>
<t>
KeyValue [0..Many] </t>
<t>
List of KeyValue pairs specifying the conditions to be met </t>
<t>
SearchConstraints (Optional) </t>
<t>
Constrain the search to a specific time interval and/or  limit the number and/or total size of data records returned. </t>
<t>
Boolean (Optional) </t>
<t>
If true return multiple responses if available </t>
<t>
Boolean (Optional) </t>
<t>
If true, the client requests that the full Mesh data record  be returned containing both the Mesh entry itself and the  Mesh metadata that allows the date and time of the  publication of the Mesh entry to be verified.  </t>
</list></t>
</section>
<section title="Message: GetResponse" anchor="s-7_9_2">
<t>
Reports the success or failure of a Get transaction. If a Mesh entry matching the specified profile is found, containsthe list of entries matching the request. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshResponse  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
DataItem [0..Many] </t>
<t>
List of mesh data records matching the request. </t>
<t>
String (Optional) </t>
<t>
If non-null, indicates that the number and/or size of the data records returned exceeds either the SearchConstraints specified in the request or internal server limits.  </t>
</list></t>
</section>
</section>
<section title="Transaction: Publish" anchor="s-7_10">
<t>
 </t>
<t><list style="hanging">
<t>
 PublishRequest </t>
<t>
 PublishResponse  </t>
</list></t>
<t>
Publish a profile or key escrow entry to the mesh. </t>
<section title="Message: PublishRequest" anchor="s-7_10_1">
<t>
Requests publication of the specified Mesh entry. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
[No fields] </t>
</section>
<section title="Message: PublishResponse" anchor="s-7_10_2">
<t>
Reports the success or failure of a Publish transaction. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshResponse  </t>
</list></t>
<t>
[No fields] </t>
</section>
</section>
<section title="Transaction: Status" anchor="s-7_11">
<t>
 </t>
<t><list style="hanging">
<t>
 StatusRequest </t>
<t>
 StatusResponse  </t>
</list></t>
<t>
Request the current status of the mesh as seen by the portal to which it is directed. </t>
<t>
The response to the status request contains the last signed checkpoint and proof chains for each of the peer portals that have been checkpointed. </t>
<t>
[Not currently implemented] </t>
<section title="Message: StatusRequest" anchor="s-7_11_1">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
Initiates a status transaction. </t>
<t>
[No fields] </t>
</section>
<section title="Message: StatusResponse" anchor="s-7_11_2">
<t>
Reports the success or failure of a Status transaction. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshResponse  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
DateTime (Optional) </t>
<t>
Time that the last write update was made to the Mesh </t>
<t>
DateTime (Optional) </t>
<t>
Time that the last Mesh checkpoint was calculated. </t>
<t>
DateTime (Optional) </t>
<t>
Time at which the next Mesh checkpoint should be calculated. </t>
<t>
String (Optional) </t>
<t>
Last checkpoint value.  </t>
</list></t>
</section>
</section>
<section title="Transaction: ConnectStart" anchor="s-7_12">
<t>
 </t>
<t><list style="hanging">
<t>
 ConnectStartRequest </t>
<t>
 ConnectStartResponse  </t>
</list></t>
<t>
Request connection of a new device to a mesh profile </t>
<section title="Message: ConnectStartRequest" anchor="s-7_12_1">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
Initial device connection request. </t>
<t>
 </t>
<t><list style="hanging">
<t>
SignedConnectionRequest (Optional) </t>
<t>
Device connection request signed by thesignature key of the  device requesting connection. </t>
<t>
String (Optional) </t>
<t>
Account identifier of account to which the device is requesting connection.  </t>
</list></t>
</section>
<section title="Message: ConnectStartResponse" anchor="s-7_12_2">
<t>
Reports the success or failure of a ConnectStart transaction. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
[No fields] </t>
</section>
</section>
<section title="Transaction: ConnectStatus" anchor="s-7_13">
<t>
 </t>
<t><list style="hanging">
<t>
 ConnectStatusRequest </t>
<t>
 ConnectStatusResponse  </t>
</list></t>
<t>
Request status of pending connection request of a new device  to a mesh profile </t>
<section title="Message: ConnectStatusRequest" anchor="s-7_13_1">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
Request status information for a pending request posted previously. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
Account identifier for which pending connection information is requested. </t>
<t>
String (Optional) </t>
<t>
Device identifier of device requesting status information.  </t>
</list></t>
</section>
<section title="Message: ConnectStatusResponse" anchor="s-7_13_2">
<t>
Reports the success or failure of a ConnectStatus transaction. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
SignedConnectionResult (Optional) </t>
<t>
The signed ConnectionResult object.  </t>
</list></t>
</section>
</section>
<section title="Transaction: ConnectPending" anchor="s-7_14">
<t>
 </t>
<t><list style="hanging">
<t>
 ConnectPendingRequest </t>
<t>
 ConnectPendingResponse  </t>
</list></t>
<t>
Request a list of pending requests for an administration profile. </t>
<section title="Message: ConnectPendingRequest" anchor="s-7_14_1">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
Specify the criteria for pending requests. </t>
<t>
 </t>
<t><list style="hanging">
<t>
String (Optional) </t>
<t>
The account identifier of the account for which pending connection requests are requested. </t>
<t>
SearchConstraints (Optional) </t>
<t>
Constrain the search to a specific time interval and/or  limit the number and/or total size of data records returned.  </t>
</list></t>
</section>
<section title="Message: ConnectPendingResponse" anchor="s-7_14_2">
<t>
Reports the success or failure of a ConnectPending transaction. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
SignedConnectionRequest [0..Many] </t>
<t>
A list of pending requests satisfying the criteria set out in the request. </t>
<t>
String (Optional) </t>
<t>
If non-null, indicates that the number and/or size of the data records returned exceeds either the SearchConstraints specified in the request or internal server limits.  </t>
</list></t>
</section>
</section>
<section title="Transaction: ConnectComplete" anchor="s-7_15">
<t>
 </t>
<t><list style="hanging">
<t>
 ConnectCompleteRequest </t>
<t>
 ConnectCompleteResponse  </t>
</list></t>
<t>
Post response to a pending connection request. </t>
<section title="Message: ConnectCompleteRequest" anchor="s-7_15_1">
<t>
Reports the success or failure of a ConnectComplete transaction. </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
SignedConnectionResult (Optional) </t>
<t>
The connection result to be posted to the portal. The result MUST be signed by a valid administration key for the Mesh profile. </t>
<t>
String (Optional) </t>
<t>
The account identifier to which the connection result is posted.  </t>
</list></t>
</section>
<section title="Message: ConnectCompleteResponse" anchor="s-7_15_2">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
Reports the success or failure of a ConnectComplete transaction. </t>
<t>
[No fields] </t>
</section>
</section>
<section title="Transaction: Transfer" anchor="s-7_16">
<t>
 </t>
<t><list style="hanging">
<t>
 TransferRequest </t>
<t>
 TransferResponse  </t>
</list></t>
<t>
Perform a bulk transfer of the log between the specified transaction identifiers. Requires appropriate authorization </t>
<t>
[Not currently implemented] </t>
<section title="Message: TransferRequest" anchor="s-7_16_1">
<t>
Request a bulk transfer of the log between the specified transaction identifiers. Requires appropriate authorization </t>
<t>
 </t>
<t><list style="hanging">
<t>
 MeshRequest  </t>
</list></t>
<t>
 </t>
<t><list style="hanging">
<t>
SearchConstraints (Optional) </t>
<t>
Constrain the search to a specific time interval and/or  limit the number and/or total size of data records returned.  </t>
</list></t>
</section>
<section title="Message: TransferResponse" anchor="s-7_16_2">
<t>
 </t>
<t><list style="hanging">
<t>
 MeshResponse  </t>
</list></t>
<t>
Reports the success or failure of a Transfer transaction. If successful, contains the list of Mesh records to be transferred. </t>
<t>
 </t>
<t><list style="hanging">
<t>
DataItem [0..Many] </t>
<t>
List of mesh data records matching the request. </t>
<t>
String (Optional) </t>
<t>
If non-null, indicates that the number and/or size of the data records returned exceeds either the SearchConstraints specified in the request or internal server limits.  </t>
</list></t>
</section>
</section>
</section>
<section title="Security Considerations" anchor="s-8">
</section>
<section title="IANA Considerations" anchor="s-9">
<t>
All the IANA considerations for the Mesh documents are specified in this document</t>
</section>
<section title="Acknowledgements" anchor="s-10">
<t>
</t>
</section>
</middle>
<back>
<references title="Normative References">
<reference anchor="RFC2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author fullname="S. Bradner" initials="S." surname="Bradner">
<organization/>
<address>
</address>
</author>
<date month="March" year="1997"/>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
<seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>
<reference anchor="RFC6335">
<front>
<title>Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry</title>
<author fullname="M. Cotton" initials="M." surname="Cotton">
<organization/>
<address>
</address>
</author>
<author fullname="L. Eggert" initials="L." surname="Eggert">
<organization/>
<address>
</address>
</author>
<author fullname="J. Touch" initials="J." surname="Touch">
<organization/>
<address>
</address>
</author>
<author fullname="M. Westerlund" initials="M." surname="Westerlund">
<organization/>
<address>
</address>
</author>
<author fullname="S. Cheshire" initials="S." surname="Cheshire">
<organization/>
<address>
</address>
</author>
<date month="August" year="2011"/>
</front>
<seriesInfo name="BCP" value="165"/>
<seriesInfo name="RFC" value="6335"/>
<seriesInfo name="DOI" value="10.17487/RFC6335"/>
</reference>
</references>
<references title="Informative References">
<reference anchor="RFC822">
<front>
<title>STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES</title>
<author fullname="D. Crocker" initials="D." surname="Crocker">
<organization/>
<address>
</address>
</author>
<date month="August" year="1982"/>
</front>
<seriesInfo name="STD" value="11"/>
<seriesInfo name="RFC" value="822"/>
<seriesInfo name="DOI" value="10.17487/RFC0822"/>
</reference>
<reference anchor="draft-hallambaker-mesh-architecture">
<front>
<title>Mathematical Mesh: Architecture</title>
<author fullname="Phillip Hallam-Baker" initials="P" surname="Hallam-Baker">
<organization/>
<address>
</address>
</author>
<date day="9" month="May" year="2017"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-hallambaker-mesh-architecture-03"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-hallambaker-mesh-architecture-03.txt"/>
</reference>
<reference anchor="draft-hallambaker-mesh-developer">
<front>
<title>Mathematical Mesh: Reference Implementation</title>
<author fullname="Phillip Hallam-Baker" initials="P" surname="Hallam-Baker">
<organization/>
<address>
</address>
</author>
<date day="18" month="August" year="2017"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-hallambaker-mesh-developer-03"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-hallambaker-mesh-developer-03.txt"/>
</reference>
</references>
</back>
</rfc>
