Introduction 介绍

This document is a textual specification of the Tox protocol and all the supporting modules required to implement it. The goal of this document is to give enough guidance to permit a complete and correct implementation of the protocol.
本文是Tox协议的文本规范以及操作它所需的所有支持模块的文章。本文主旨是给出足够的指导让协议完整和正确的实现。

Objectives 目的

This section provides an overview of goals and non-goals of Tox. It provides the reader with:

  • a basic understanding of what problems Tox intends to solve;
  • a means to validate whether those problems are indeed solved by the protocol as specified;
  • the ability to make better tradeoffs and decisions in their own reimplementation of the protocol.

这一部分提供Tox能够实现的功能和不能实现的功能的整体概述。它为读者阐述了:

  • 基本了解Tox打算解决的问题;
  • 验证这些问题是否确实通过指定的协议得到了解决 ;
  • 能够在自己重新实现协议中做出更好的权衡和决策。

Goals 能够实现

  • Authentication: Tox aims to provide authenticated communication. This means that during a communication session, both parties can be sure of the other party’s identity. Users are identified by their public key. The initial key exchange is currently not in scope for the Tox protocol. In the future, Tox may provide a means for initial authentication using a challenge/response or shared secret based exchange.

    If the secret key is compromised, the user’s identity is compromised, and an attacker can impersonate that user. When this happens, the user must create a new identity with a new public key.

    认证: Tox目的在于提供认证通信。这意味着在通信会话期间,双方都可以确定彼此身份,用户通过他们的公钥进行标识。初始密钥交换目前不在Tox协议的范围内。将来,Tox也许会使用质询/响应或基于共享密文的交换来提供初始认证的手段。

    如果密钥被泄露,则用户的身份会受到损害,并且攻击者可以冒充该用户。 发生这种情况时,用户必须使用新的公钥创建新标识。

  • End-to-end encryption: The Tox protocol establishes end-to-end encrypted communication links. Shared keys are deterministically derived using a Diffie-Hellman-like method, so keys are never transferred over the network.

  • 端对端加密: Tox协议建立了端到端加密通信连接。 使用类似Diffie-Hellman的方法确定性地导出共享密钥,因此密钥永远不会通过网络传输。

  • Forward secrecy: Session keys are re-negotiated when the peer connection is established.

  • 正向保密: 建立对等连接时,会话密钥重新协商。

  • Privacy: When Tox establishes a communication link, it aims to avoid leaking to any third party the identities of the parties involved (i.e. their public keys).

  • 隐私: 当Tox建立通信连接时,它旨在避免向任何第三方泄露相关各方的身份(即他们的公钥)。

    Furthermore, it aims to avoid allowing third parties to determine the IP address of a given user.

    此外,它旨在避免允许第三方确定用户的IP地址。

  • Resilience:

    • Independence of infrastructure: Tox avoids relying on servers as much as possible. Communications are not transmitted via or stored on central servers. Joining a Tox network requires connecting to a well-known node called a bootstrap node. Anyone can run a bootstrap node, and users need not put any trust in them.
    • Tox tries to establish communication paths in difficult network situations. This includes connecting to peers behind a NAT or firewall. Various techniques help achieve this, such as UDP hole-punching, UPnP, NAT-PMP, other untrusted nodes acting as relays, and DNS tunnels.
    • Resistance to basic denial of service attacks: short timeouts make the network dynamic and resilient against poisoning attempts.
  • 弹力:

    • 基础设施的独立性:Tox尽可能避免依赖服务器。 通信不通过中央服务器传输或存储在中央服务器上 。加入Tox网络需要连接到称为引导节点的众所周知的节点。 任何人都可以运行引导节点,而且用户不需要信任它们。
    • Tox尝试在困难的网络环境中建立通信路径。 这包括连接NAT或防火墙后面的通信。 各种技术有助于实现这一点,例如UDP穿孔,UPnP,NAT-PMP,充当中继的其他不可信节点以及DNS隧道。
    • 抵御基本的拒绝服务攻击:短暂的超时使网络具有动态性并可抵御病毒攻击。
  • Minimum configuration: Tox aims to be nearly zero-conf. User-friendliness is an important aspect to security. Tox aims to make security easy to achieve for average users.

  • 最低配置: Tox目的是接近零配置。 用户友好性是安全性的重要方面。 Tox旨在为普通用户轻松实现安全性。

Non-goals 无法实现

Anonymity is not in scope for the Tox protocol itself, but it provides an easy way to integrate with software providing anonymity, such as Tor.

By default, Tox tries to establish direct connections between peers; as a consequence, each is aware of the other’s IP address, and third parties may be able to determine that a connection has been established between those IP addresses. One of the reasons for making direct connections is that relaying real-time multimedia conversations over anonymity networks is not feasible with the current network infrastructure.

匿名不在Tox协议本身的范围内,但它提供了一种与提供匿名性的软件(如Tor)集成的简便方法。

默认情况下,Tox尝试在两个用户之间建立直接连接;因此,每个人都知道对方的IP地址,并且第三方可能能够确定在这些IP地址之间建立了连接。 直接连接的原因之一是,在目前的网络基础设施下,通过匿名网络中继实时会话是不可行的 。

Threat model 威胁模型

TODO(iphydf): Define one. 不清楚干嘛的

Data types 数据类型

All data types are defined before their first use, and their binary protocol representation is given. The protocol representations are normative and must be implemented exactly as specified. For some types, human-readable representations are suggested. An implementation may choose to provide no such representation or a different one. The implementation is free to choose any in-memory representation of the specified types.

Binary formats are specified in tables with length, type, and content descriptions. If applicable, specific enumeration types are used, so types may be self-explanatory in some cases. The length can be either a fixed number in bytes (e.g. 32), a number in bits (e.g. 7 bit), a choice of lengths (e.g. 4 | 16), or an inclusive range (e.g. [0, 100]). Open ranges are denoted [n,] to mean a minimum length of n with no specified maximum length.

所有数据类型在首次使用之前都已定义,并给出了它们的二进制协议表示。协议表示是规范性的,必须严格按照规定实施。对于某些类型,建议使用直接可读的表示方法进行表示。实现过程中可以选择不提供这样的表示或不同的表示,可以自由选择指定类型的任何内存表示形式。

二进制格式被规定在一定长度,一定类型,和一定内容描述的表中。如果适用,则使用特定的枚举类型,因此在某些情况下类型可能是自动声明的。长度可以是一个以字节为单位的固定数字 (例如32),以位为单位的数字 (例如7 bit),以长度为单位的数字(例如4|16),或者一个范围(例如[0,100])未闭合的区间[n,]。

Integers 整数

The protocol uses four bounded unsigned integer types. Bounded means they have an upper bound beyond which incrementing is not defined. The integer types support modular arithmetic, so overflow wraps around to zero. Unsigned means their lower bound is 0. Signed integer types are not used. The binary encoding of all integer types is a fixed-width byte sequence with the integer encoded in Big Endian unless stated otherwise.

该协议使用四个有界无符号整数类型。 有界意味着它们具有上限,超过该上限未定义递增。 整数类型支持模运算,因此溢出包围为零。 无符号表示其下限为0,不使用有符号整数类型。 除非另有说明,否则所有整数类型的二进制编码是固定宽度的字节序列,其中整数使用Big Endian编码。

Strings 字符串

A String is a data structure used for human readable text. Strings are sequences of glyphs. A glyph consists of one non-zero-width unicode code point and zero or more zero-width unicode code points. The human-readable representation of a String starts and ends with a quotation mark (") and contains all human-readable glyphs verbatim. Control characters are represented in an isomorphic human-readable way. I.e. every control character has exactly one human-readable representation, and a mapping exists from the human-readable representation to the control character. Therefore, the use of Unicode Control Characters (U+240x) is not permitted without additional marker.

字符串是用于人类可读文本的数据结构。 字符串是字形序列。 字形由一个非零宽度的unicode代码点和零个或多个零宽度的unicode代码点组成。 String的人类可读表示以引号(“)开头和结尾,并且逐字包含所有人类可读的字形。控制字符以同构的人类可读方式表示。即每个控制字符都具有一个人类可读的表示 并且存在从人类可读表示到控制字符的映射。因此,如果没有附加标记,则不允许使用Unicode控制字符(U + 240x)。

Tox协议官方文档翻译(一)相关推荐

  1. [iOS]Advanced Memory Management Programming Guide 高级内存管理编程指南(官方文档翻译)

    Advanced Memory Management Programming Guide - 高级内存管理编程指南(官方文档翻译) 版权声明:本文为博主原创翻译,如需转载请注明出处. 新博客文章地址: ...

  2. 官方文档翻译《The Libra Blockchain》之执行交易(二)

    译自:官方文档翻译<The Libra Blockchain>之执行交易,第三小节.本作品采用知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议进行许可. 执行交易 执行一 ...

  3. 官方文档翻译《The Libra Blockchain》之执行交易(一)

    译自:官方文档翻译<The Libra Blockchain>之执行交易,第三小节.本作品采用知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议进行许可. 执行交易 Lib ...

  4. iOS程序启动原理---iOS-Apple苹果官方文档翻译

    本系列所有开发文档翻译链接地址:iOS7开发-Apple苹果iPhone开发Xcode官方文档翻译PDF下载地址 //转载请注明出处--本文永久链接:http://www.cnblogs.com/Ch ...

  5. About HTTP Live Streaming官方文档翻译 [iOS]

    新博客地址:About HTTP Live Streaming官方文档翻译 [iOS] 版权声明:本文为博主原创翻译,如需转载请注明出处. 苹果源文档地址 - 点击这里 About HTTP Live ...

  6. 【iOS官方文档翻译】iOS蓝牙的基本概念

    之前写了[iOS官方文档翻译]iOS的蓝牙连接.数据接收及发送一文,介绍了怎样进行蓝牙通讯,但是很多基本概念没有进行解释,看起来可能有点吃力,所以现在再翻译一篇苹果对官方蓝牙4.0一些基本概念介绍的文 ...

  7. 欢迎参与 KubeVela 官方文档翻译活动

    来源 | 阿里巴巴云原生公众号 背景 KubeVela v1.0 启用了新的官网架构和文档维护方式,新增功能包括文档版本化控制.i18n 国际化以及自动化流程.但目前 KubeVela 官方文档只有英 ...

  8. UIControl事件---iOS-Apple苹果官方文档翻译

    本系列所有开发文档翻译链接地址: iOS7开发-Apple苹果iPhone开发Xcode官方文档翻译PDF下载地址 UIControl事件1.UIControlEventTouchDown 单点触摸按 ...

  9. 【KubeVela 官方文档翻译】,欢迎大家踊跃参与

    简介:KubeVela v1.0 启用了新的官网架构和文档维护方式,新增功能包括文档版本化控制.i18n 国际化以及自动化流程.但目前 KubeVela 官方文档只有英文版,这提高了学习和使用 Kub ...

  10. UIPageControl---iOS-Apple苹果官方文档翻译

    本系列所有开发文档翻译链接地址:iOS7开发-Apple苹果iPhone开发Xcode官方文档翻译PDF下载地址 //转载请注明出处--本文永久链接:http://www.cnblogs.com/Ch ...

最新文章

  1. 创业笔记-Node.js入门之阻塞与非阻塞
  2. 《LeetCode力扣练习》剑指 Offer 15. 二进制中1的个数 Java
  3. Windows NT体系结构
  4. 我们学校也在使用IPV6
  5. 模型 标签数据 神经网络_大型神经网络和小数据的模型选择
  6. 一个全栈式的应用集成平台,打破“信息孤岛”
  7. (转)构建微服务:Spring boot 入门篇
  8. Leetcode 118 杨辉三角
  9. C51单片机————中断系统
  10. C#.NET学习笔记1---C#.NET简介
  11. 回溯____蓝桥 棋盘
  12. hadoop配置启动historyserver
  13. 新手阿里云服务器操作指南(图文教程)
  14. 计算机保存途径如何更改,如何修改“我的文档”路径方便保存文件
  15. 关键20小时,快速学会任何技能
  16. js判断是否是微信扫描进入
  17. 切比雪夫不等式例题讲解_浅谈|f(x)|最大值的最小值问题--切比雪夫最佳逼近直线在高考中的应用...
  18. [Ubuntu]MW150us-rtl8188eu 驱动编译安装
  19. java 常用类 - 大数据运算
  20. ps中usm锐化,智能锐化,像素化,分层云彩,光照效果,镜头光晕,纤维,云彩,减少杂色,蒙尘与划痕,祛斑,添加杂色,中间值

热门文章

  1. 【科普】中医药治疗重症肌无力的独特优势
  2. 新版sonar代码审查问题总结
  3. 程序员段子,看不懂不是真的猿
  4. android手机和包支付,中国移动和包支付客户端下载-和包支付appv9.7.16 安卓版-手机腾牛网...
  5. 转载 | 上汽集团云计算中心的开源之路
  6. 笔记本开发android占用,安卓笔记本是什么样子的?Bliss OS进入开发阶段
  7. 使用PLC-Recorder快速连接PLC记录数据
  8. 当 dbt 遇见 TiDB丨高效的数据转换工具让数据分析更简单
  9. (转)50本书总结的50句话
  10. LayoutInflater.inflate()方法的深入理解