← 比特币之前

Hashcash

Adam Back · 软件公告与工作量证明论文

1997 年 3 月 28 日公开公告 · 2002 年 8 月 1 日论文

Hashcash:一种抵御拒绝服务攻击的对策 · 原文全文

Adam Back · 原文与译文

2002 年 8 月 1 日论文全文,含公式、分类表及 19 条参考文献。按原 PDF 重排段落与数学符号;英文原有拼写及历史表述保留。

论文章节

Adam Back 电子邮箱:adam@cypherspace.org

Adam Back e-mail: adam@cypherspace.org

2002 年 8 月 1 日

1st August 2002

摘要

Abstract

Hashcash 最初于 1997 年 5 月提出,用来遏制对电子邮件、匿名邮件转发服务等不按使用量计费的互联网资源的系统性滥用。五年后的这篇论文将各种应用、改进建议和随后发表的相关研究汇集起来,并介绍 Hashcash 使用实验的初步经验。

Hashcash was originally proposed as a mechanism to throttle systematic abuse of un-metered internet resources such as email, and anonymous remailers in May 1997. Five years on, this paper captures in one place the various applications, improvements suggested and related subsequent publications, and describes initial experience from experiments using hashcash.

Hashcash 的 CPU 成本函数会计算出一个可用作工作量证明的凭证。成本函数可以构造为交互式或非交互式两种形式:前者用于服务器能够发出挑战的情形(面向连接的交互协议),后者用于服务器无法发出挑战的情形(采用存储转发或面向数据包的通信)。

The hashcash CPU cost-function computes a token which can be used as a proof-of-work. Interactive and non-interactive variants of cost-functions can be constructed which can be used in situations where the server can issue a challenge (connection oriented interactive protocol), and where it can not (where the communication is store–and– forward, or packet oriented) respectively.

关键词:Hashcash、成本函数

Key Words: hashcash, cost-functions

1 引言

1 Introduction

Hashcash [1] 最初于 1997 年 5 月提出,用来遏制对电子邮件、匿名邮件转发服务等不按使用量计费的互联网资源的系统性滥用。五年后的这篇论文将各种应用、改进建议和随后发表的相关研究汇集起来,并介绍 Hashcash 使用实验的初步经验。

Hashcash [1] was originally proposed as a mechanism to throttle systematic abuse of un-metered internet resources such as email, and anonymous remailers in May 1997. Five years on, this paper captures in one place the various applications, improvements suggested and related subsequent publications, and describes initial experience from experiments using hashcash.

Hashcash 的 CPU 成本函数会计算出一个可用作工作量证明的凭证。成本函数可以构造为交互式或非交互式两种形式:前者用于服务器能够发出挑战的情形(面向连接的交互协议),后者用于服务器无法发出挑战的情形(采用存储转发或面向数据包的通信)。

The hashcash CPU cost-function computes a token which can be used as a proof-of-work. Interactive and non-interactive variants of cost-functions can be constructed which can be used in situations where the server can issue a challenge (connection oriented interactive protocol), and where it can not (where the communication is store–and– forward, or packet oriented) respectively.

发表文献 [1] 时,作者并不知道 Dwork 和 Naor 在文献 [2] 中已有的工作:他们提出了一种用于对抗垃圾邮件的 CPU 定价函数。随后,Juels 和 Brainard 在文献 [3] 中进一步讨论了成本函数的应用。Jakobsson 和 Juels 在文献 [4] 中提出,让成本函数消耗的工作具有双重用途,同时完成另一项有用的计算。

At the time of publication of [1] the author was not aware of the prior work by Dwork and Naor in [2] who proposed a CPU pricing function for the application of combatting junk email. Subsequently applications for cost-functions have been further discussed by Juels and Brainard in [3]. Jakobsson and Juels propose a dual purpose for the work spent in a cost-function: to in addition perform an otherwise useful computation in [4].

2 成本函数

2 Cost-Functions

成本函数应当便于高效核验,同时允许通过参数设定较高的计算成本。我们用以下符号定义成本函数。

A cost-function should be efficiently verifiable, but parameterisably expensive to compute. We use the following notation to define a cost-function.

在成本函数的语境中,“客户端”指必须使用成本函数 MINT() 计算凭证(记作 𝒯)的用户。用户凭这些凭证与服务器按协议交互。我们使用 mint(铸造)一词,是因为生成成本凭证与铸造实体货币相似。

In the context of cost-functions we use client to refer to the user who must compute a token (denoted 𝒯 ) using a cost-function MINT() which is used to create tokens to participate in a protocol with a server. We use the term mint for the cost-function because of the analogy between creating cost tokens and minting physical money.

服务器使用评估函数 VALUE() 检查凭证的价值,只有凭证达到要求的价值,协议才继续进行。

The server will check the value of the token using an evaluation function VALUE(), and only proceed with the protocol if the token has the required value.

这些函数以工作量 w 为参数,即用户铸造一个凭证平均需要付出的工作量。

The functions are parameterised by the amount of work w that the user will have to expend on average to mint a token.

对于交互式成本函数,服务器向客户端发出挑战 𝒞;服务器通过 CHAL() 函数计算挑战。(挑战函数也以工作因子为参数。)

With interactive cost-functions, the server issues a challenge 𝒞 to the client – the server uses the CHAL() function to compute the challenge. (The challenge function is also parameterised by the work factor.)

𝒞 ← CHAL(s, w)    服务器挑战函数
𝒯 ← MINT(𝒞)    根据挑战铸造凭证
𝒱 ← VALUE(𝒯)    凭证评估函数
𝒞 ← CHAL(s, w)    server challenge function
𝒯 ← MINT(𝒞)    mint token based on challenge
𝒱 ← VALUE(𝒯)    token evaluation function

对于非交互式成本函数,客户端在 MINT() 函数中自行选择挑战或随机起始值,不存在 CHAL() 函数。

With non-interactive cost-functions the client choses it’s own challenge or random start value in the MINT() function, and there is no CHAL() function.

𝒯 ← MINT(s, w)    铸造凭证
𝒱 ← VALUE(𝒯)    凭证评估函数
𝒯 ← MINT(s, w)    mint token
𝒱 ← VALUE(𝒯)    token evaluation function

显然,非交互式成本函数可以用于交互式场景,反过来则不行。

Clearly a non-interactive cost-function can be used in an interactive setting, whereas the converse is not possible.

2.1 可公开核验与概率成本

2.1 Publicly Auditable, Probabilistic Cost

• 可公开核验的成本函数,任何第三方都能高效验证,无须获得任何陷门或秘密信息。(这里的“可公开核验”隐含一个要求:与铸造凭证相比,核验的成本应当较低;仅仅让核验者重复客户端所做的工作,并不符合这里的要求。)

• A publicly auditable cost-function can be efficiently verified by any third party without access to any trapdoor or secret information. (When we say publicly auditable we mean implicitly that the cost-function is efficiently publicly auditable compared to the cost of minting the token, rather than auditable in the weaker sense that the auditor could repeat the work done by the client.)

• 固定成本函数的计算消耗固定数量的资源。铸造固定成本凭证的最快算法是一种确定性算法。

• A fixed cost cost-function takes a fixed amount of resources to compute. The fastest algorithm to mint a fixed cost token is a deterministic algorithm.

• 概率成本函数中,客户端铸造凭证所需时间的期望值可以预测,实际时间却是随机的,因为从随机起始值开始计算才是最有效的方式。有时客户端运气好,起点就接近答案。

• A probabilistic cost cost-function is one where the cost to the client of minting a token has a predictable expected time, but a random actual time as the client can most efficiently compute the cost-function by starting at a random start value. Sometimes the client will get lucky and start close to the solution.

概率成本分为两类:有界概率成本和无界概率成本。

There are two types of probabilistic cost bounded probabilistic cost and unbounded probabilistic cost.

– 无界概率成本函数在理论上可能永远算不完,但计算时间大幅超过预期的概率会迅速趋近于零。(例如,要求把一枚公平硬币掷出正面的成本函数:用户理论上可能很不走运,连续掷出许多次反面;但实际上,连续 k 次没有掷出正面的概率会迅速趋近于 0,因为 lim(k→∞) (1/2)ᵏ = 0。)

– An unbounded probabilistic cost cost-function, can in theory take forever to compute, though the probablity of taking significantly longer than expected decreases rapidly towards zero. (An example would be the cost-function of being required to throw a head with a fair coin; in theory the user could be unlucky and end up throwing many tails, but in practice the probability of not throwing a head for k throws tends towards 0 rapidly as lim(k→∞) (1/2)ᵏ = 0.)

– 有界概率成本函数限制了客户端寻找答案时最不走运的程度。例如,若要求客户端在某个密钥空间中搜索一个已知存在的答案,密钥空间的大小就给寻找答案的成本设定了上限。

– With a bounded probabilistic cost cost-function there is a limit to how unlucky the client can be in it’s search for the solution; for example where the client is expected to search some key space for a known solution; the size of the key space imposes an upper bound on the cost of finding the solution.

2.2 无陷门

2.2 Trapdoor-free

已知答案的成本函数有一个缺点:挑战发起者可以低成本生成任意价值的凭证。如果服务器可能存在利益冲突,就不能用这类函数进行公开核验。例如,在网站点击量计量中,广告商按点击付费时,服务器可能有动机夸大页面点击量。

A disadvantage of known solution cost-functions is that the challenger can cheaply create tokens of arbitrary value. This precludes public audit where the server may have a conflict of interests, for example in web hit metering, where the server may have an interest to inflate the number of hits on it’s page where it is being paid per hit by an advertiser.

• 无陷门成本函数是指服务器在铸造凭证时没有优势的成本函数。

• A trapdoor-free cost-function is one where the server has no advantage in minting tokens.

Hashcash [1] 就是一种无陷门成本函数。Juels 和 Brainard 的客户端谜题成本函数则是一种已知答案的成本函数,服务器在铸造凭证时具有优势。此外,论文所规定的客户端谜题无法公开核验,但这是存储优化造成的,并非这种设计的固有属性。

An example of a trapdoor-free cost-function is the Hashcash [1] cost-function. Juels and Brainard’s client-puzzle cost-function is an example of a known-solution cost-function where the server has an advantage in minting tokens. Client-puzzles as specified in the paper are in addition not publicly auditable, though this is due to a storage optimization and not inherent to their design.

3 Hashcash 成本函数

3 The Hashcash cost-function

Hashcash 是一种非交互式、可公开核验、无陷门且具有无界概率成本的成本函数。

Hashcash is a non-interactive, publicly auditable, trapdoor-free cost function with unbounded probabilistic cost.

先介绍一些符号:考虑比特串 s = {0,1}*,用 [s]ᵢ 表示偏移位置 i 上的比特,其中 [s]₁ 是最左侧比特,[s]₍|s|₎ 是最右侧比特。[s]ᵢ…ⱼ 表示从第 i 位到第 j 位(含两端)的比特子串,即 [s]ᵢ…ⱼ = [s]ᵢ ∥ … ∥ [s]ⱼ。因此,s = [s]₁…₍|s|₎。

First we introduce some notation: consider bitstring s = {0,1}*, we define [s]ᵢ to means the bit at offset i, where [s]₁ is the left-most bit, and [s]₍|s|₎ is the right-most bit. [s]ᵢ…ⱼ means the bit-wise substring between and including bits i and j, [s]ᵢ…ⱼ = [s]ᵢ ∥ … ∥ [s]ⱼ. So s = [s]₁…₍|s|₎.

定义一个二元中缀比较运算符 =ᶫᵉᶠᵗ_b,其中 b 是两个比特串共有的左侧子串的长度。
x =ᶫᵉᶠᵗ_0 y    [x]₁ ≠ [y]₁
x =ᶫᵉᶠᵗ_b y    ∀ i = 1…b, [x]ᵢ = [y]ᵢ
We define a binary infix comparison operator =ᶫᵉᶠᵗ_b where b is the length of the common left-substring from the two bit-strings.
x =ᶫᵉᶠᵗ_0 y    [x]₁ ≠ [y]₁
x =ᶫᵉᶠᵗ_b y    ∀ i = 1…b, [x]ᵢ = [y]ᵢ

Hashcash 针对服务名称 s 进行计算,以防为某个服务器铸造的凭证被用于另一个服务器(服务器只接受使用自身服务名称铸造的凭证)。服务名称可以是任何能够唯一标识该服务的比特串,例如主机名、电子邮箱地址等。

Hashcash is computed relative to a service-name s , to prevent tokens minted for one server being used on another (servers only accept tokens minted using their own service-name). The service-name can be any bit-string which uniquely identifies the service (eg. host name, email address, etc).

Hashcash 函数定义如下(注意,这是最初发表版本的改进简化形式,参见第 5 节说明):

The hashcash function is defined as (note this is an improved simplifed variant since initial publication see note in section 5:

公开参数:输出长度为 k 比特的哈希函数 ℋ(·)
𝒯 ← MINT(s, w)
  寻找 x ∈ᴿ {0,1}*,使 ℋ(s∥x) =ᶫᵉᶠᵗ_w 0ᵏ
  返回 (s, x)
𝒱 ← VALUE(𝒯)
  ℋ(s∥x) =ᶫᵉᶠᵗ_v 0ᵏ
  返回 v
PUBLIC: hash function ℋ(·) with output size k bits
𝒯 ← MINT(s, w)
  find x ∈ᴿ {0,1}* st ℋ(s∥x) =ᶫᵉᶠᵗ_w 0ᵏ
  return (s, x)
𝒱 ← VALUE(𝒯)
  ℋ(s∥x) =ᶫᵉᶠᵗ_v 0ᵏ
  return v

Hashcash 成本函数以寻找针对全零 k 比特串 0ᵏ 的部分哈希碰撞为基础。计算部分碰撞的最快算法是穷举搜索。客户端可以安全地自行选择随机挑战,因此不需要服务器发出挑战,Hashcash 成本函数也就具有无陷门、非交互式的性质。此外,任何人都能高效验证已公开的凭证,所以它也可公开核验。(实际使用时,|x| 应足够大,使客户端重复使用既有起始值的概率可以忽略;即使服务器很繁忙,|x| = 128 比特也应足够。)

服务器需要保存一份已用凭证数据库,以检测并拒绝再次使用同一凭证的双重支付(双花)尝试。为防止数据库无限增长,可以在服务字符串中加入凭证的铸造时间。这样,服务器就能在记录过期后将其从已用凭证数据库删除。应选择合理的有效期,将时钟误差、计算时间和传输延迟考虑在内。

The hashcash cost-function is based on finding partial hash collisions on the all 0 bits k-bit string 0ᵏ. The fastest algorithm for computing partial collisions is brute force. There is no challenge as the client can safely choose his own random challenge, and so the hashcash cost-function is a trapdoor-free and non-interactive cost-function. In addition the Hashcash cost-function is publicly auditable, because anyone can efficiently verify any published tokens. (In practice |x| should be chosen to be large enough to make the probability that clients reuse a previously used start value negligible; |x| = 128 bits should be enough even for a busy server.)

The server needs to keep a double spending database of spent tokens, to detect and reject attempts to spend the same token again. To prevent the database growing indefinitely, the service string can include the time at which it was minted. This allows the server to discard entries from the spent database after they have expired. Some reasonable expiry period should be chosen to take account of clock inaccuracy, computation time, and transmission delays.

Hashcash 最初用于对抗垃圾邮件以及对匿名邮件转发服务的系统性滥用。这些场景必须使用非交互式成本函数,因为没有供服务器发出挑战的通道。不过,交互式成本函数有一个优势:它可以防止预计算攻击。例如,让每封邮件都付出一定成本,可能足以限制垃圾邮件发送者的滥用规模;但若攻击者纯粹以拒绝服务(DoS)为目的,执意发动攻击的人可能花一年时间预先计算出一批在同一天有效的凭证,从而在那一天暂时压垮系统。

Hashcash was originally proposed as a counter-measure against email spam, and against systematic abuse of anonymous remailers. It is necessary to use non-interactive cost-functions for these scenarios as there is no channel for the server to send a challenge over. However one advantage of interactive cost-functions is that it is possible to prevent pre-computation attacks. For example, if there is a cost associated with sending each email this may be sufficient to limit the scale of email abuse perpetrated by spammers; however for a pure DoS-motivated attack a determined adversary may spend a year pre-computing tokens to all be valid on the same day, and on that day be able to temporarily overload the system.

可以使用缓慢变化的信标来缩小这类预计算攻击的范围;信标是随时间变化、不可预测、经过认证的广播值,例如本周彩票的中奖号码。这种情况下,将当前信标值包含在起始字符串中,就能把预计算攻击限制在信标两次变化之间的时间段内。

It would be possible to reduce the scope for such pre-computation attacks by using a slowly changing beacon (unpredictable broadcast authenticated value changing over time) such as say this weeks winning lottery numbers. In this event the current beacon value is included in the start string, limiting pre-computation attacks to being conducted within the time period between beacon value changes.

4 交互式 Hashcash

4 Interactive Hashcash

交互式 Hashcash 用于 TCP、TLS、SSH、IPSEC 等协议建立连接的场景,由服务器选择挑战。它旨在防止服务器资源过早耗尽。如果某个用户试图尽可能多地消耗资源,使其他用户无法获得服务,系统应能在性能下降的情况下继续运行,并在用户之间公平分配资源。对于 TLS、SSH 和 IPSEC 这类安全协议,其连接建立过程涉及计算成本高昂的公钥密码运算,所保护的服务器资源就是可用 CPU 时间。

With the interactive form of hashcash, for use in interactive settings such as TCP, TLS, SSH, IPSEC etc connection establishment a challenge is chosen by the server. The aim of interactive hashcash is to defend server resources from premature depletion, and provide graceful degradation of service with fair allocation across users in the face of a DoS attack where one user attempts to deny service to the other users by consuming as many server resources as he can. In the case of security protocols such as TLS, SSH and IPSEC with computationally expensive connection establishment phases involving public key crypto the server resource being defended is the servers available CPU time.

交互式 Hashcash 成本函数定义如下:

The interactive hashcash cost-function is defined as follows:

𝒞 ← CHAL(s, w)
  选择 c ∈ᴿ {0,1}ᵏ
  返回 (s, w, c)
𝒯 ← MINT(𝒞)
  寻找 x ∈ᴿ {0,1}*,使 ℋ(s∥c∥x) =ᶫᵉᶠᵗ_w 0ᵏ
  返回 (s, x)
𝒱 ← VALUE(𝒯)
  ℋ(s∥c∥x) =ᶫᵉᶠᵗ_v 0ᵏ
  返回 v
𝒞 ← CHAL(s, w)
  choose c ∈ᴿ {0,1}ᵏ
  return (s, w, c)
𝒯 ← MINT(𝒞)
  find x ∈ᴿ {0,1}* st ℋ(s∥c∥x) =ᶫᵉᶠᵗ_w 0ᵏ
  return (s, x)
𝒱 ← VALUE(𝒯)
  ℋ(s∥c∥x) =ᶫᵉᶠᵗ_v 0ᵏ
  return v

4.1 动态限流

4.1 Dynamic throttling

交互式 Hashcash 可以根据服务器 CPU 负载,动态调整客户端所需的工作因子。还可以只在高负载期间使用这种挑战—响应机制。这样便能逐步引入抵御 DoS 的协议,同时保持与旧客户端软件的向后兼容性。高负载期间,不支持 Hashcash 的客户端可能无法连接,或者被放入容量受限的连接池,继续采用随机断开连接等较老、效果较差的 DoS 防御措施。

With interactive hashcash it becomes possible to dynamically adjust the work factor required for the client based on server CPU load. The approach also admits the possibility that interactive hashcash challenge-response would only be used during periods of high load. This makes it possible to phase-in DoS resistent protocols without breaking backwards compatibility with old client software. Under periods of high load non-hashcash aware clients would be unable to connect, or would be placed in a limited connection pool subject to older less effective DoS counter-measures such as random connection dropping.

4.2 Hashcash-cookie

4.2 hashcash-cookies

SYN 洪泛以及直接耗尽 TCP 连接槽位的攻击,消耗的是 TCP 协议栈用于存储每条连接状态的空间。

With connection-slot depletion attacks such as the syn-flood attack, and straight-forward TCP connection-slot depletion the server resource that is being consumed is space available to the TCP stack to store per-connection state.

在这种场景中,可以等到客户端通过交互式 Hashcash 成本函数算出凭证之后,再保存该连接的状态。这类似于防御 SYN 洪泛的 SYN-cookie 机制,但这里进一步要求发起连接的机器付出 CPU 成本,才能预留一个 TCP 连接槽位。

In this scenario it may be desirable to avoid keeping per connection state, until the client has computed a token with the interactive hashcash cost-function. This defense is similar to the syn-cookie defense to the syn-flood attack, but here we propose to additionally impose a CPU cost on the connecting machine to reserve a TCP connection-slot.

为了避免将挑战保存在连接状态中(这本身也占用空间),服务器可以对原本要保存的信息计算带密钥的消息认证码(MAC),并将其作为挑战的一部分发给客户端;客户端返回挑战和凭证时,服务器即可验证其真实性。(把原本要存储的记录连同 MAC 一起发送给该信息所涉及的实体,这种通用技术称为对称密钥证书。)这与 SYN-cookie 使用的技术类似。Juels 和 Brainard 在客户端谜题论文中也提出过相关方法,不过是在应用协议层实现。

To avoid storing the challenge in the connection state (which itself consumes space) the server may choose to compute a keyed MAC of the information it would otherwise store and sent it to the client as part of the challenge so it can verify the authenticity of the challenge and token when the client returns them. (This general technique – of sending a record you would otherwise store together with a MAC to the entity the information is about – is referred to as a symmetric key certificate.) This approach is analogous to the technique used in syn-cookies, and Juels and Brainard proposed a related approach but at the application protocol level in their client-puzzles paper.

例如,使用以服务器密钥 K 为密钥的 MAC 函数 ℳ,挑战的 MAC 可以如下计算:

For example with MAC function ℳ keyed by server key K the challenge MAC could be computed as:

公开参数:MAC 函数 ℳ(·, ·)
𝒞 ← CHAL(w)
  选择 c ∈ᴿ {0,1}ᵏ
  计算 m ← ℳ(K, t∥s∥p∥w∥c)
  返回 (t, s, p, w, c, m)
PUBLIC: MAC function ℳ(·, ·)
𝒞 ← CHAL(w)
  choose c ∈ᴿ {0,1}ᵏ
  compute m ← ℳ(K, t∥s∥p∥w∥c)
  return (t, s, p, w, c, m)

客户端必须将 MAC m、挑战 c 以及挑战参数 p 同响应凭证一起发回,以便服务器验证挑战及响应。服务器还应将连接参数纳入 MAC,至少包含足以识别连接槽位的信息,以及某种时间值或递增计数器 t,以防旧的挑战响应被收集起来,在槽位释放后再次使用。挑战和 MAC 通过 TCP SYN-ACK 响应消息发送,客户端则在 TCP ACK 消息中携带交互式 Hashcash 凭证(挑战响应)。与 SYN-cookie 一样,服务器在收到 TCP ACK 之前无须保存每条连接的状态。

The client must send the MAC m, and the challenge c and challenge parameters p with the response token so that the server can verify the challenge and the response. The server should also include in the MAC the connection parameters, at minimum enough to identify the connection-slot and some time measurement or increasing counter t so that old challenge responses can not be collected and re-used after the connection-slots are free. The challenge and MAC would be sent in the TCP SYN-ACK response message, and the client would include the interactive hashcash token (challenge-response) in the TCP ACK message. As with syn-cookies, the server would not need to keep any state per connection prior to receiving the TCP ACK.

为保持与支持 SYN-cookie 的 TCP 协议栈的向后兼容,支持 Hashcash-cookie 的协议栈只在检测到 TCP 连接耗尽攻击时才启用它。可以用类似 Dan Bernstein 在文献 [5] 中的论证说明兼容性仍然成立:在 SYN 洪泛攻击下,Bernstein 说明了如何兼容不支持 SYN-cookie 的实现;类似地,在连接耗尽攻击下,要等到不支持 Hashcash-cookie 的协议栈本来就已无法获得服务时,才开启 Hashcash-cookie;也就是说,即便不开启这项机制,这些协议栈也已无法获得服务。

For backwards compatibility with syn-cookie aware TCP stacks, a hashcash-cookie aware TCP stack would only turn on hashcash-cookies when it detected that it was subject to a TCP connection-depletion attack. Similar arguments as given by Dan Bernstein in [5] can be used to show that backwards compatibility is retained, namely under syn-flood attacks Bernstein’s arguments show how to provide backwards compatibility with non syn-cookie aware implementations; similarly under connection-depletion attack hashcash-cookies are only turned on at a point where service would anyway otherwise be unavailable to a non-hashcash-cookie aware TCP stack.

随着洪泛加剧,Hashcash-cookie 算法会提高 TCP ACK 消息中所要求的碰撞位数。假设 DoS 攻击者的 CPU 资源有限,支持 Hashcash-cookie 的客户端仍能连接,尽管速度越来越慢,并且与攻击者竞争时有更公平的机会。攻击者实际上是在用自己的 CPU,与所有同样试图连接且支持 Hashcash-cookie 的客户端的 CPU 抗衡。没有这项防御,攻击者就能大量发起连接,更容易占满所有槽位:只需在每个空闲连接超时周期内完成 n 条连接(n 为连接表容量),或者在每个超时周期内对这些连接探测一次,让服务器相信它们仍然活跃。

As the flood increases in severity the hashcash-cookie algorithm would increase the collision size required to be in the TCP ACK message. The hashcash-cookie aware client can still connect (albeit increasinly slowly) with a more fair chance against the DoS attacker presuming the DoSer has limited CPU resources. The DoS attacker will effectively be pitting his CPU against all the other (hashcash-cookie aware) clients also trying to connect. Without the hashcash-cookie defense the DoSer can flood the server with connection establishments and can more easily tie up all it’s slots by completing n connections per idle connection time-out where n is the size of the connection table, or pinging the connections once per idle connection time-out to convince the server they are alive.

各用户获得的连接数量,大致与其拥有的 CPU 资源成正比,因此这种公平性以 CPU 资源为基础(假定每位用户都尽量多地建立连接)。结果会偏向处理器较快的客户端,因为它们每秒能计算更多交互式 Hashcash 挑战响应凭证。

Connections will be handed out to users collectively in rough proportion to their CPU resources, and so fairness is CPU resource based (presuming each user is trying to open as many connections as he can) so the result will be biased in favor of clients with fast processors as they can compute more interactive-hashcash challenge-response tokens per second.

5 Hashcash 的改进

5 Hashcash improvements

在最初发表的 Hashcash 方案中,用服务名称的哈希作为寻找哈希碰撞的目标字符串,以保证公平;在交互式场景中,则使用服务名称和挑战的哈希。后来 Hal Finney [6] 和 Thomas Boschloo [7] 分别独立提出一项改进:寻找针对固定输出字符串的碰撞。他们指出,固定的碰撞目标同样公平,而且更简单,能将验证成本减半。便于比较候选碰撞的固定目标,是 k 比特全零串 0ᵏ,其中 k 为哈希输出长度。

In the initially published hashcash scheme, the target string to find a hash collision on was chosen fairly by using the hash of the service-name (and respectively the service-name and challenge in the interactive setting). A subsequent improvement suggested independently by Hal Finney [6] and Thomas Boschloo [7] for hashcash is to find a collision against a fixed output string. Their observation is that a fixed collision target is also fair, simpler and reduces verification cost by a factor of 2. A fixed target string which is convenient to compare trial collisions against is the k-bit string 0ᵏ where k is the hash output size.

6 低方差

6 Low Variance

理想情况下,成本函数凭证应消耗可预测数量的计算资源。Juels 和 Brainard 的客户端谜题通过发出已知答案的挑战,提供了有界概率成本。不过,虽然这限制了理论上的最坏运行时间,但对方差和通常实际需要的运行时间影响有限。已知答案的方法也不适用于非交互式场景。是否存在验证成本与 Hashcash 同一数量级、具有有界概率成本或固定成本的非交互式成本函数,仍是一个尚待解决的问题。

Ideally cost-function tokens should take a predictable amount of computing resources to compute. Juels and Brainard’s client-puzzle construction provides a probabilistic bounded-cost by issuing challenges with known-solutions, however while this limits the theoretical worst case running time, it makes limited practical difference to the variance and typical experienced running time. The technique of using known solutions is also not applicable to the non-interactive setting. It is an open question as to whether there exist probabilistic bounded-cost, or fixed-cost non-interactive cost-functions with the same order of magnitude of verification cost as hashcash.

Juels 和 Brainard 另一项效果更显著的改进,是建议使用多个子谜题,在保持相同期望成本的同时降低成本方差。这种技术应当同时适用于非交互式和交互式 Hashcash。

The other more significant incremental improvement due to Juels and Brainard is the suggestion to use multiple sub-puzzles with the same expected cost, but lower variance in cost. This technique should be applicable to both the non-interactive and interactive variants of hashcash.

6.1 不可并行性与分布式拒绝服务

6.1 Non-Parallelizability and Distributed DoS

Roger Dingledine、Michael Freedman 和 David Molnar 在文献 [8] 第 16 章提出,不可并行的成本函数更不容易遭受分布式拒绝服务(DDoS)攻击。他们认为,这种函数使攻击者无法拆分单个凭证的计算工作并分派出去,从而阻碍 DDoS。

Roger Dingledine, Michael Freedman and David Molnar put forward the argument that non-parallelizable cost-functions are less vulnerable to Distributed DoS (DDoS) in chapter 16 of [8]. Their argument is that non-parallelizable cost-functions frustrate DDoS because the attacker is then unable sub-divide and farm out the work of computing an individual token.

作者在文献 [9] 中描述了一种使用 Rivest、Shamir 和 Wagner 的时间锁谜题 [10] 的固定成本函数,它也恰好不可并行。用户可以安全地自行选择挑战,所以时间锁谜题成本函数既适用于交互式场景,也适用于非交互式场景。Dingledine 等人后来在文献 [8] 中也注意到 Rivest 等人的时间锁谜题可以用作成本函数。

The author described a fixed-cost cost-function in [9] using Rivest, Shamir and Wagner’s time-lock puzzle [10] which also happens to be non-parallelizable. The time-lock puzzle cost-function can be used in either an interactive or non-interactive setting as it is safe for the user to chose their own challenge. The applicability of Rivest et al’s time-lock puzzle as a cost-function was also subsequently observed by Dingledine et al in [8].

为求完整,这里列出文献 [9] 中基于时间锁谜题的固定成本、不可并行成本函数:

For completeness we present the time-lock puzzle based fixed-cost and non-parallelizable cost-function from [9] here:

公开参数:n = pq
秘密参数:素数 p 和 q,φ(n) = (p − 1)(q − 1)
𝒞 ← CHAL(s, w)
  选择 c ∈ᴿ [0, n)
  返回 (s, c, w)
𝒯 ← MINT(𝒞)
  计算 x ← ℋ(s∥c)
  计算 y ← x^(x^w) (mod n)
  返回 (s, c, w, y)
𝒱 ← VALUE(𝒯)
  计算 x ← ℋ(s∥c)
  计算 z ← x^w mod φ(n)
  若 x^z = y (mod n),返回 w
  否则返回 0
PUBLIC: n = pq
PRIVATE: primes p and q, φ(n) = (p − 1)(q − 1)
𝒞 ← CHAL(s, w)
  choose c ∈ᴿ [0, n)
  return (s, c, w)
𝒯 ← MINT(𝒞)
  compute x ← ℋ(s∥c)
  compute y ← x^(x^w) (mod n)
  return (s, c, w, y)
𝒱 ← VALUE(𝒯)
  compute x ← ℋ(s∥c)
  compute z ← x^w mod φ(n)
  if x^z = y (mod n) return w
  else return 0

客户端不知道 φ(n),因此计算 MINT() 最有效的方法是重复求幂,需要进行 w 次幂运算。挑战发起者知道 φ(n),可以将指数对 φ(n) 取模以提高计算效率,因此只需两次模幂运算就能执行 VALUE()。这也带来一个副作用:挑战发起者在计算成本函数时拥有陷门,因为他可以用同样的算法高效计算 MINT()。

The client does not know φ(n), and so the most efficient method for the client to calculate MINT() is repeated exponentiation, which requires w exponentiations. The challenger knows φ(n) which allows a more efficient computation by reducing the exponent mod φ(n), so the challenger can execute VALUE() with 2 modular exponentiations. The challenger as a side-effect has a trapdoor in computing the cost-function as he can compute MINT() efficiently using the same algorithm.

不过,我们认为不可并行成本函数带来的额外 DDoS 防护很有限:除非服务器能识别各个独立客户端,并限制每个客户端获得的挑战数量,否则攻击者可以像分派拆开的单个挑战一样,轻松分派多个挑战,并以原来的速度消耗服务器资源。此外,单个客户端伪装成多个客户端并不很难。

We argue however that the added DDoS protection provided by non-parallelizable cost-functions is marginal: unless the server restricts the number of challenges it hands out to a recognizably unique client the DDoS attacker can farm out multiple challenges as easily as farm out a sub-divided single challenge, and consume resources on the server at the same rate as before. Further it is not that hard for a single client to masquerade as multiple clients to a server.

还应考虑:DDoS 攻击者获取算力的方式通常是控制其他节点,因此他手中的联网节点数量一般与处理器数量相当。因此,他完全可以让每个攻击节点直接参与正常协议,与合法用户无法区分。这种策略在其他方面也已是最佳选择,因为攻击节点会呈现多种源地址,从而挫败按连接公平限流的策略,以及路由器上按 IP 地址范围流量进行的 DDoS 防御。因此,对于攻击者通常采用的节点调配方式,不可并行成本函数提供的额外抵抗力有限。

Consider also: the DDoS attacker has generally due to the nature of his method of commandeering nodes an equal number of network connected nodes at his disposal as processors. He can therefore in any case have each attack node directly participate in the normal protocol indistinguisably from any legitimate user. This attack strategy is also otherwise optimal anyway as the attack nodes will present a varied set of source addresses which will foil attempts at per-connection fairness throttling strategies and router based DDoS counter-measures based on volume of traffic across IP address ranges. Therefore for the natural attack node marshalling patterns non-parallelizable cost-functions offer limited added resistance.

除了上述对不可并行成本函数实际效果和价值的质疑之外,迄今不可并行成本函数的验证函数,比不可并行成本函数慢了数个数量级。这是因为文献中讨论过的不可并行成本函数,都与带陷门的公钥密码结构有关,而这些结构本身效率较低。是否存在基于对称密钥(或公钥)结构的不可并行成本函数,使其验证函数与基于对称密码的成本函数处于同一数量级,仍是一个尚待解决的问题。

As well as the arguments against the practical efficacy and value of non-parallelizable cost-functions, to date non-parallelizable cost functions have had orders of magnitude slower verification functions than non-parallelizable cost-functions. This is because the non-parallelizable cost-functions so far discussed in the literature are related to trapdoor public key cryptography constructs which are inherently less efficient. It is an open question as to whether there exist non-parallelizable cost-functions based on symmetric-key (or public-key) constructs with verification functions of the same order of magnitude as those of symmetric-crypto based cost-functions.

将时间锁谜题用作成本函数时,虽然可以通过缩短公钥长度来加快验证,但这样会引入模数被分解的风险,使攻击者在铸造凭证时获得巨大优势。(注意:整数分解本身在很大程度上是可并行的计算。)

While for the application of time-lock puzzles to cost-functions, a reduced public key size could be used to speed up the verification function, this approach introduces risk that the modulus will be factored with the result that the attacker gains a big advantage in minting tokens. (Note: factoring is itself a largely parallelizable computation.)

为应对这种风险,服务器应定期更换公开参数。不过,时间锁谜题所用的公开参数与 RSA 加密中的 RSA 模数相同,生成它们本身也有一定开销,因此不会更换得太频繁。对这种应用,部署密钥长度低于 768 比特的软件可能并不明智;此外,定期更换密钥也有帮助,例如约每小时一次。(文献 [11] 讨论了一个非公开团队最近分解 512 比特 RSA 模数的工作;更近期,文献 [12] 报道 Nicko van Someren 等人演示了用办公室标准设备完成分解。已知 DDoS 攻击者能调动相当多的资源,很可能轻易超过该演示所用的资源。)

To combat this the server should change the public parameters periodically. However in the particular case of the public parameters used by time-lock puzzles (which are the same as the RSA modulus used in RSA encryption), this operation is itself moderately expensive, so this operation would not be performed too frequently. It would probably not be wise to deploy software based on key sizes below 768 bits for this aplication, in addition it would help to change keys periodically, say every hour or so. (RSA modulii of 512 bits have recently been factored by a closed group as discussed in [11] and more recently have been demonstrated by Nicko van Someren et al to be factorizable using standard equipment in an office as reported in [12]; DDoS attackers are known be able to muster significant resources, probably easily exceeding those used in this demonstration.)

时间锁谜题成本函数也必然具有陷门,因为服务器需要私有验证密钥才能高效验证凭证。验证密钥的存在带来了泄露风险,使攻击者可能绕过成本函数的防护。(相比之下,交互式 Hashcash 成本函数没有陷门,不存在能让攻击者走捷径计算凭证的密钥。)验证密钥泄露后确实可以更换,但这增加了复杂性和管理负担:必须检测到泄露,并进行人工干预,或实现能够触发密钥更换的自动检测机制。

The time-lock puzzle cost-function also is necessarily trap-door as the server needs a private verification-key to allow it to efficiently verify tokens. The existance of a verification-key presents the added risk of key compromise allowing the attacker to by-pass the cost-function protection. (The interactive hashcash cost-function by comparison is trap-door-free, so there is no key which would allow an attacker a short-cut in computing tokens). In fact if the verification-key were compromised, it could be replaced, but this need adds complexity and administrative overhead as this event needs to be detected and manual intervention or some automated detection triggering key-replacement implemented.

时间锁谜题成本函数的消息通常也更大,因为需要传递按计划或紧急更换的公开参数。对于 SYN-cookie 和 Hashcash-cookie 等协议,受向后兼容性及网络基础设施的数据包大小限制,消息空间十分宝贵。

The time-lock puzzle cost-function also will tend to have larger messages as there is a need to communicate planned and emergency re-keyed public parameters. For some applications, for example the syn-cookie and hashcash-cookie protocols, space is at a premium due to backwards compatibility and packet size constraints imposed by the network infrastructure.

因此,我们认为不可并行成本函数抵御 DDoS 的实际价值存疑:验证成本更高,存在验证密钥泄露的风险及相应的密钥管理复杂性,消息更大,实现也复杂得多。我们因而推荐更简单的 Hashcash 协议;如果不需要公开核验和非交互式选项,Juels 和 Brainard 的客户端谜题也大致等效。

So in summary we argue that non-parallelizable cost-functions are of questionable practical value in protecting against DDoS attacks, have more expensive verification functions, incur the risk of verification key compromise and attendant key management complexities, have larger messages, and are significantly more complex to implement. We therefore recommend instead the simpler hashcash protocol (or if the public-auditability and non-interactive options are not required Juels and Brainard’s client-puzzles are roughly equivalent).

7 应用

7 Applications

除了最初提出的遏制针对邮件转发网络的 DoS 攻击及阻止垃圾邮件外,自发表以来,下列应用也得到讨论、探索,部分已实现和部署:

Apart from the initially proposed applications for hashcash of throttling DoS against remailer networks and detering email spam, since publication the following applications have been discussed, explored and in some cases implemented and deployed:

• 第 4.2 节讨论的 Hashcash-cookie,是 SYN-cookie 的一种潜在扩展,使服务在连接耗尽攻击下可以更平缓地降级。

• hashcash-cookies, a potential extension of the syn-cookie as discussed in section 4.2 for allowing more graceful service degradation in the face of connection-depletion attacks.

• 第 4 节讨论的交互式 Hashcash,用于安全协议遭受 CPU 过载攻击时的 DoS 限流与平缓服务降级,这些协议的连接建立过程计算成本较高。尚未部署,但文献 [13] 已将类似的客户端谜题系统用于 TLS。

• interactive-hashcash as discussed in section 4 for DoS throttling and graceful service degradation under CPU overload attacks on security protocols with computationally expensive connection establishment phases. No deployment but the analogous client-puzzle system was implemented with TLS in [13]

• 用 Hashcash 限制 Freenet [14]、Publius [15]、Tangler [16] 等匿名发布系统中通过大量发布造成的 DoS 洪泛。

• hashcash throttling of DoS publication floods in anonymous publication systems such as Freenet [14], Publius [15], Tangler [16],

• 用 Hashcash 对密码学自认证文件系统(Self-certifying File System)中的服务请求限流 [17]。

• hashcash throttling of service requests in the cryptographic Self-certifying File System [17]

• 用 Hashcash 限制通过 mail2news 网络发起的 USENET 洪泛 [18]。

• hashcash throttling of USENET flooding via mail2news networks [18]

• 将 Hashcash 用作 Wei Dai 的 b-money 电子现金提案的铸币机制;这是一种没有银行接口的电子现金方案 [19]。

• hashcash as a minting mechanism for Wei Dai’s b-money electronic cash proposal, an electronic cash scheme without a banking interface [19]

8 成本函数的分类方法

8 Cost-function classification scheme

下面列出成本函数特征的分类方法。我们用以下符号表示成本函数的属性:

We list here a classification of characteristics of cost-functions. We use the following notation to denote the properties of a cost-function:

([e = {1, 1/2, 0}], [σ = {0, 1/2, 1}], [{i, ī}], [{a, ā}], [{t, t̄}], [{p, p̄}])
([e = {1, 1/2, 0}], [σ = {0, 1/2, 1}], [{i, ī}], [{a, ā}], [{t, t̄}], [{p, p̄}])

其中 e 表示效率。e = 1 表示可高效验证:验证成本不高于或接近 Hashcash 这样的对称密钥结构;Hashcash 只需对 SHA1 或 MD5 这类基于迭代压缩函数的哈希函数执行一轮压缩。e = 1/2 表示可实用验证:不如“可高效验证”那样高效,但对某些应用仍然足够实用;例如,作者认为需要两次模幂运算的时间锁谜题成本函数属于这一类。e = 0 表示可以验证但不实用:成本函数可验证,但验证函数慢到无法实用,因此它只起到概念验证的作用,还须改进才能实际应用。

Where e is the efficiency: value e = 1 means efficiently-verifiable – verifiable with cost comparable to or lower than the cost of verifying symmetric key constructs such as hashcash which consume just a single compression round of an iterative compression function based hash function such as SHA1 or MD5. Value e = 1/2 means practically-verifiable we mean less efficiently than efficienty-verifiable, but still efficient enough to be practical for some applications, for example the author considers the time-lock puzzle based cost-function with it’s two modular exponentiations to fall into this category. Value e = 0 means verifiable but impractical, that the cost-function is verifiable but the verification function is impractically slow such that the existance of the cost-function serves only as a proof of concept to be improved upon for practical use.

σ 描述标准差:σ = 0 表示固定成本,σ = 1/2 表示有界概率成本,σ = 1 表示无界概率成本。注意,有界概率成本的上界必须有实际意义。对于一个功能相近的无界成本函数,如果某个工作量只有在概率可忽略的极少数情况下才会达到,而所设上界比这个工作量还高,那么这样的上界就没有用处。

And σ is a characterization of the standard-deviation, value σ = 0 means fixed-cost, σ = 1/2 means bounded probabilistic cost and σ = 1 means unbounded probabilistic cost. Note by bounded probabilistic-cost we mean usefully bounded – a bound in the work factor in excess of a work-factor that an otherwise functionally similar unbounded cost-function would only reach with negligible probability would not be useful.

i 表示成本函数是交互式的,ī 表示非交互式。

And i denotes that the cost-function is interactive, and ī that the cost-function is non-interactive.

a 表示成本函数可公开核验,ā 表示不能公开核验,实际含义是只能由服务方使用私有密钥材料验证。注意,公开核验是指高效的公开核验;我们不认为重复凭证铸造者所做的工作,具有足以归入此类的效率。

And a denotes that the cost-function is publicly auditable, ā denotes that the cost-function is not publicly auditable, which means in practice that it is only verifiable by the service using a private key material. Note by public-auditability we mean efficiently publicly-auditable, and would not consider repeating the work of the token minter as adequate efficiency to classify.

t 表示服务器在计算成本函数时拥有陷门;反之,t̄ 表示服务器没有陷门。

And t denotes that the server has a trapdoor in computing the cost-function, conversely t̄ denotes that server has no trapdoor in computing the cost-function.

p 表示成本函数可并行,p̄ 表示不可并行。

And p denotes that the cost-function is parallelizable, p̄ deontes that the cost-function is non-parallelizable.

成本函数分类表
交互方式无陷门有陷门
交互式Hashcash
(e = 1, σ = 1, i, a, t̄, p)
客户端谜题
(e = 1, σ = 1/2, i, a, t, p)
时间锁
(e = 1/2, σ = 0, i, ā, t, p̄)
非交互式Hashcash
(e = 1, σ = 1, ī, a, t̄, p)
时间锁
(e = 1/2, σ = 0, ī, ā, t, p̄)
Cost-function classification table
trapdoor-freetrapdoor
interactivehashcash
(e = 1, σ = 1, i, a, t̄, p)
client-puzzles
(e = 1, σ = 1/2, i, a, t, p)
time-lock
(e = 1/2, σ = 0, i, ā, t, p̄)
non-interactivehashcash
(e = 1, σ = 1, ī, a, t̄, p)
time-lock
(e = 1/2, σ = 0, ī, ā, t, p̄)

8.1 尚待解决的问题

8.1 Open Problems

• 是否存在可高效验证、非交互式、固定成本的成本函数 (e = 1, σ = 0, ī);以及条件更宽松的相关问题:是否存在具有有界概率成本的同类函数 (e = 1, σ = 1/2, ī)。

• existance of efficiently-verifiable non-interactive fixed-cost cost-functions (e = 1, σ = 0, ī) (and the related weaker problem: existance of same with probabilistic bounded-cost (e = 1, σ = 1/2, ī))

• 是否存在可高效验证、非交互式、不可并行的成本函数 (e = 1, ī, p̄);以及条件更宽松的相关问题:是否存在交互式场景中的同类函数 (e = 1, i, p̄)。

• existance of efficiently-verifiable non-interactive non-parallelizable cost-functions (e = 1, ī, p̄) (and the related weaker problem: existance of same in interactive setting (e = 1, i, p̄))

• 是否存在可公开核验、非交互式、固定成本的成本函数 (σ = 0, ī, a);以及条件更宽松的相关问题:是否存在具有有界概率成本的同类函数 (σ = 1/2, ī, a)。

• existance of publicly-auditable non-interactive fixed-cost cost-functions (σ = 0, ī, a) (and the related weaker problem: existance of same with bounded probabilistic-cost (σ = 1/2, ī, a))

参考文献

References

[1] Adam Back。《Hashcash》,1997 年 5 月。发布于 http://www.cypherspace.org/hashcash/

[1] Adam Back. Hashcash, May 1997. Published at http://www.cypherspace.org/hashcash/.

[2] Cynthia Dwork、Moni Naor。《以计算付费,或如何对抗垃圾邮件》。载于 Crypto 会议论文集,1992 年。亦见 http://www.wisdom.weizmann.ac.il:81/Dienst/UI/2.0/Describe/ncstrl.weizmann_il/CS95-20

[2] Cynthia Dwork and Moni Naor. Pricing via processing or combatting junk mail. In Proceedings of Crypto, 1992. Also available as http://www.wisdom.weizmann.ac.il:81/Dienst/UI/2.0/Describe/ncstrl.weizmann_il/CS95-20.

[3] Ari Juels、John Brainard。《客户端谜题:抵御连接耗尽攻击的密码学对策》。载于网络与分布式系统安全研讨会(Network and Distributed System Security Symposium),1999 年。亦见 http://www.rsasecurity.com/rsalabs/staff/bios/ajuels/publications/client-puzzles/

[3] Ari Juels and John Brainard. Client puzzles: A cryptographic countermeasure against connection depletion attacks. In Network and Distributed System Security Symposium, 1999. Also available as http://www.rsasecurity.com/rsalabs/staff/bios/ajuels/publications/client-puzzles/.

[4] Markus Jakobsson、Ari Juels。《工作量证明与面包布丁协议》。载于 IFIP TC6 与 TC11 通信与多媒体安全联合工作会议(CMS ’99)论文集,比利时鲁汶,1999 年 9 月。亦见 http://citeseer.nj.nec.com/238810.html

[4] Markus Jakobsson and Ari Juels. Proofs of work and bread pudding protocols. In Proceedings of the IFIP TC6 and TC11 Joint Working Conference on Communications and Multimedia Security (CMS ’99), Leuven, Belgium, September 1999. Also available as http://citeseer.nj.nec.com/238810.html.

[5] Dan Bernstein。《SYN cookies》。发布于 http://cr.yp.to/syncookies.html

[5] Dan Bernstein. Syn cookies. Published at http://cr.yp.to/syncookies.html.

[6] Hal Finney。私人通信,2002 年 3 月。

[6] Hal Finney. Personal communication, Mar 2002.

[7] Thomas Boschloo。私人通信,2002 年 3 月。

[7] Thomas Boschloo. Personal communication, Mar 2002.

[8] Andy Oram,编。《点对点:驾驭颠覆性技术的力量》。O’Reilly and Associates,2001 年。第 16 章亦见 http://freehaven.net/doc/oreilly/accountability-ch16.html

[8] Andy Oram, editor. Peer-to-Peer: Harnessing the Power of Disruptive Technologies. O’Reilly and Associates, 2001. Chapter 16 also available as http://freehaven.net/doc/oreilly/accountability-ch16.html.

[9] Adam Back。《Hashcash:可摊销、可公开核验的成本函数》。论文早期草稿,2000 年。

[9] Adam Back. Hashcash - amortizable publicly auditable cost functions. Early draft of paper, 2000.

[10] Ronald L Rivest、Adi Shamir、David A Wagner。《时间锁谜题与定时释放密码学》。技术报告 MIT/LCS/TR-684,1996 年。亦见 http://theory.lcs.mit.edu/~rivest/publications.html

[10] Ronald L Rivest, Adi Shamir, and David A Wagner. Time-lock puzzles and timed-release crypto. Technical Report MIT/LCS/TR-684, 1996. Also available as http://theory.lcs.mit.edu/~rivest/publications.html.

[11] Herman te Riele。《512 比特整数分解威胁电子商务安全》。1999 年 8 月,发布于 http://www.cwi.nl/~kik/persb-UK.html,

[11] Herman te Riele. Security of e-commerce threatened by 512-bit number factorization. Published at http://www.cwi.nl/~kik/persb-UK.html, Aug 1999.

[12] Dennis Fisher。《专家讨论密码学面临的风险》,2002 年 3 月。亦见 http://www.eweek.com/article/0,3658,s=720&a=24663,00.asp

[12] Dennis Fisher. Experts debate risks to crypto, Mar 2002. Also available as http://www.eweek.com/article/0,3658,s=720&a=24663,00.asp.

[13] Drew Dean、Adam Stubblefield。《使用客户端谜题保护 TLS》。载于第 10 届 USENIX 安全研讨会论文集,2001 年 8 月。亦见 http://www.cs.rice.edu/~astubble/papers.html

[13] Drew Dean and Adam Stubblefield. Using cleint puzzles to protect tls. In Proceedings of the 10th USENIX Security Symposium, Aug 2001. Also available as http://www.cs.rice.edu/~astubble/papers.html.

[14] Ian Clarke、Oskar Sandberg、Brandon Wiley、Theodore Hong。《Freenet:分布式匿名信息存储与检索系统》。载于 Hannes Federrath 编《匿名性与不可观察性设计问题国际研讨会论文集》。Springer,2001 年。亦见 http://freenetproject.org/cgi-bin/twiki/view/Main/Papers

[14] Ian Clarke, Oskar Sandberg, Brandon Wiley, and Theodore Hong. Freenet: A distributed anonymous information storage and retrieval system. In Hannes Federrath, editor, Proceedings of the International Workshop on Design Issues in Anonymity and Unobservability. Springer, 2001. Also available as http://freenetproject.org/cgi-bin/twiki/view/Main/Papers.

[15] Marc Waldman、Aviel D Rubin、Lorrie Faith Cranor。《Publius:稳健、篡改可检测、抗审查的网络发布系统》。载于第 9 届 USENIX 安全研讨会论文集,2000 年 8 月。亦见 http://www.usenix.org/publications/library/proceedings/sec2000/waldman/waldman_html/v2.html

[15] Marc Waldman, Aviel D Rubin, and Lorrie Faith Cranor. Publius: A robust, tamper-evident, censorship-resistant web publishing system. In Proceedings of the 9th USENIX Security Symposium, Aug 2000. Also available as http://www.usenix.org/publications/library/proceedings/sec2000/waldman/waldman_html/v2.html.

[16] Marc Waldman、David Mazieres。《Tangler:基于文档纠缠的抗审查发布系统》。载于第 8 届 ACM 计算机与通信安全会议论文集,2001 年 11 月。亦见 http://www.cs.nyu.edu/~waldman/

[16] Marc Waldman and David Mazieres. Tangler: A censorship resistant publishing system based on document entanglement. In Proceedings of the 8th ACM Conference on Computer and Communication Security, Nov 2001. Also available as http://www.cs.nyu.edu/~waldman/.

[17] David Mazieres。《自认证文件系统》。博士论文,麻省理工学院,2000 年 5 月。亦见 http://scs.cs.nyu.edu/~dm/

[17] David Mazieres. Self-certifying File System. PhD thesis, Massachusetts Institute of Technology, May 2000. Also available as http://scs.cs.nyu.edu/~dm/.

[18] Alex de Joode。《dizum mail2news 网关对 Hashcash 的支持》。2002 年,发布于 https://ssl.dizum.com/hashcash/,

[18] Alex de Joode. Hashcash support at dizum mail2news gateway. Published at https://ssl.dizum.com/hashcash/, 2002.

[19] Wei Dai。《b-money》。1998 年 11 月,发布于 http://www.eskimo.com/~weidai/bmoney.txt,

[19] Wei Dai. b-money. Published at http://www.eskimo.com/~weidai/bmoney.txt, Nov 1998.

原始 PDF · 英文文本 · [2]

两份资料,两个时间

现存邮件列表记录保存了 Adam Back 在 1997 年 3 月 28 日发布的 Hashcash 实现公告。系统论文署期为 2002 年 8 月 1 日。论文把最初提案回溯为 1997 年 5 月,与早期公告不同;这里以当年邮件日期标示公开记录,并保留论文的记述。

依据 [1] [2]

最初是计算邮资

Hashcash 最初针对垃圾邮件及匿名邮件转发服务的滥用:发送者先付出计算,再提交能够迅速检查的凭证。大规模发送需要更多工作;“现金”在这里是计算邮资的比喻。

依据 [1]

难找答案,容易核验

2002 年论文描述的版本通过反复尝试,寻找哈希结果满足指定前导零条件的凭证。生成通常需要许多次计算,核验则很快。凭证绑定具体服务;服务端记录已用凭证,拒绝重复提交,并可通过有效期限制记录规模。

依据 [2]

为什么它还不是 Bitcoin

Back 在公告中指出,发给某个服务的 Hashcash 不能直接作为通用现金转让。若另设银行用凭证兑换可流通现金,又必须信任它不会私自增发。由此可见,仅有计算成本还不够。

依据 [1]

与 Bitcoin 的关系:白皮书直接引用

Bitcoin 白皮书第 4 节明确采用类似 Hashcash 的工作量证明,将它用于分布式时间戳链。2008 年 8 月 20 日,中本聪还写信向 Back 核对论文引用,说明自己为基于哈希的工作量证明找到了电子现金用途。这是有文献与通信共同支持的联系。

依据 [3] [4]

作者小传

Adam Back

应用密码学研究者、Hashcash 作者,获埃克塞特大学分布式系统与计算机科学博士学位。他后来联合创办 Blockstream,并于 2016 年出任该公司首席执行官。

依据 [5]

原始资料与核对来源

  1. Adam Back: [ANNOUNCE] hash cash postage implementation ↗

    1997 年 3 月 28 日作者公告的邮件列表存档

  2. Hashcash — A Denial of Service Counter-Measure · 站内全文 · 原站核对 ↗

    2002 年 8 月 1 日论文原文的存档副本

  3. Bitcoin: A Peer-to-Peer Electronic Cash System ↗

    白皮书第 4 节与参考文献 [6]

  4. Adam Back — Satoshi correspondence, exhibit AB1 ↗

    Adam Back 公开的通信证物原件;站内保存副本

  5. Blockstream Appoints Hashcash Inventor Dr. Adam Back as CEO ↗

    2016 年任命公告与人物经历

关联阅读

← 返回比特币之前比特币白皮书 →

阅读字号

选择适合你的字号,之后阅读会继续使用。