idnits 2.17.1 draft-gwerder-messagevortexmain-03.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 : ---------------------------------------------------------------------------- ** There are 7 instances of too long lines in the document, the longest one being 6 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 9, 2019) is 1691 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 3501 (Obsoleted by RFC 9051) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force Gwerder 3 Internet-Draft FHNW 4 Intended status: Experimental September 9, 2019 5 Expires: March 12, 2020 7 MessageVortex Protocol 8 draft-gwerder-messagevortexmain-03 10 Abstract 12 The MessageVortex (referred to as Vortex) protocol achieves different 13 degrees of anonymity, including sender, receiver, and third-party 14 anonymity, by specifying messages embedded within existing transfer 15 protocols, such as SMTP or XMPP, sent via peer nodes to one or more 16 recipients. 18 The protocol outperforms others by decoupling the transport from the 19 final transmitter and receiver. No trust is placed into any 20 infrastructure except for that of the sending and receiving parties 21 of the message. The creator of the routing block has full control 22 over the message flow. Routing nodes gain no non-obvious knowledge 23 about the messages even when collaborating. While third-party 24 anonymity is always achieved, the protocol also allows for either 25 sender or receiver anonymity. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on March 12, 2020. 44 Copyright Notice 46 Copyright (c) 2019 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (https://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 62 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 63 1.2. Protocol Specification . . . . . . . . . . . . . . . . . 5 64 1.3. Number Specification . . . . . . . . . . . . . . . . . . 5 65 2. Entities Overview . . . . . . . . . . . . . . . . . . . . . . 5 66 2.1. Node . . . . . . . . . . . . . . . . . . . . . . . . . . 5 67 2.1.1. Blocks . . . . . . . . . . . . . . . . . . . . . . . 6 68 2.1.2. NodeSpec . . . . . . . . . . . . . . . . . . . . . . 6 69 2.1.2.1. NodeSpec for SMTP nodes . . . . . . . . . . . . . 6 70 2.1.2.2. NodeSpec for XMPP nodes . . . . . . . . . . . . . 6 71 2.2. Peer Partners . . . . . . . . . . . . . . . . . . . . . . 7 72 2.3. Encryption keys . . . . . . . . . . . . . . . . . . . . . 7 73 2.3.1. Identity Keys . . . . . . . . . . . . . . . . . . . . 7 74 2.3.2. Peer Key . . . . . . . . . . . . . . . . . . . . . . 7 75 2.3.3. Sender Key . . . . . . . . . . . . . . . . . . . . . 7 76 2.4. Vortex Message . . . . . . . . . . . . . . . . . . . . . 8 77 2.5. Message . . . . . . . . . . . . . . . . . . . . . . . . . 8 78 2.6. Key and MAC specifications and usage . . . . . . . . . . 9 79 2.6.1. Asymmetric Keys . . . . . . . . . . . . . . . . . . . 9 80 2.6.2. Symmetric Keys . . . . . . . . . . . . . . . . . . . 10 81 2.7. Transport Address . . . . . . . . . . . . . . . . . . . . 10 82 2.8. Identity . . . . . . . . . . . . . . . . . . . . . . . . 10 83 2.8.1. Peer Identity . . . . . . . . . . . . . . . . . . . . 10 84 2.8.2. Ephemeral Identity . . . . . . . . . . . . . . . . . 10 85 2.8.3. Official Identity . . . . . . . . . . . . . . . . . . 11 86 2.9. Workspace . . . . . . . . . . . . . . . . . . . . . . . . 11 87 2.10. Multi-use Reply Blocks . . . . . . . . . . . . . . . . . 11 88 3. Layer Overview . . . . . . . . . . . . . . . . . . . . . . . 11 89 3.1. Transport Layer . . . . . . . . . . . . . . . . . . . . . 12 90 3.2. Blending Layer . . . . . . . . . . . . . . . . . . . . . 12 91 3.3. Routing Layer . . . . . . . . . . . . . . . . . . . . . . 12 92 3.4. Accounting Layer . . . . . . . . . . . . . . . . . . . . 13 93 4. Vortex Message . . . . . . . . . . . . . . . . . . . . . . . 13 94 4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 13 95 4.2. Message Prefix Block (MPREFIX) . . . . . . . . . . . . . 13 96 4.3. Inner Message Block . . . . . . . . . . . . . . . . . . . 14 97 4.3.1. Control Prefix Block . . . . . . . . . . . . . . . . 14 98 4.3.2. Control Blocks . . . . . . . . . . . . . . . . . . . 15 99 4.3.2.1. Header Block . . . . . . . . . . . . . . . . . . 15 100 4.3.2.2. Routing Block . . . . . . . . . . . . . . . . . . 15 101 4.3.3. Payload Block . . . . . . . . . . . . . . . . . . . . 16 102 5. General notes . . . . . . . . . . . . . . . . . . . . . . . . 16 103 5.1. Supported Symmetric Ciphers . . . . . . . . . . . . . . . 16 104 5.2. Supported Asymmetric Ciphers . . . . . . . . . . . . . . 16 105 5.3. Supported MACs . . . . . . . . . . . . . . . . . . . . . 16 106 5.4. Supported Paddings . . . . . . . . . . . . . . . . . . . 17 107 5.5. Supported Modes . . . . . . . . . . . . . . . . . . . . . 17 108 6. Blending . . . . . . . . . . . . . . . . . . . . . . . . . . 17 109 6.1. Blending in Attachments . . . . . . . . . . . . . . . . . 18 110 6.1.1. PLAIN embedding into attachments . . . . . . . . . . 18 111 6.1.2. F5 embedding into attachments . . . . . . . . . . . . 19 112 6.2. Blending into an SMTP layer . . . . . . . . . . . . . . . 19 113 6.3. Blending into an XMPP layer . . . . . . . . . . . . . . . 19 114 7. Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 115 7.1. Vortex Message Processing . . . . . . . . . . . . . . . . 20 116 7.1.1. Processing of incoming Vortex Messages . . . . . . . 20 117 7.1.2. Processing of Routing Blocks in the Workspace . . . . 22 118 7.1.3. Processing of Outgoing Vortex Messages . . . . . . . 23 119 7.2. Header Requests . . . . . . . . . . . . . . . . . . . . . 23 120 7.2.1. Request New Ephemeral Identity . . . . . . . . . . . 24 121 7.2.2. Request Message Quota . . . . . . . . . . . . . . . . 24 122 7.2.3. Request Increase of Message Quota . . . . . . . . . . 24 123 7.2.4. Request Transfer Quota . . . . . . . . . . . . . . . 25 124 7.2.5. Query Quota . . . . . . . . . . . . . . . . . . . . . 25 125 7.2.6. Request Capabilities . . . . . . . . . . . . . . . . 25 126 7.2.7. Request Nodes . . . . . . . . . . . . . . . . . . . . 25 127 7.2.8. Request Identity Replace . . . . . . . . . . . . . . 26 128 7.3. Special Blocks . . . . . . . . . . . . . . . . . . . . . 26 129 7.3.1. Error Block . . . . . . . . . . . . . . . . . . . . . 26 130 7.3.2. Requirement Block . . . . . . . . . . . . . . . . . . 26 131 7.3.2.1. Puzzle Requirement . . . . . . . . . . . . . . . 27 132 7.3.2.2. Payment Requirement . . . . . . . . . . . . . . . 27 133 7.4. Routing Operations . . . . . . . . . . . . . . . . . . . 27 134 7.4.1. Mapping Operation . . . . . . . . . . . . . . . . . . 28 135 7.4.2. Split and Merge Operations . . . . . . . . . . . . . 28 136 7.4.3. Encrypt and Decrypt Operations . . . . . . . . . . . 28 137 7.4.4. Add and Remove Redundancy Operations . . . . . . . . 28 138 7.4.4.1. Padding Operation . . . . . . . . . . . . . . . . 29 139 7.4.4.2. Apply Matrix . . . . . . . . . . . . . . . . . . 29 140 7.4.4.3. Encrypt Target Block . . . . . . . . . . . . . . 30 141 7.5. Processing of Vortex Messages . . . . . . . . . . . . . . 30 142 8. Accounting . . . . . . . . . . . . . . . . . . . . . . . . . 30 143 8.1. Accounting Operations . . . . . . . . . . . . . . . . . . 30 144 8.1.1. Time-Based Garbage Collection . . . . . . . . . . . . 31 145 8.1.2. Time-Based Routing Initiation . . . . . . . . . . . . 31 146 8.1.3. Routing Based Quota Updates . . . . . . . . . . . . . 31 147 8.1.4. Routing Based Authorization . . . . . . . . . . . . . 31 148 8.1.5. Ephemeral Identity Creation . . . . . . . . . . . . . 31 149 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 31 150 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32 151 11. Security Considerations . . . . . . . . . . . . . . . . . . . 32 152 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 153 12.1. Normative References . . . . . . . . . . . . . . . . . . 34 154 12.2. Informative References . . . . . . . . . . . . . . . . . 36 155 Appendix A. The ASN.1 schema for Vortex messages . . . . . . . . 37 156 A.1. The main VortexMessageBlocks . . . . . . . . . . . . . . 37 157 A.2. The VortexMessage Ciphers Structures . . . . . . . . . . 37 158 A.3. The VortexMessage Request Structures . . . . . . . . . . 37 159 A.4. The VortexMessage Replies Structures . . . . . . . . . . 37 160 A.5. The VortexMessage Requirements Structures . . . . . . . . 37 161 A.6. The VortexMessage Helpers Structures . . . . . . . . . . 37 162 A.7. The VortexMessage Additional Structures . . . . . . . . . 37 163 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 37 165 1. Introduction 167 Anonymisation is hard to achieve. Most previous attempts relied on 168 either trust in a dedicated infrastructure or a specialized 169 networking protocol. 171 Instead of defining a transport layer, Vortex piggybacks on other 172 transport protocols. A blending layer embeds Vortex messages 173 (VortexMessage) into ordinary messages of the respective transport 174 protocol. This layer picks up the messages, passes them to a routing 175 layer, which applies local operations to the messages, and resends 176 the new message chunks to the next recipients. 178 A processing node learns as little as possible from the message or 179 the network utilized due to the nature of the operations processed. 180 The 'onionized' structure of the protocol makes it impossible to 181 follow the trace of a message without having control over the 182 processing node. 184 MessageVortex is a protocol which allows sending and receiving 185 messages by using a routing block instead of a destination address. 186 With this approach, the sender has full control over all parameters 187 of the message flow. 189 A message is split and reassembled during transmission. Chunks of 190 the message may carry redundant information to avoid service 191 interruptions during transit. Decoy and message traffic are not 192 differentiable as the nature of the addRedundancy operation allows 193 each generated portion to be either message or decoy. Therefore, any 194 routing node is unable to distinguish between message and decoy 195 traffic. 197 After processing, a potential receiver node knows if the message is 198 destined for it (by creating a chunk with ID 1) or other nodes . Due 199 to missing keys, no other node may perform this processing. 201 This RFC begins with general terminology (see Section 2) followed by 202 an overview of the process (see Section 3). The subsequent sections 203 describe the details of the protocol. 205 1.1. Requirements Language 207 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 208 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 209 document are to be interpreted as described in [RFC2119]. 211 1.2. Protocol Specification 213 Appendix A specifies all relevant parts of the protocol in ASN.1 (see 214 [CCITT.X680.2002] and [CCITT.X208.1988]). The blocks are DER 215 encoded, if not otherwise specified. 217 1.3. Number Specification 219 All numbers within this document are, if not suffixed, decimal 220 numbers. Numbers suffixed with a small letter 'h' followed by two 221 hexadecimal digits are octets written in hexadecimal. For example, a 222 blank ASCII character (' ') is written as 20h and a capital 'K' in 223 ASCII as 4Bh. 225 2. Entities Overview 227 The following entities used in this document are defined below. 229 2.1. Node 231 The term 'node' describes any computer system connected to other 232 nodes, which support the MessageVortex Protocol. A 'node address' is 233 typically an email address, an XMPP address or other transport 234 protocol identity supporting the MessageVortex protocol. Any address 235 SHOULD include a public part of an 'identity key' to allow messages 236 to transmit safely. One or more addresses MAY belong to the same 237 node. 239 2.1.1. Blocks 241 A 'block' represents an ASN.1 sequence in a transmitted message. We 242 embed messages in the transport protocol, and these messages may be 243 of any size. 245 2.1.2. NodeSpec 247 A nodeSpec block, as specified in Appendix A.6, expresses an 248 addressable node in a unified format. The nodeSpec contains a 249 reference to the routing protocol, the routing address within this 250 protocol, and the keys required for addressing the node. This RFC 251 specifies transport layers for XMPP and SMTP. Additional transport 252 layers will require an extension to this RFC. 254 2.1.2.1. NodeSpec for SMTP nodes 256 An alternative address representation is defined that allows a 257 standard email client to address a Vortex node. An alternative 258 representation SHOULD be supported as defined below with 259 smtpAlternateSpec (its specification is noted in ABNF as in 260 [RFC5234]). For applications with QR code support, an implementation 261 SHOULD use the smtpUrl representation. 263 localPart = 264 domain = 265 email = localPart "@" domain 266 keySpec = 267 smtpAlternateSpec = localPart ".." keySpec ".." domain "@localhost" 268 smtpUrl = "vortexsmtp://" smtpAlternateSpec 270 This representation does not support quoted local part SMTP 271 addresses. 273 2.1.2.2. NodeSpec for XMPP nodes 275 Typically, a node specification follows the ASN.1 block NodeSpec. 276 For support of XMPP clients, an implementation SHOULD support the 277 jidAlternateSpec as noted below (its specification is noted in ABNF 278 as in [RFC5234]). 280 localPart = 281 domain = 282 resourcePart = 283 jid = localPart "@" domain [ "/" resourcePart ] 284 keySpec = ; 285 jidAlternateSpec = localPart ".." keySpec ".." 286 domain "@localhost" [ "/" resourcePart ] 287 jidUrl = "vortexxmpp://" jidAlternateSpec 289 2.2. Peer Partners 291 Two or more message sending or receiving entities are referred to as 292 'peer partners.' One partner sends a message, and all others receive 293 one or more messages. Peer partners are message specific, and each 294 partner always connects directly to a node. 296 2.3. Encryption keys 298 Several keys are required for a Vortex message. For identities and 299 ephemeral identities (see below), we use asymmetric keys, while 300 symmetric keys are used for message encryption. 302 2.3.1. Identity Keys 304 Every participant of the network includes an asymmetric key, which 305 SHOULD be either an EC key with a minimum length of 384 bits or an 306 RSA key with a minimum length of 2048 bits. 308 The public key must be known by all parties writing to or through the 309 node. 311 2.3.2. Peer Key 313 Peer keys are symmetrical keys transmitted with a Vortex message and 314 are always known to the node sending the message, the node receiving 315 the message, and the creator of the routing block. 317 A peer key is included in the Vortex message as well as the building 318 instructions for subsequent Vortex messages (see RoutingCombo in 319 Appendix A). 321 2.3.3. Sender Key 323 The sender key is a symmetrical key protecting the identity and 324 routing block of a Vortex message. It is encrypted with the 325 receiving peer key and prefixed to the identity block. This key 326 further decouples the identity and processing information from the 327 previous key. 329 A sender key is known to only one peer of a Vortex message and the 330 creator of the routing block. 332 2.4. Vortex Message 334 The term 'Vortex message' represents a single transmission between 335 two routing layers. A message adapted to the transport layer by the 336 blending layer is called a 'blended Vortex message' (see Section 3). 338 A complete Vortex message contains the following items: 340 o The peer key, which is encrypted with the host key of the node and 341 stored in a prefixBlock, protects the inner Vortex message 342 (innerMessageBlock). 344 o The small padding guarantees that a replayed routing block with 345 different content does not look the same. 347 o The sender key, also encrypted with the host key of the node, 348 protects the identity and routing block. 350 o The identity block, protected by the sender key, contains 351 information about the ephemeral identity of the sender, replay 352 protection information, header requests (optional), and a 353 requirement reply (optional). 355 o The routing block, protected by the sender key, contains 356 information on how subsequent messages are processed, assembled, 357 and blended. 359 o The payload block, protected by the peer key, contains payload 360 chunks for processing. 362 2.5. Message 364 A message is content to be transmitted from a single sender to a 365 recipient. The sender uses a routing block either built itself or 366 provided by the receiver to perform the transmission. While a 367 message may be anonymous, there are different degrees of anonymity as 368 described by the following. 370 o If the sender of a message is not known to anyone else except the 371 sender, then this degree is referred to as 'sender anonymity.' 373 o If the receiver of a message is not known to anyone else except 374 the receiver, then the degree is 'receiver anonymity.' 376 o If an attacker is unable to determine the content, original 377 sender, and final receiver, then the degree is considered 'third- 378 party anonymity.' 380 o If a sender or a receiver may be determined as one of a set of 381 entities, then it is referred to as k-anonymity[KAnon]. 383 A message is always MIME encoded as specified in [RFC2045]. 385 2.6. Key and MAC specifications and usage 387 MessageVortex uses a unique encoding for keys that is designed to be 388 small and flexible while maintaining a specific base structure. 390 The following key structures are available: 392 o SymmetricKey 394 o AsymmetricKey 396 MAC does not require a complete structure containing specs and 397 values, and only a MacAlgorithmSpec is available. The following 398 sections outline the constraints for specifying parameters of these 399 structures where a node MUST NOT specify any parameter more than 400 once. 402 If a crypto mode is specified requiring an IV, then a node MUST 403 provide the IV when specifying the key. 405 2.6.1. Asymmetric Keys 407 Nodes use asymmetric keys for identifying peer nodes (i.e., 408 identities) and encrypting symmetric keys (for subsequent 409 de-/encryption of the payload or blocks). All asymmetric keys MUST 410 contain a key type specifying a strictly-normed key. Also, they MUST 411 contain a public part of the key encoded as an X.509 container and a 412 private key specified in PKCS#8 wherever possible. 414 RSA and EC keys MUST contain a keySize parameter. All asymmetric 415 keys SHOULD contain a padding parameter, and a node SHOULD assume 416 PKCS#1 if no padding is specified. 418 NTRU specification MUST provide the parameters "n", "p", and "q". 420 2.6.2. Symmetric Keys 422 Nodes use symmetric keys for encrypting payloads and control blocks. 423 These symmetric keys MUST contain a key type specifying a key, which 424 MUST be in an encoded form. 426 A node MUST provide a keySize parameter if the key (or, equivalently, 427 the block) size is not standardized or encoded in the name. All 428 symmetric key specifications MUST contain a mode and padding 429 parameter. A node MAY list multiple padding or mode parameters in a 430 ReplyCapability block to offer the recipient a free choice. 432 2.7. Transport Address 434 The term 'transport address' represents the token required to address 435 the next immediate node on the transport layer. An email transport 436 layer would have SMTP addresses, such as 'vortex@example.com,' as the 437 transport address. 439 2.8. Identity 441 2.8.1. Peer Identity 443 The peer identity may contain the following information of a peer 444 partner. 446 o A transport address (always) and the public key of this identity, 447 given there is no recipient anonymity. 449 o A routing block, which may be used to contact the sender. If 450 striving for recipient anonymity, then this block is required. 452 o The private key, which is only known by the owner of the identity. 454 2.8.2. Ephemeral Identity 456 Ephemeral identities are temporary identities created on a single 457 node. These identities MUST NOT relate to another identity on any 458 other node so that they allow bookkeeping for a node. Each ephemeral 459 identity has a workspace assigned, and may also have the following 460 items assigned. 462 o An asymmetric key pair to represent the identity. 464 o A validity time of the identity. 466 2.8.3. Official Identity 468 An official identity may have the following items assigned. 470 o Routing blocks used to reply to the node. 472 o A list of assigned ephemeral identities on all other nodes and 473 their projected quotas. 475 o A list of known nodes with the respective node identity. 477 2.9. Workspace 479 Every official or ephemeral identity has a workspace, which consists 480 of the following elements. 482 o Zero or more routing blocks to be processed. 484 o Slots for a payload block sequentially numbered. Every slot: 486 * MUST contain a numerical ID identifying the slot. 488 * MAY contain payload content. 490 * If a block contains payload, then it MUST contain a validity 491 period. 493 2.10. Multi-use Reply Blocks 495 'Multi-use reply blocks' (MURB) are a special type routing block sent 496 to a receiver of a message or request. A sender may use such a block 497 one or several times to reply to the sender linked to the ephemeral 498 identity, and it is possible to achieve sender anonymity using MURBs. 500 3. Layer Overview 502 The protocol is designed in four layers as shown in Figure 1. 504 +------------------------------------------------------------------+ 505 | Vortex Node | 506 | +--------------------------------------------------------------+ | 507 | | Accounting | | 508 | |______________________________________________________________| | 509 | | 510 | +--------------------------------------------------------------+ | 511 | | Routing | | 512 | |______________________________________________________________| | 513 | | 514 | +---------------------------+ +--------------------------------+ | 515 | | Blending | | Blending | | 516 | |___________________________| |________________________________| | 517 |__________________________________________________________________| 518 +---------------------------+ +--------------+ +---------------+ 519 | Transport | | Transport in | | Transport out | 520 |___________________________| |______________| |_______________| 522 Figure 1: Layer overview 524 Every participating node MUST implement the layer's blending, 525 routing, and accounting. There MUST be at least one incoming and one 526 outgoing transport layer available to a node. All blending layers 527 SHOULD connect to the respective transport layers for sending and 528 receiving packets. 530 3.1. Transport Layer 532 The transport layer transfers the blended Vortex messages to the next 533 vortex node and stores it until the next blending layer picks up the 534 message. 536 The transport layer infrastructure SHOULD NOT be specific to 537 anonymous communication and should contain significant portions of 538 non-Vortex traffic. 540 3.2. Blending Layer 542 The blending layer embeds blended Vortex Message into the transport 543 layer data stream and extracts the packets from the transport layer. 545 3.3. Routing Layer 547 The routing layer expands information contained in MessageVortex 548 packets, processes them, and passes generated packets to the 549 respective blending layer. 551 3.4. Accounting Layer 553 The accounting layer tracks all ephemeral identities authorized to 554 use a MessageVortex node, and verifies the available quotas to an 555 ephemeral identity. 557 4. Vortex Message 559 4.1. Overview 561 Figure 2 shows a Vortex message. The enclosed sections denote 562 encrypted blocks, and the three or four letter abbreviations denote 563 the key required for decryption. The abbreviation k_h stands for the 564 asymmetric host key, and sk_p is the symmetric peer key. The 565 receiving node obtains this key by decrypting MPREFIX with its host 566 key k_h. Then, sk_s is the symmetric sender key. When decrypting 567 the MPREFIX block, the node obtains this key. The sender key 568 protects the header and routing blocks by guaranteeing the node 569 assembling the message does not know about upcoming identities, 570 operations, and requests. The peer key protects the message, 571 including its structure, from third-party observers. 573 +-+---+-+-+---+-+---+-+-+---+-+-+---+-+-------+-+ 574 | | | | | | | C | | | | | | R | | | | 575 | | | | | | | P | | | H | | | O | | | | 576 | | M | | | P | | R | | | E | | | U | | P | | 577 | | P | | | A | | E | | | A | | | T | | A | | 578 | | R | | | D | | F | | | D | | | I | | Y | | 579 | | E | | | D | | I | | | E | | | N | | L | | 580 | | F | | | I | | X | | | R | | | G | | O | | 581 | | I | | | N | +---+ | |___| | |___| | A | | 582 | | X | | | G | k_h | sk_s | sk_s | D | | 583 | |___| | |___|_______|_______|_______|_______| | 584 | k_h | sk_p | 585 |_______|_______________________________________| 587 Figure 2: Vortex message overview 589 4.2. Message Prefix Block (MPREFIX) 591 The PrefixBlock contains a symmetrical key as defined in Appendix A.1 592 and is encrypted using the host key of the receiving peer host. The 593 symmetric key utilized MUST be from the set advertised by a 594 CapabilitiesReplyBlock (see Section 7.2.6). A node MAY choose any 595 parameters omitted in the CapabilitiesReplyBlock freely, unless 596 stated otherwise in Section 7.2.6. A node SHOULD avoid sending 597 unencrypted PrefixBlocks, and a prefix block MUST contain the same 598 forward-secret as the other prefix as well as the routing and header 599 blocks. A host MAY reply to a message with an unencrypted message 600 block, but any reply to a message SHOULD be encrypted. 602 The sender MUST choose a key which may be encrypted with the host key 603 in the respective PrefixBlock using the padding advertised by the 604 CapabilitiesReplyBlock. 606 4.3. Inner Message Block 608 A node MUST always encrypt an InnerMessageBlock with the symmetric 609 key of the PrefixBlock to hide the inner structure of the message. 610 The InnerMessageBlock SHOULD always accommodate four or more payload 611 chunks. 613 An InnerMessageBlock always starts with a padding block, which 614 guarantees that when using the same routing block multiple times, its 615 binary structure is not repeated throughout the messages of the same 616 routing block. The padding MUST be the first 16 bytes of the first 617 four non-empty payload chunks (i.e., PayloadChunks). If a payload 618 chunk is shorter than 16 bytes, then the content of the padding 619 SHOULD be filled with zero-valued bytes (00h) from the end up to the 620 required number of bytes. An inner message block (i.e., 621 InnerMessageBlock) SHOULD contain at least four payload chunks with a 622 size of 16 bytes or larger. If there are less than four payload 623 chunks, then the padding MUST contain a random sequence of 16 bytes 624 for those missing, and a node MUST NOT reuse random sequences. 626 An InnerMessageBlock contains so-called forwardSecrets, a random 627 number that MUST be the same in the HeaderBlock, RoutingBlock, and 628 PrefixBlock. Nodes receiving messages containing non-matching 629 forwardSecrets MUST discard these messages and SHOULD NOT send an 630 error message. If a node receives too many messages with illegal 631 forward secrets, then the node SHOULD delete this identity. A node 632 receiving a message with a broken forwardSecret SHOULD treat the 633 block as a replayed block and discard it regardless of a valid 634 forwardSecret. Any replay within the replay protection time MUST be 635 discarded regardless if the forward secret is correct. 637 4.3.1. Control Prefix Block 639 Control prefix (CPREFIX) and MPREFIX blocks share the same structure 640 and logic as well as containing the sender key sk_s. If an MPREFIX 641 block is unencrypted, a node MAY omit the CPREFIX block. An omitted 642 CPREFIX block results in unencrypted control blocks (e.g., the 643 HeaderBlock and RoutingBlock). 645 A prefix block MUST contain the same forwardSecret as the other 646 prefix, the routing block, and header block. 648 4.3.2. Control Blocks 650 The control blocks of the HeaderBlock and a RoutingBlock contain the 651 core information to process the payload. 653 4.3.2.1. Header Block 655 The header block (see HeaderBlock in Appendix A) contains the 656 following information. 658 o It MUST contain the local ephemeral identity of the routing block 659 builder. 661 o It MAY contain header requests. 663 o It MAY contain the solution to a PuzzleRequired block previously 664 opposed in a header request. 666 The list of header requests MAY be one of the following. 668 o Empty. 670 o Contain a single identity create request (HeaderRequestIdentity). 672 o Contain a single increase quota request. 674 If a header block violates these rules, then a node MUST NOT reply to 675 any header request. The payload and routing blocks SHOULD still be 676 added to the workspace and processed if the message quota is not 677 exceeded. 679 4.3.2.2. Routing Block 681 The routing block (see RoutingBlock in Appendix A) contains the 682 following information. 684 o It MUST contain a serial number uniquely identifying the routing 685 block of this user. The serial number MUST be unique during the 686 lifetime of the routing block. 688 o It MUST contain the same forward secret as the two prefix blocks 689 and the header block. 691 o It MAY contain assembly and processing instructions for subsequent 692 messages. 694 o It MAY contain a reply block for messages assigned to the owner of 695 the identity. 697 4.3.3. Payload Block 699 Each InnerMessageBlock with routing information SHOULD contain at 700 least four PayloadChunks. 702 5. General notes 704 The MessageVortex protocol is a modular protocol that allows the use 705 of different encryption algorithms. For its operation, a Vortex node 706 SHOULD always support at least two distinct types of algorithms, 707 paddings or modes such that they rely on two mathematical problems. 709 5.1. Supported Symmetric Ciphers 711 A node MUST support the following symmetric ciphers. 713 o AES128 (see [FIPS-AES] for AES implementation details). 715 o AES256. 717 o CAMELLIA128 (see [RFC3657] Chapter 3 for Camellia implementation 718 details). 720 o CAMELLIA256. 722 A node SHOULD support any standardized key larger than the smallest 723 key size. 725 A node MAY support Twofish ciphers (see [TWOFISH]). 727 5.2. Supported Asymmetric Ciphers 729 A node MUST support the following asymmetric ciphers. 731 o RSA with key sizes greater or equal to 2048 ([RFC8017]). 733 o ECC with named curves secp384r1, sect409k1 or secp521r1 (see 734 [SEC1]). 736 5.3. Supported MACs 738 A node MUST support the following Message Authentication Codes (MAC). 740 o SHA3-256 (see [ISO-10118-3] for SHA implementation details). 742 o RipeMD160 (see [ISO-10118-3] for RIPEMD implementation details). 744 A node SHOULD support the following MACs. 746 o SHA3-512. 748 o RipeMD256. 750 o RipeMD512. 752 5.4. Supported Paddings 754 A node MUST support the following paddings specified in [RFC8017]. 756 o PKCS1 (see [RFC8017]). 758 o PKCS7 (see [RFC5958]). 760 5.5. Supported Modes 762 A node MUST support the following modes. 764 o CBC (see [RFC1423]) such that the utilized IV must be of equal 765 length as the key. 767 o EAX (see [EAX]). 769 o GCM (see [RFC5288]). 771 o NONE (only used in special cases, see Section 11). 773 A node SHOULD NOT use the following modes. 775 o NONE (except as stated when using the addRedundancy function). 777 o ECB. 779 A node SHOULD support the following modes. 781 o CTR ([RFC3686]). 783 o CCM ([RFC3610]). 785 o OCB ([RFC7253]). 787 o OFB ([MODES]). 789 6. Blending 791 Each node supports a fixed set of blending capabilities, which may be 792 different for incoming and outgoing messages. 794 The following sections describe the blending mechanism. There are 795 currently two blending layers specified with one for the Simple Mail 796 Transfer Protocol (SMTP, see [RFC5321]) and the second for the 797 Extensible Messaging and Presence Protocol (XMPP, see [RFC6120]). 798 All nodes MUST at least support "encoding=plain:0,256". 800 6.1. Blending in Attachments 802 There are two types of blending supported when using attachments. 804 o Plain binary encoding with offset (PLAIN). 806 o Embedding with F5 in an image (F5). 808 A node MUST support PLAIN blending for reasons of interoperability 809 whereas a node MAY support blending using F5. 811 6.1.1. PLAIN embedding into attachments 813 A blending layer embeds a VortexMessage in a carrier file with an 814 offset for PLAIN blending. For replacing a file start, a node MUST 815 use the offset 0. The routing node MUST choose the payload file for 816 the message, and SHOULD use a credible payload type (e.g., MIME type) 817 with high entropy. Furthermore, it SHOULD prefix a valid header 818 structure to avoid easy detection of the Vortex message. Finally, a 819 routing node SHOULD use a valid footer, if any, to a payload file to 820 improve blending. 822 The blended Vortex message is embedded in one or more message chunks, 823 each starting with two variable length unsigned integers. The 824 integer starts with the LSB, and if bit 7 is set, then there is 825 another byte following. There cannot be more than four bytes where 826 the last, fourth byte is always 8 bit. The three preceding bytes 827 have a payload of seven bits each, which results in a maximum number 828 of 2^29 bits. The first of the extracted numbers reflects the number 829 of bytes in the chunk after the length descriptors. The second 830 contains the number of bytes to be skipped to reach the next chunk. 831 There exists no "last chunk" indicator. 833 position:00h 02h 04h 06h 08h ... 400h 402h 404h 406h 408h 40Ah 834 value: 01 02 03 04 05 06 07 08 09 ... 01 05 0A 0B 0C 0D 0E 0F f0 03 12 13 836 Embedding: "(plain:1024)" 838 Result: 0A 13 (+ 494 omited bytes; then skip 12 bytes to next chunk) 840 A node SHOULD offer at least one PLAIN blending method and MAY offer 841 multiple offsets for incoming Vortex messages. 843 A plain blending is specified as the following. 845 plainEncoding = "("plain:" 846 [ "," ]* ")" 848 6.1.2. F5 embedding into attachments 850 For F5, a blending layer embeds a Vortex message into a jpeg file 851 according to [F5]. The password for blending may be public, and a 852 routing node MAY advertise multiple passwords. The use of F5 adds 853 approximately tenfold transfer volume to the message. A routing 854 block building node SHOULD only use F5 blending where appropriate. 856 A blending in F5 is specified as the following. 858 f5Encoding = "(F5:" [ "," ]* ")" 860 Commas and backslashes in passwords MUST be escaped with a backslash 861 whereas closing brackets are treated as normal password characters 862 unless they are the final character of the encoding specification 863 string. 865 6.2. Blending into an SMTP layer 867 Email messages with content MUST be encoded with Multipurpose 868 Internet Mail Extensions (MIME) as specified in [RFC2045]. All nodes 869 MUST support BASE64 encoding and MUST test all sections of a MIME 870 message for the presence of a VortexMessage. 872 A vortex message is present if a block containing the peer key at the 873 known offset of any MIME part decodes correctly. 875 A node SHOULD support SMTP blending for sending and receiving. For 876 sending SMTP, the specification in [RFC5321] must be used. TLS 877 layers MUST always be applied when obtaining messages using POP3 (as 878 specified in [RFC1939] and [RFC2595]) or IMAP (as specified in 879 [RFC3501]). Any SMTP connection MUST employ a TLS encryption when 880 passing credentials. 882 6.3. Blending into an XMPP layer 884 For interoperability, an implementation SHOULD provide XMPP blending. 886 Blending into XMPP traffic is performed using the [XEP-0231] 887 extension of the XMPP protocol. 889 PLAIN and F5 blending are acceptable for this transport layer. 891 7. Routing 893 7.1. Vortex Message Processing 895 7.1.1. Processing of incoming Vortex Messages 897 An incoming message is considered initially unauthenticated. A node 898 should consider a VortexMessage as authenticated as soon as the 899 ephemeral identity is known and is not temporary. 901 For an unauthenticated message, the following rules apply. 903 o A node MUST ignore all Routing blocks. 905 o A node MUST ignore all Payload blocks. 907 o A node SHOULD accept identity creation requests in unauthenticated 908 messages. 910 o A node MUST ignore all other header requests except identity 911 creation requests. 913 o A node MUST ignore all identity creation requests belonging to an 914 existing identity. 916 A message is considered authenticated as soon as the identity used in 917 the header block is known and not temporary. A node MUST NOT treat a 918 message as authenticated if the specified maximum number of replays 919 is reached. For authenticated messages, the following rules apply. 921 o A node MUST ignore identity creation requests. 923 o A node MUST replace the current reply block with the reply block 924 provided in the routing block, if any. The node MUST keep the 925 reply block if none is provided. 927 o A node SHOULD process all header requests. 929 o A node SHOULD add all routing blocks to the workspace. 931 o A node SHOULD add all payload blocks to the workspace. 933 A routing node MUST decrement the message quota by one if a received 934 message is authenticated, valid, and contains at least one payload 935 block. If a message is identified as duplicate according to the 936 reply protection, then a node MUST NOT decrement the message quota. 938 Reflected in pseudo code, the message processing works according to 939 the following. 941 function incomming_message(VortexMessage blendedMessage) { 942 try{ 943 msg = unblend( blendedMessage ); 944 if( not msg ) { 945 // Abort processing 946 throw exception( "no embedded message found" ) 947 } else { 948 hdr = get_header( msg ) 949 if( not known_identity( hdr.identity ) { 950 if( get_requests( hdr ) contains HeaderRequestIdentity ) { 951 create_new_identity( hdr ).set_temporary( true ) 952 send_message( create_requirement( hdr ) ) 953 } else { 954 // Abort processing 955 throw exception( "identity unknown" ) 956 } 957 } else { 958 if( is_duplicate_or_replayed( msg ) ) { 959 // Abort processing 960 throw exception "duplicate or replayed message" ) 961 } else { 962 if( get_accounting( hdr.identity ).is_temporary() ) { 963 if( not verify_requirement( hdr.identity, msg ) ) { 964 get_accounting( hdr.identity ).set_temporary( false ) 965 } 966 } 967 if( get_accounting( hdr ).is_temporary() ) { 968 throw exception( "no processing on temporary identity" ) 969 } 971 // Message authenticated 972 get_accounting( hdr.identity ).register_for_replay_protection( msg ) 973 if( not verify_mtching_forward_secrets( msg ) ) { 974 throw exception( "forward secret missmatch" ) 975 } 976 if( contains_payload( msg ) ) { 977 if( get_accounting( hdr.identity ).decrement_message_quota() ) { 978 while index,nextPayloadBlock = get_next_payload_block( msg ) { 979 add_workspace( header.identity, index, nextPayloadBlock ) 980 } 981 while nextRoutingBlock = get_next_routing_block( msg ) { 982 add_workspace( hdr.identity, add_routing( nextRoutingBlock ) ) 983 } 984 process_reserved_mapping_space( msg ) 985 while nextRequirement = get_next_requirement( hdr ) { 986 add_workspace( hdr.identity, nextRequirement ) 987 } 988 } else { 989 throw exception( "Message quota exceeded" ) 990 } 991 } 992 } 993 } 994 } catch( exception e ) { 995 // Message processing failed 996 throw e; 997 } 998 } 1000 7.1.2. Processing of Routing Blocks in the Workspace 1002 A routing workspace consists of the following items. 1004 o The identity it links to, which determines the lifetime of the 1005 workspace. 1007 o The linked routing combos (RoutingCombo). 1009 o A payload chunk space with the following multiple subspaces 1010 available: 1012 * ID 0 represents a message to be embedded (when reading) or a 1013 message to be extracted to the user (when written). 1015 * ID 1 to ID maxPayloadBlocks represent the payload chunk slots 1016 in the target message. 1018 * All blocks between ID maxPayloadBlocks + 1 to ID 32767 belong 1019 to a temporary routing block-specific space. 1021 * All blocks between ID 32768 to ID 65535 belong to a shared 1022 space available to all operations of the identity. 1024 The accounting layer typically triggers processing and represents 1025 either a cleanup action or a routing event. A cleanup event deletes 1026 the following information from all workspaces. 1028 o All processed routing combos. 1030 o All routing combos with expired usagePeriod. 1032 o All payload chunks exceeding the maxProcess time. 1034 o All expired objects. 1036 o All expired puzzles. 1038 o All expired identities. 1040 o All expired replay protections. 1042 Note that maxProcessTime reflects the number of seconds since the 1043 arrival of the last octet of the message at the transport layer 1044 facility. A node SHOULD NOT take additional processing time (e.g., 1045 for anti-UBE or anti-virus) into account. 1047 The accounting layer triggers routing events occurring at least the 1048 minProcessTime after the last octet of the message arrived at the 1049 routing layer. A node SHOULD choose the latest possible moment at 1050 which the peer node receives the last octet of the assembled message 1051 before the maxProcessTime is reached. The calculation of this last 1052 point in time where a message may be set SHOULD always assume that 1053 the target node is working. A sending node SHOULD choose the time 1054 within these bounds randomly. An accounting layer MAY trigger 1055 multiple routing combos in bulk to further obfuscate the identity of 1056 a single transport message. 1058 First, the processing node escapes the payload chunk at ID 0 if 1059 needed (e.g., a non-special block starting with a backslash). Next, 1060 it executes all processing instructions of the routing combo in the 1061 specified sequence. If an instruction fails, then the block at the 1062 target ID of the operation remains unchanged. The routing layer 1063 proceeds with the subsequent processing instructions by ignoring the 1064 error. For a detailed description of the operations, see 1065 Section 7.4. If a node succeeds in building at least one payload 1066 chunk, then a VortexMessage is composed and passed to the blending 1067 layer. 1069 7.1.3. Processing of Outgoing Vortex Messages 1071 The blending layer MUST compose a transport layer message according 1072 to the specification provided in the routing combo. It SHOULD choose 1073 any decoy message or steganographic carrier in such a way that the 1074 dead parrot syndrome, as specified in [DeadParrot], is avoided. 1076 7.2. Header Requests 1078 Header requests are control requests for the anonymization system. 1079 Messages with requests or replies only MUST NOT affect any quota. 1081 7.2.1. Request New Ephemeral Identity 1083 Requesting a new ephemeral identity is performed by sending a message 1084 containing a header block with the new identity and an identity 1085 creation request (HeaderRequestIdentity) to a node. The node MAY 1086 send an error block (see Section 7.3.1) if it rejects the request. 1088 If a node accepts an identity creation request, then it MUST send a 1089 reply. To accept a request without a requirement, an accepting node 1090 MUST send back a special block containing "no error." To accept a 1091 block with a requirement, an accepting node MUST send a special block 1092 containing a requirement block. 1094 A node SHOULD NOT reply to clear-text requests if the node does not 1095 want to officially disclose its identity as a Vortex node. A node 1096 MUST reply with an error block if a valid identity is used for the 1097 request. 1099 7.2.2. Request Message Quota 1101 Any valid ephemeral identity may request an increase of the current 1102 message quota to a specific value at any time. The request MUST 1103 include a reply block in the header and may contain other parts. If 1104 a requested value is lower than the current quota, then the node 1105 SHOULD NOT refuse the quota request and SHOULD send a "no error" 1106 status. 1108 A node SHOULD reply to a HeaderRequestIncreaseMessageQuota request 1109 (see Appendix A) of a valid ephemeral identity. The reply MUST 1110 include a requirement, an error message or a "no error" status 1111 message. 1113 7.2.3. Request Increase of Message Quota 1115 A node may request to increase the current message quota by sending a 1116 HeaderRequestIncreaseMessageQuota request to the routing node. The 1117 value specified within the node is the new quota. 1118 HeaderRequestIncreaseMessageQuota requests MUST include a reply 1119 block, and a node SHOULD NOT use a previously sent MURB to reply. 1121 If the requested quota is higher than the current quota, then the 1122 node SHOULD send a "no error" reply. If the requested quota is not 1123 accepted, then the node SHOULD send a requestedQuotaOutOfBand reply. 1125 A node accepting the request MUST send a RequirementBlock or a "no 1126 error block." 1128 7.2.4. Request Transfer Quota 1130 Any valid ephemeral identity may request to increase the current 1131 transfer quota to a specific value at any time. The request MUST 1132 include a reply block in the header and may contain other parts. If 1133 a requested value is lower than the current quota, then the node 1134 SHOULD NOT refuse the quota request and SHOULD send a "no error" 1135 status. 1137 A node SHOULD reply to a HeaderRequestIncreaseTransferQuota request 1138 (see Appendix A) of a valid ephemeral identity. The reply MUST 1139 include a requirement, an error message or a "no error" status 1140 message. 1142 7.2.5. Query Quota 1144 Any valid ephemeral identity may request the current message and 1145 transfer quota. The request MUST include a reply block in the header 1146 and may contain other parts. 1148 A node MUST reply to a HeaderRequestQueryQuota request (see 1149 Appendix A), which MUST include the current message quota and the 1150 current message transfer quota. The reply to this request MUST NOT 1151 include a requirement. 1153 7.2.6. Request Capabilities 1155 Any node MAY request the capabilities of another node, which include 1156 all information necessary to create a parseable VortexMessage. Any 1157 node SHOULD reply to any encrypted HeaderRequestCapability. 1159 A node SHOULD NOT reply to clear-text requests if the node does not 1160 want to officially disclose its identity as a Vortex node. A node 1161 MUST reply if a valid identity is used for the request, and it MAY 1162 reply to unknown identities. 1164 7.2.7. Request Nodes 1166 A node may ask another node for a list of routing node addresses and 1167 keys, which may be used to bootstrap a new node and add routing nodes 1168 to increase the anonymization of a node. The receiving node of such 1169 a request SHOULD reply with a requirement (e.g., 1170 RequirementPuzzleRequired). 1172 A node MAY reply to a HeaderRequest request (see Appendix A) of a 1173 valid ephemeral identity, and the reply MUST include a requirement, 1174 an error message or a "no error" status message. A node MUST NOT 1175 reply to an unknown identity, and SHOULD always reply with the same 1176 result set to the same identity. 1178 7.2.8. Request Identity Replace 1180 This request type allows a receiving node to replace an identity with 1181 the identity provided in the message, and is required if an adversary 1182 manages to deny the usage of a node (e.g., by deleting the 1183 corresponding transport account). Any sending node may recover from 1184 such an attack by sending a valid authenticated message to another 1185 identity to provide the new transport and key details. 1187 A node SHOULD reply to such a request from a valid known identity, 1188 and the reply MUST include an error message or a "no error" status 1189 message. 1191 7.3. Special Blocks 1193 Special blocks are payload messages that reflect messages from one 1194 node to another and are not visible to the user. A special block 1195 starts with the character sequence '\special' (or 5Ch 73h 70h 65h 63h 1196 69h 61h 6Ch) followed by a DER encoded special block (SpecialBlock). 1197 Any non-special message decoding to ID 0 in a workspace starting with 1198 this character sequence MUST escape all backslashes within the 1199 payload chunk with an additional backslash. 1201 7.3.1. Error Block 1203 An error block may be sent as a reply where specified as a payload. 1204 The error block is embedded in a special block and sent with any 1205 provided reply block. Error messages SHOULD contain the serial 1206 number of the offending header block and MAY contain human-readable 1207 text providing additional messages about the error. 1209 7.3.2. Requirement Block 1211 If a node is receiving a requirement block, then it MUST assume that 1212 the request block is accepted, is not yet processed, and is to be 1213 processed if it meets the contained requirement. A node MUST process 1214 a request as soon as the requirement is fulfilled, and MUST resend 1215 the request as soon as it meets the requirement. 1217 A node MAY reject a request, accept a request without a requirement, 1218 accept a request upon payment (RequirementPaymentRequired) or accept 1219 a request upon solving a proof of work puzzle 1220 (RequirementPuzzleRequired). 1222 7.3.2.1. Puzzle Requirement 1224 If a node requests a puzzle, then it MUST send a 1225 RequirementPuzzleRequired block. The puzzle requirement is solved if 1226 the node receiving the puzzle is replying with a header block that 1227 contains the puzzle block, and the hash of the encoded block begins 1228 with the bit sequence mentioned in the puzzle within the period 1229 specified in the field 'valid.' 1231 To solve a puzzle posed by a node, a Vortex Message needs to be sent 1232 to the requesting node, which MUST contain a header block that 1233 includes the puzzle block and MUST have a MAC fingerprint starting 1234 with the bit sequence as specified in the challenge. A node 1235 calculates the MAC from the unencrypted DER encoded HeaderBlock with 1236 the algorithm specified by the node. To meet this requirement, a 1237 node adds a proofOfWork field to the HeaderBlock. 1239 7.3.2.2. Payment Requirement 1241 If a node requests a payment, then it MUST send a 1242 RequirementPaymentRequired block. As soon as the requested fee is 1243 paid and confirmed, the requesting node MUST send a "no error" status 1244 message. The usage period 'valid' describes the period during which 1245 the payment may be carried out. A node MUST accept the payment if 1246 occurring within the 'valid' period but confirmed later. A node 1247 SHOULD return all unsolicited payments to the sending address. 1249 7.4. Routing Operations 1251 Routing operations are contained in a routing block and processed 1252 upon arrival of a message or when compiling a new message. All 1253 operations are reversible, and no operation is available for 1254 generating decoy traffic, which may be used through encryption of an 1255 unpadded block or the addRedundancy operation. 1257 All payload chunk blocks inherit the validity time from the message 1258 routing combos as arrival time + max(maxProcessTime). 1260 When applying an operation to a source block, the resulting target 1261 block inherits the expiration of the of the source block. When 1262 multiple expiration times exist, the one furthest in the future is 1263 applied to the target block. If the operation fails, then the target 1264 expiration remains unchanged. 1266 7.4.1. Mapping Operation 1268 The straightforward mapping operation is used in inOperations of a 1269 routing block to map the routing block's specific blocks to a 1270 permanent workspace. 1272 7.4.2. Split and Merge Operations 1274 The split and merge operations allow splitting and recombining 1275 message chunks. A node MUST adhere to the following constraints. 1277 o The operation must be applied at an absolute (measuring in bytes) 1278 or relative (measured as a float value in the range 0>value>100) 1279 position. 1281 o All calculations must be performed according to IEEE 754 [IEEE754] 1282 and in 64-bit precision. 1284 o If a relative value is a non-integer result, then a floor 1285 operation (i.e., cutting off all non-integer parts) determines the 1286 number of bytes. 1288 o If an absolute value is negative, then the size represents the 1289 number of bytes counted from the end of the message chunk. 1291 o If an absolute value is greater than the number of bytes in a 1292 block, then all bytes are mapped to the respective target block, 1293 and the other target block becomes a zero byte-sized block. 1295 An operation MUST fail if relative values are equal to, or less than, 1296 zero. An operation MUST fail if a relative value is equal to, or 1297 greater than, 100. All floating point operations must be performed 1298 according to [IEEE754] and in 64-bit precision. 1300 7.4.3. Encrypt and Decrypt Operations 1302 Encryption and decryption are executed according to the standards 1303 mentioned above. An encryption operation encrypts a block 1304 symmetrically and places the result in the target block. The 1305 parameters MUST contain IV, padding or cipher modes. An encryption 1306 operation without a valid parameter set MUST fail. 1308 7.4.4. Add and Remove Redundancy Operations 1310 The addRedundancy and removeRedundancy operations are core to the 1311 protocol. They may be used to split messages and distribute message 1312 content across multiple routing nodes. The operation is separated 1313 into three steps. 1315 1. Pad the input block to a multiple of the key block size in the 1316 resulting output blocks. 1318 2. Apply a Vandermonde matrix with the given sizes. 1320 3. Encrypt each resulting block with a separate key. 1322 The following sections describe the order of the operations within an 1323 addRedundancy operation. For a removeRedundancy operation, invert 1324 the functions and order. If the removeRedundancy has more than the 1325 required blocks to recover the information, then it should take only 1326 the required number beginning from the smallest. If a seed and PRNG 1327 are provided, then the removeRedundancy operation MAY test any 1328 combination until recovery is successful. 1330 7.4.4.1. Padding Operation 1332 A processing node calculates the final length of all output blocks 1333 including redundancy. This is done by L=roof((+4)/)*. The block is prepended with a 32-bit unit length indicator 1336 in bytes (little-endian). This length indicator, i, is calculated by 1337 i=*randominteger\cdot L. The remainder of 1338 the input block, up to length L, is padded with random data. A 1339 routing block builder should specify the value of the 1340 $randomInteger$. If not specified the routing node may choosea random 1341 positive integer value. A routing block builder SHOULD specify a 1342 PRNG and a seed used for this padding. If GF(16) is applied, then 1343 all numbers are treated as little-endian representations. Only GF(8) 1344 and GF(16) are allowed fields. 1346 For padding removal, the padding i at the start is first removed as a 1347 little-endian integer. Second, the length of the output block is 1348 calculated by applying =i mod 1351 This padding guarantees that each resulting block matches the block 1352 size of the subsequent encryption operation and does not require 1353 further padding. 1355 7.4.4.2. Apply Matrix 1357 Next, the input block is organized in a data matrix D of dimensions 1358 (inrows, incols) where incols=(-) and inrows=L/(-). The input block data is first distributed in 1361 this matrix across, and then down. 1363 Next, the data matrix D is multiplied by a Vandermonde matrix V with 1364 its number of rows equal to the incols calculated and columns equal 1365 to the . The content of the matrix is formed 1366 by v(i,j)=pow(i,j), where i reflects the row number starting at 0, 1367 and j reflects the column number starting at 0. The calculations 1368 described must be carried out in the GF noted in the respective 1369 operation to be successful. The completed operation results in 1370 matrix A. 1372 7.4.4.3. Encrypt Target Block 1374 Each row vector of A is a new data block encrypted with the 1375 corresponding encryption key noted in the keys of the 1376 addRedundancyOperation. If there are not enough keys available, then 1377 the keys used for encryption are reused from the beginning after the 1378 final key is used. A routing block builder SHOULD provide enough 1379 keys so that all target blocks may be encrypted with a unique key. 1380 All encryptions SHOULD NOT use padding. 1382 7.5. Processing of Vortex Messages 1384 The accounting layer triggers processing according to information 1385 contained in a routing block in the workspace. All operations MUST 1386 be executed in the sequence provided in the routing block, and any 1387 failing operation must leave the result block unmodified. 1389 All workspace blocks resulting in IDs of 1 to maxPayloadBlock are 1390 then added to the message and passed to the blending layer with 1391 appropriate instructions. 1393 8. Accounting 1395 8.1. Accounting Operations 1397 The accounting layer has two types of operations. 1399 o Time-based (e.g., cleanup jobs and initiation of routing). 1401 o Routing triggered (e.g., updating quotas, authorizing operations, 1402 and pickup of incoming messages). 1404 Implementations MUST provide sufficient locking mechanisms to 1405 guarantee the integrity of accounting information and the workspace 1406 at any time. 1408 8.1.1. Time-Based Garbage Collection 1410 The accounting layer SHOULD keep a list of expiration times. As soon 1411 as an entry (e.g., payload block or identity) expires, the respective 1412 structure should be removed from the workspace. An implementation 1413 MAY choose to remove expired items periodically or when encountering 1414 them during normal operation. 1416 8.1.2. Time-Based Routing Initiation 1418 The accounting layer MAY keep a list of when a routing block is 1419 activated. For improved privacy, the accounting layer should use a 1420 slotted model where, whenever possible, multiple routing blocks are 1421 handled in the same period, and the requests to the blending layers 1422 are mixed between the transactions. 1424 8.1.3. Routing Based Quota Updates 1426 A node MUST update quotas on the respective operations. For example, 1427 a node MUST decrease the message quota before processing routing 1428 blocks in the workspace and after the processing of header requests. 1430 8.1.4. Routing Based Authorization 1432 The transfer quota MUST be checked and decreased by the number of 1433 data bytes in the payload chunks after an outgoing message is 1434 processed and fully assembled. The message quota MUST be decreased 1435 by one on each routing block triggering the assembly of an outgoing 1436 message. 1438 8.1.5. Ephemeral Identity Creation 1440 Any packet may request the creation of an ephemeral identity. A node 1441 SHOULD NOT accept such a request without a costly requirement, since 1442 the request includes a lifetime of the ephemeral identity. The costs 1443 for creating the ephemeral identity SHOULD increase if a longer 1444 lifetime is requested. 1446 9. Acknowledgments 1448 Thanks go to my family who supported me with patience and countless 1449 hours as well as to Mark Zeman for his feedback challenging my 1450 thoughts and peace. 1452 10. IANA Considerations 1454 This memo includes no request to IANA. 1456 Additional encryption algorithms, paddings, modes, blending layers or 1457 puzzles MUST be added by writing an extension to this or a subsequent 1458 RFC. For testing purposes, IDs above 1,000,000 should be used. 1460 11. Security Considerations 1462 The MessageVortex protocol should be understood as a toolset instead 1463 of a fixed product. Depending on the usage of the toolset, anonymity 1464 and security are affected. For a detailed analysis, see 1465 [MVAnalysis]. 1467 The primary goals for security within this protocol rely on the 1468 following focus areas. 1470 o Confidentiality 1472 o Integrity 1474 o Availability 1476 o Anonymity 1478 * Third-party anonymity 1480 * Sender anonymity 1482 * Receiver anonymity 1484 These aspects are affected by the usage of the protocol, and the 1485 following sections provide additional information on how they impact 1486 the primary goals. 1488 The Vortex protocol does not rely on any encryption of the transport 1489 layer since Vortex messages are already encrypted. Also, 1490 confidentiality is not affected by the protection mechanisms of the 1491 transport layer. 1493 If a transport layer supports encryption, then a Vortex node SHOULD 1494 use it to improve the privacy of the message. 1496 Anonymity is affected by the inner workings of the blending layer in 1497 many ways. A Vortex message cannot be read by anyone except the peer 1498 nodes and routing block builder. The presence of a Vortex node 1499 message may be detected through the typical high entropy of an 1500 encrypted file, broken structures of a carrier file, a meaningless 1501 content of a carrier file or the contextless communication of the 1502 transport layer with its peer partner. A blending layer SHOULD 1503 minimize the possibility of simply detection by minimizing these 1504 effects. 1506 A blending layer SHOULD use carrier files with high compression or 1507 encryption. Carrier files SHOULD NOT have inner structures such that 1508 the payload is comparable to valid content. To achieve 1509 undetectability by a human reviewer, a routing block builder should 1510 use F5 instead of PLAIN blending. This approach, however, increases 1511 the protocol overhead by approximately tenfold. 1513 The two layers of 'routing' and 'accounting' have the deepest insight 1514 into a Vortex message's inner working. Each knows the immediate peer 1515 sender and the peer recipients of all payload chunks. As decoy 1516 traffic is generated by combining chunks and applying redundancy 1517 calculations, a node can never know if a malfunction (e.g., during a 1518 recovery calculation) was intended. Therefore, a node is unable to 1519 distinguish a failed transaction from a terminated transaction as 1520 well as content from decoy traffic. 1522 A routing block builder SHOULD follow the following rules to not 1523 compromise a Vortex message's anonymity. 1525 o All operations applied SHOULD be credibly involved in a message 1526 transfer. 1528 o A sufficient subset of the result of an addRedundancy operation 1529 should always be sent to peers to allow recovery of the data 1530 built. 1532 o The anonymity set of a message should be sufficiently large to 1533 avoid legal prosecution of all jurisdictional entities involved, 1534 even if a certain amount of the anonymity set cooperates with an 1535 adversary. 1537 o Encryption and decryption SHOULD follow normal usage whenever 1538 possible by avoiding the encryption of a block on a node with one 1539 key and decrypting it with a different key on the same or adjacent 1540 node. 1542 o Traffic peaks SHOULD be uniformly distributed within the entire 1543 anonymity set. 1545 o A routing block SHOULD be used for a limited number of messages. 1546 If used as a message block for the node, then it should be used 1547 only once. A block builder SHOULD use the 1548 HeaderRequestReplaceIdentity block to update the reply to routing 1549 blocks regularly. Implementers should always remember that the 1550 same routing block is identifiable by its structure. 1552 An active adversary cannot use blocks from other routing block 1553 builders. While the adversary may falsify the result by injecting an 1554 incorrect message chunk or not sending a message, such message 1555 disruptions may be detected by intentionally routing information to 1556 the routing block builder'node. If the Vortex message does not carry 1557 the information expected, then the node may safely assume that one of 1558 the involved nodes is misbehaving. A block building node MAY 1559 calculate reputation for involved nodes over time and MAY build 1560 redundancy paths into a routing block to withstand such malicious 1561 nodes. 1563 Receiver anonymity is at risk if the handling of the message header 1564 and content is not done with care. An attacker might send a bugged 1565 message (e.g., with a DKIM or DMARC header) to deanonymize a 1566 recipient. Careful attention is required when handling anything 1567 other than local references when processing, verifying or rendering a 1568 message. 1570 12. References 1572 12.1. Normative References 1574 [CCITT.X208.1988] 1575 International Telephone and Telegraph Consultative 1576 Committee, "Specification of Abstract Syntax Notation One 1577 (ASN.1)", CCITT Recommendation X.208, 11 1998. 1579 [CCITT.X680.2002] 1580 International Telephone and Telegraph Consultative 1581 Committee, "Abstract Syntax Notation One (ASN.1): 1582 Specification of basic notation", 11 2002. 1584 [EAX] Bellare, M., Rogaway, P., and D. Wagner, "The EAX mode of 1585 operation", 2011. 1587 [F5] Westfeld, A., "F5 - A Steganographic Algorithm - High 1588 Capacity Despite Better Steganalysis", 10 2001. 1590 [FIPS-AES] 1591 Federal Information Processing Standard (FIPS), 1592 "Specification for the ADVANCED ENCRYPTION STANDARD 1593 (AES)", 11 2011. 1595 [IEEE754] IEEE, "754-2008 - IEEE Standard for Floating-Point 1596 Arithmetic", 08 2008. 1598 [ISO-10118-3] 1599 International Organization for Standardization, "ISO/IEC 1600 10118-3:2004 -- Information technology -- Security 1601 techniques -- Hash-functions -- Part 3: Dedicated hash- 1602 functions", 3 2004. 1604 [MODES] National Institute for Standards and Technology (NIST), 1605 "Recommendation for Block Cipher Modes of Operation: 1606 Methods and Techniques", 12 2001. 1608 [RFC1423] Balenson, D., "Privacy Enhancement for Internet Electronic 1609 Mail: Part III: Algorithms, Modes, and Identifiers", 1610 RFC 1423, DOI 10.17487/RFC1423, February 1993, 1611 . 1613 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1614 Requirement Levels", BCP 14, RFC 2119, 1615 DOI 10.17487/RFC2119, March 1997, 1616 . 1618 [RFC3610] Whiting, D., Housley, R., and N. Ferguson, "Counter with 1619 CBC-MAC (CCM)", RFC 3610, DOI 10.17487/RFC3610, September 1620 2003, . 1622 [RFC3657] Moriai, S. and A. Kato, "Use of the Camellia Encryption 1623 Algorithm in Cryptographic Message Syntax (CMS)", 1624 RFC 3657, DOI 10.17487/RFC3657, January 2004, 1625 . 1627 [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) 1628 Counter Mode With IPsec Encapsulating Security Payload 1629 (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, 1630 . 1632 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1633 Specifications: ABNF", STD 68, RFC 5234, 1634 DOI 10.17487/RFC5234, January 2008, 1635 . 1637 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 1638 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 1639 DOI 10.17487/RFC5288, August 2008, 1640 . 1642 [RFC5958] Turner, S., "Asymmetric Key Packages", RFC 5958, 1643 DOI 10.17487/RFC5958, August 2010, 1644 . 1646 [RFC7253] Krovetz, T. and P. Rogaway, "The OCB Authenticated- 1647 Encryption Algorithm", RFC 7253, DOI 10.17487/RFC7253, May 1648 2014, . 1650 [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, 1651 "PKCS #1: RSA Cryptography Specifications Version 2.2", 1652 RFC 8017, DOI 10.17487/RFC8017, November 2016, 1653 . 1655 [SEC1] Certicom Research, "SEC 1: Elliptic Curve Cryptography", 1656 05 2009. 1658 [TWOFISH] Schneier, B., "The Twofish Encryptions Algorithm: A 1659 128-Bit Block Cipher, 1st Edition", 03 1999. 1661 [XEP-0231] 1662 Peter, S. and P. Simerda, "XEP-0231: Bits of Binary", 09 1663 2008, . 1665 12.2. Informative References 1667 [DeadParrot] 1668 Houmansadr, A., Burbaker, C., and V. Shmatikov, "The 1669 Parrot is Dead: Observing Unobservable Network 1670 Communications", 2013, 1671 . 1673 [KAnon] Ahn, L., Bortz, A., and N. Hopper, "k-Anonymous Message 1674 Transmission", 2003. 1676 [MVAnalysis] 1677 Gwerder, M., "MessageVortex", 2018, 1678 . 1680 [RFC1939] Myers, J. and M. Rose, "Post Office Protocol - Version 3", 1681 STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996, 1682 . 1684 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1685 Extensions (MIME) Part One: Format of Internet Message 1686 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 1687 . 1689 [RFC2595] Newman, C., "Using TLS with IMAP, POP3 and ACAP", 1690 RFC 2595, DOI 10.17487/RFC2595, June 1999, 1691 . 1693 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 1694 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 1695 . 1697 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 1698 DOI 10.17487/RFC5321, October 2008, 1699 . 1701 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 1702 Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, 1703 March 2011, . 1705 Appendix A. The ASN.1 schema for Vortex messages 1707 The following sections contain the ASN.1 modules specifying the 1708 MessageVortex Protocol. 1710 A.1. The main VortexMessageBlocks 1712 A.2. The VortexMessage Ciphers Structures 1714 A.3. The VortexMessage Request Structures 1716 A.4. The VortexMessage Replies Structures 1718 A.5. The VortexMessage Requirements Structures 1720 A.6. The VortexMessage Helpers Structures 1722 A.7. The VortexMessage Additional Structures 1724 Author's Address 1726 Martin Gwerder 1727 University of Applied Sciences of Northwestern Switzerland 1728 Bahnhofstrasse 5 1729 Windisch, AG 5210 1730 Switzerland 1732 Phone: +41 56 202 76 81 1733 Email: rfc@messagevortex.net