idnits 2.17.1 draft-urien-core-blockchain-transaction-protocol-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 02, 2018) is 2218 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 CORE Working Group P. Urien 3 Internet Draft Telecom ParisTech 4 Intended status: Experimental 6 March 02, 2018 7 Expires: September 2018 9 Blockchain Transaction Protocol for Constraint Nodes 10 draft-urien-core-blockchain-transaction-protocol-00.txt 12 Abstract 14 The goal of the blockchain transaction protocol for constraint nodes 15 is to enable the generation of blockchain transactions by constraint 16 nodes, according to the following principles : 17 - transactions are triggered by Provisioning-Messages that include 18 the needed blockchain parameters. 19 - binary encoded transactions are returned in Transaction-Messages, 20 which include sensors/actuators data. Constraint nodes, associated 21 with blockchain addresses, compute the transaction signature. 23 Requirements Language 25 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 26 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 27 document are to be interpreted as described in RFC 2119. 29 Status of this Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six 40 months and may be updated, replaced, or obsoleted by other documents 41 at any time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on September 2018. 46 . 48 Copyright Notice 50 Copyright (c) 2018 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (http://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with 58 respect to this document. Code Components extracted from this 59 document must include Simplified BSD License text as described in 60 Section 4.e of the Trust Legal Provisions and are provided without 61 warranty as described in the Simplified BSD License. 63 Table of Contents 64 Abstract........................................................... 1 65 Requirements Language.............................................. 1 66 Status of this Memo................................................ 1 67 Copyright Notice................................................... 2 68 1 Overview......................................................... 4 69 2 Overview of the Blockchain Transaction Protocol for Constraint 70 Nodes.............................................................. 4 71 2.1 Architecture................................................ 4 72 2.2 An Ethereum Use Case........................................ 5 73 3 Blockchain Transaction Protocol Messages Definition.............. 6 74 3.1 Provisioning Message........................................ 6 75 3.1.1 Encoding example in JSON syntax ...................... 6 76 3.2 Transaction Message......................................... 6 77 3.2.1 Encoding example in JSON syntax ...................... 6 78 4. Blockchain Transaction Protocol Messages Binary Encoding........ 7 79 4.1 CoAP messages............................................... 7 80 4.2 HTTP Messages............................................... 7 81 5 IANA Considerations.............................................. 7 82 6 References....................................................... 7 83 6.1 Normative References........................................ 7 84 6.2 Informative References...................................... 7 85 7 Authors' Addresses............................................... 7 86 1 Overview 88 In the context of this draft sensors/actuators are powered by micro- 89 controllers comprising about 10KB of RAM and 100KB of non volatile 90 memory. The node electronic board may include a radio SoC (System On 91 Chip) or the micro-controller can be part of the SoC. The radio chip 92 manages IP connectivity with another device, typically acting as a 93 controller, which provides a full internet access with standard 94 computing resources. 96 A constraint node driving sensors and/or actuators may deliver 97 critical data dealing with safety (fire detection,...) or legacy 98 (pollution measurement,...) information. 100 Blockchain infrastructure provides two important features in an 101 Internet of Things (IoT) context: 103 - Authentication of data in P2P context. Blockchain signed 104 transactions are checked by numerous nodes. 105 - Information publication. Transactions are stored in duplicated and 106 distributed databases. 107 - Dating information. Transactions are dated during the mining 108 process. 110 The goal of the blockchain transaction protocol for constraint nodes 111 is to enable the generation of blockchain transactions by constraint 112 nodes, according to the following principles : 113 - transactions are triggered by controllers. Needed blockchain 114 parameters are included in provisioning messages. 115 - binary encoded transaction messages are returned by constraint 116 nodes. A node has the ability to compute the transaction signature. 118 2 Overview of the Blockchain Transaction Protocol for Constraint Nodes 120 2.1 Architecture 122 <--Provisioning-Message 123 +--------------------+ IP +----------------------+ +------------+ 124 | Constraint Node | link | Controller | | Blockchain | 125 + Blockchain Address +------+ Full IP connectivity +--+ Network | 126 + Private Key | | Access to blockchain | | | 127 +--------------------+ +----------------------+ +------------+ 128 Transaction-Message--> 130 Figure 1. Functional architecture for the Blockchain Transaction 131 Protocol for Constraint Nodes 133 A constraint node holds a blockchain address (BA). The blockchain 134 address is computed from a private key (Pk). Most of today 135 blockchain infrastructures deal with ECDSA signatures, generated 136 over the Secp256k1 elliptic curve. The private key is a 32 bytes 137 number, stored in the constraint node. The computation of hash 138 procedures such a SHA2 or KECCAK-256 can be handled by 139 microcontrollers. Although ECDSA signature may be generated by a 140 microcontroller, a tamper resistant resource could be used, either 141 embedded in the CPU, or in a chip such as a secure element[ISO7816]. 142 As an illustration an architecture based on micro-controller, radio 143 SoC and secure element was demonstrated in [IEEE-CCNC2018]. 145 The controller is a device with full IP connectivity. It typically 146 communicates with the constraint node thanks to the CoAP [RFC7252] 147 protocol, or other legacy protocols such as HTTPS. The controller 148 has access to the blockchain infrastructure, to which it is able to 149 forward a binary encoded transaction, signed by the constraint node. 151 2.2 An Ethereum Use Case. 153 The following figure 2, illustrates an Ethereum transaction 154 generated by a constraint node, whose total length is 118 bytes. 156 F8 74 // RLP List, length= 116 bytes 157 0C // nonce 1 byte =12 decimal 158 85 06FC23AC00 // gasPrice = 30 GWei 159 83 013880 // gasLimit = 80000 gas 160 // recipient address 20 bytes 161 94 6BAC1B75185D9051AF740AB909F81C71BBB221A6 162 80 // Null Ether Value 163 // Data 15 bytes "Temperature=25C" 164 8F 54656D70657261747572653D323543 165 1B // recovery parameter, 1 byte 166 A0 // r, 20 bytes, ECDSA r paramter 167 A9B58980F76EE6284800B82A2B5DF13E456887EC0CF426A5E5D6A738EB1784ED 168 A0 // s, 20 bytes, ECDSA s parameter 169 629633C6A3ED5FEE0FB40E2D1CF251345B885D372857B1A6C4762C9BE914281F 171 Figure 2. Illustration of an Ethereum transaction, generated by a 172 constraint node. 174 The identifier (TxId) of this transaction (i.e. its KECCAK-256 175 digest) is: 177 0xd6904d832462ae17718c69e9caa0c3f3bed458382ac1f4e43b1aadd8e94744ad 179 Given this TxId, the transaction can be retrieved in any Ethereum 180 blockchain data base, like for example: 182 https://etherscan.io/tx/0xd6904d832462ae17718c69e9caa0c3f3bed458382a 183 c1f4e43b1aadd8e94744ad 185 The transaction date (20-2018 09:52:42 PM +UTC)is published and 186 certified by the blockchain. 188 The binary encoded transaction comprises two parts, 189 - information relying on the Ethereum blockchain context, such as 190 the nonce, the gasPrice, the gasLimit, the recipient address, and an 191 Ether value. 192 - information delivered by the constraint node, data ( a temperature 193 measurement), and the ECDSA signature computed from the 32 bytes 194 private key. 196 Parameters relying on the Ethereum blockchain context MUST be 197 included in the Provisioning-Message. 198 The signed transaction MUST be included in the Transaction-Message. 200 3 Blockchain Transaction Protocol Messages Definition 202 The Blockchain Transaction Protocol comprises two messages, to be 203 included in transport protocols, such as CoAP or HTTP. 205 3.1 Provisioning Message 207 This message includes the following attributes : 208 - A type, an integer value, specifying the message content. 209 - An ordered list of values, storing the parameters of the 210 blockchain context. 212 3.1.1 Encoding example in JSON syntax 214 Here is an illustration of the provisioning message associated to 215 the Ethereum blockchain. 217 { 218 "type": 1, 219 "nonce": 12, 220 "gasPrice": 30, 221 "gasLimit": 80000, 222 "address": "6BAC1B75185D9051AF740AB909F81C71BBB221A6", 223 "value": 0 224 } 226 3.2 Transaction Message 228 This message include the following attributes 229 - A type, an integer value, specifying the message content. The zero 230 value indicates an error. 231 - The binary encoded transaction, including the signature. 233 3.2.1 Encoding example in JSON syntax 235 Here is an illustration of the transaction message associated to the 236 Ethereum blockchain. 238 { 239 "type": 1, 240 "transaction": 241 "F8740C8506FC23AC0083013880946BAC1B75185D9051AF740AB909F81C71BBB221A 242 6808F54656D70657261747572653D3235431BA0A9B58980F76EE6284800B82A2B5DF 243 13E456887EC0CF426A5E5D6A738EB1784EDA0629633C6A3ED5FEE0FB40E2D1CF2513 244 45B885D372857B1A6C4762C9BE914281F" 245 } 247 4. Blockchain Transaction Protocol Messages Binary Encoding 249 4.1 CoAP messages 251 To be Done 253 4.2 HTTP Messages 255 To be Done 257 5 IANA Considerations 259 TODO 261 6 Security Considerations 263 TODO 265 6 References 267 6.1 Normative References 269 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 270 Application Protocol (CoAP)", RFC 7252, June 2014. 272 [ISO7816] ISO 7816, "Cards Identification - Integrated Circuit Cards 273 with Contacts", The International Organization for Standardization 274 (ISO). 276 6.2 Informative References 278 [IEEE-CCNC2018] Urien,P., "An Innovative Security Architecture for 279 Low Cost Low Power IoT Devices Based on Secure Elements", IEEE CCNC 280 2018 282 7 Authors' Addresses 284 Pascal Urien 285 Telecom ParisTech 286 23 avenue d'Italie 287 75013 Paris Phone: NA 288 France Email: Pascal.Urien@telecom-paristech.fr