目录
正在加载目录…
正在阅读专栏 分布式共识系统专栏 第 28 篇 · 共 59 篇 · 47%

MIT 6.5840:Lecture 19 Fork Consistency, SUNDR

发布于 2026-09-21 10:06 · 最后编辑于 2026-09-21 18:14 · 版本 v2 · 字数 17,380 · 预计阅读 35 分钟 👁 26 次阅读

本篇逐行译注 MIT 6.5840 Spring 2026 Lecture 19,覆盖 SUNDR、untrusted storage、cryptographic hash、digital signature、hash tree、fork consistency、serialized SUNDR 与 version vector。

MIT 6.5840:Lecture 19 Fork Consistency, SUNDR

TL;DR

  • SUNDR 的目标:即使 storage server 不可信,也让 clients 能发现 data integrity 被破坏、更新被隐藏或顺序被篡改;目标是 integrity,不是 secrecy。
  • 基础工具:cryptographic hashes 用于 content-addressed storage 和 hash trees;digital signatures 用于证明某个 user 对 value 或 filesystem state 的签名。
  • 为什么 signature 还不够:server 不能伪造签名,却能返回旧的正确签名版本、向不同 readers 展示不同 versions,造成跨文件的不一致视图。
  • Fork consistency:server 可以永久把 users 分叉,分别隐藏彼此的 updates;但一旦 fork,server 不能重新愈合 fork 并同时满足已有签名和访问历史约束。
  • 实用化:serialized SUNDR 用每个 user 的 signed handle、hash tree 和 version vector 代替不断增长的全量 log,以更低成本检测 server 是否试图“修复”一个已经存在的 fork。

名词解释

名词含义本讲对应物
Integrityclient 能确认读到的数据正确、未被篡改SUNDR 的主要目标
Secrecy未授权主体不能获知数据内容SUNDR 不负责的目标
Cryptographic hash把任意 data 映射为短 digest 的函数SHA-1、content hash
Digital signature用 private key 对 data 签名、用 public key 验证RSA 等
Hash tree用 content-hash blocks 组成的可验证树结构filesystem tree
Fork consistencyserver 可隐藏 updates 形成永久分叉,但不能愈合SUNDR 的 guarantee
Version vector每个 user 对其他 users 最新版本观察的向量serialized SUNDR
Handle包含 root hash、version information 和 signature 的对象当前 FS root 的 signed reference
Untrusted server可能 buggy、被攻破或恶意的 storage serviceSUNDR 的威胁模型

目录

章节内容
版本与来源固定 Lecture 19 源文件
原文逐行翻译按 l-sundr.txt 顺序译注
机制小结hash、signature、fork consistency 与 version vector
本篇验收源行、图示和表格记录

版本与来源

  • 课程版本:MIT 6.5840 Spring 2026。
  • Lecture 源文件:l-sundr.txt,306 行,非空源行 256 行,SHA-256:f726d6f33440dee51a441a7d954e3768c0abfe0ae7107a0cc5dae3d904604a6a。
  • 配套论文:SUNDR: A Secure Untrusted Data Repository,发表于 OSDI 2004。
  • 课程日程:MIT 6.5840 Spring 2026 Schedule。
  • 翻译边界:英文源行按原顺序保留,随后给出中文译文;SUNDR、integrity、secrecy、hash、digital signature、hash tree、fork consistency、version vector、handle、public/private key 等术语原样保留。
  • 图片结论:源文本没有独立图片文件;diagram、forked log、version-vector ASCII table 和 Figure 2/3 等占位按原文位置保留。

原文逐行翻译

安全与阅读动机

6.5840 2026 Lecture 19: Secure Untrusted Data Repository (SUNDR) (2004)

6.5840 2026 年 Lecture 19:Secure Untrusted Data Repository(SUNDR)(2004)。

We've mostly ignored security

我们此前基本忽略了 security。

A big topic, multiple MIT courses

这是一个很大的 topic,涉及多门 MIT courses。

A few lectures now, intersection with consistency and replication

现在安排几讲,讨论它与 consistency 和 replication 的交集。

Why this paper?

为什么选择这篇 paper?

We routinely trust storage services: github, gmail, AFS, Dropbox.

我们经常信任 storage services:github、gmail、AFS、Dropbox。

Google &c may mean well, but:

Google 等可能出于善意,但:

Maybe the server s/w or h/w is buggy, even exploitable.

也许 server s/w 或 h/w 存在 bug,甚至可以被 exploit。

Maybe an attacker guessed server admin password, modified s/w.

也许 attacker 猜到了 server admin password,并修改了 s/w。

Maybe an employee of the cloud provider is corrupt or sloppy.

也许 cloud provider 的 employee 腐败或粗心。

真实的问题

The problem is real!

这个问题是真实存在的!

Paper cites successful attacks on open source code repositories.

论文引用了针对 open source code repositories 的成功攻击。

Troubling: attacker can then modify source, perhaps w/o detection.

令人担忧的是:attacker 随后可以修改 source,而且可能不被 detection。

从不可信 server 获得可信 storage

Can we obtain trustworthy storage from non-trustworthy servers?

我们能否从 non-trustworthy servers 获得 trustworthy storage?

[diagram: clients, server]

 [diagram:clients、server]。

We want "integrity"

我们希望得到“integrity”。

Readers can check that they retrieve correct data.

Readers 可以检查自己 retrieve 到的是 correct data。

Server can't forge or hide updates or change update order.

Server 不能 forge 或 hide updates,也不能改变 update order。

e.g. can't hide a critical security patch.

例如:不能 hide 一个 critical security patch。

SUNDR goal is integrity -- not secrecy.

SUNDR 的目标是 integrity——不是 secrecy。

Uses cryptography only to verify data is correct.

它只使用 cryptography 来 verify data 是否正确。

SUNDR 使用的工具

What tools does SUNDR use for integrity?

SUNDR 使用什么 tools 来实现 integrity?

cryptographic hashes

cryptographic hashes。

digital signatures

digital signatures。

Cryptographic hash:SHA-1 示例

Cryptographic hash, e.g. SHA-1

Cryptographic hash,例如 SHA-1。

h = hash(data)

 h = hash(data)。

h is small, data can be large

 h 很小,data 可以很大。

for SHA-1, h is 160 bits

 对于 SHA-1,h 是 160 bits。

secure = not practical to find two different inputs that have the same hash

 secure 意味着:实际上无法找到两个 hash 相同的不同 inputs。

used to name data and/or to verify integrity

 用于命名 data,和/或用于 verify integrity。

用 hash 实现 secure storage

Secure storage with cryptographic hashes

使用 cryptographic hashes 的 secure storage。

suppose:

 假设:

you're using a cloud provider's key/value server

  你正在使用 cloud provider 的 key/value server。

you want to detect if server corrupts your data

  你想检测 server 是否 corrupts 了你的 data。

here's one way

  有一种实现方式如下。

client write(v):

 client write(v):

k = hash(v)

  k = hash(v)。

put(k, v)  -- RPC to server

  put(k, v) -- 发往 server 的 RPC。

return k

  return k。

client read(k):

 client read(k):

v = get(k)  -- RPC to server

  v = get(k) -- 发往 server 的 RPC。

if hash(v) != k: reject!

  if hash(v) != k:reject!

return v

  return v。

note k is used in two ways: as a name, and as hash for validation

注意 k 有两种用途:既作为 name,也作为 validation 使用的 hash。

Reader 如何获得 key

from where does a reading client get the key?

执行 read 的 client 从哪里得到 key?

can't choose keys -- key must be hash(v)

 不能选择 keys——key 必须是 hash(v)。

so reader can't predict keys -- must be told

  所以 reader 无法 predict keys——必须有人告诉它。

can e.g. publish on secure web pages

 例如可以发布在 secure web pages 上。

often used for e.g. secure software distributions

 常用于 secure software distributions 等场景。

Content-hash storage

this is secure storage with an untrusted server

这就是使用 untrusted server 的 secure storage。

if server corrupts data, client check will fail

 如果 server corrupts data,client check 会失败。

"content-hash storage"

 “content-hash storage”。

Hash tree

we can build secure list- and tree-shaped structures from content-hash storage

我们可以从 content-hash storage 构建 secure 的 list-shaped 和 tree-shaped structures。

[diagram: files... <- directory <- root key]

 [diagram:files... <- directory <- root key]。

root key allows client to retrieve and check the whole structure

 root key 允许 client retrieve 并 check 整个 structure。

even if blocks are stored in untrusted server

 即使 blocks 存储在 untrusted server 中也可以。

paper calls this a "hash tree"

 论文称其为“hash tree”。

Content-hash storage 的局限

content-hash storage is not enough for a read/write file system:

content-hash storage 对 read/write file system 还不够:

a key's value cannot change, since key = hash(v)

 key 的 value 不能改变,因为 key = hash(v)。

"immutable"

 “immutable”。

Digital signatures 与 mutable storage

Digital signatures (e.g. RSA) allow mutable storage

Digital signatures(例如 RSA)允许 mutable storage。

each user has a public/private key pair

 每个 user 都有一对 public/private key。

sig = sign(data, k_priv)

 sig = sign(data, k_priv)。

ok = verify(data, sig, k_pub)

 ok = verify(data, sig, k_pub)。

client write(k,v) OR UPDATE(k,v):

 client write(k,v) 或 UPDATE(k,v):

put(k, v+sign(v, k_priv))

  put(k, v+sign(v, k_priv))。

client read(k):

 client read(k):

v+sig = get(k)

  v+sig = get(k)。

if verify(v, sig, k_pub) != true: reject!

  if verify(v, sig, k_pub) != true:reject!

return v

  return v。

note k and k_priv are totally separate

注意 k 和 k_priv 是完全分离的。

the value can be modified w/o changing k

 value 可以被修改,而不改变 k。

anyone who knows k and k_pub can fetch the value and

 任何知道 k 和 k_pub 的人都可以 fetch value,并且

can check that owner of k_priv signed that value

  可以 check k_priv 的 owner 确实签署了该 value。

(though not quite "v is the correct value for k"!)

  (尽管这并不完全等于“v 是 k 的 correct value”!)

仅有 digital signatures 是否足够

Are digital signatures alone enough?

仅有 digital signatures 足够吗?

the server cannot forge a signature, so it cannot create arbitrary fake values

 server 不能 forge signature,因此不能创建任意 fake values。

the server can return an old correctly-signed value

 server 可以返回一个旧的、签名正确的 value。

so it can hide an update

  因此它可以 hide 一个 update。

or show different signed versions to different readers

  或者向不同 readers 展示不同的 signed versions。

or show old versions for some keys, new for other keys

  或者对某些 keys 展示 old versions,对其他 keys 展示 new versions。

these are serious security problems

  这些都是 serious security problems。

also we'd like a file system, not just individual data items

 此外我们想要的是 file system,而不只是 individual data items。

file names, directories, multiple users, permissions, &c

  file names、directories、multiple users、permissions 等。

Stale value 导致问题的示例

Example of a stale value causing a problem:

stale value 导致问题的示例:

Open source project, two files: x.c, NEWS

 一个 open source project,有两个 files:x.c、NEWS。

Storage server owned by someone else

 Storage server 由其他人拥有。

X: x.c -- v1

 X:x.c -- v1。

A: x.c -- v2 fixes a bug

 A:x.c -- v2,修复了一个 bug。

B: NEWS -- announce "bug fixed!"

 B:NEWS -- 宣布“bug fixed!”

C: read NEWS

 C:read NEWS。

C: read x.c

 C:read x.c。

Server could provide new NEWS but old x.c!

 Server 可以提供 new NEWS,却提供 old x.c!

Signatures would be correct! But it's the wrong x.c.

  Signatures 会是正确的!但这不是正确的 x.c。

SUNDR can prevent this!

 SUNDR 可以阻止这种情况!

SUNDR 的一个 idea

One of SUNDR's ideas:

SUNDR 的一个 idea:

Each update includes digital signature over entire file-system (FS).

 每个 update 都包含一个覆盖整个 file-system(FS)的 digital signature。

Thus B's update to NEWS includes a signature reflecting A's updated x.c

 因此 B 对 NEWS 的 update 包含一个反映 A 更新后 x.c 的 signature。

So if C sees B's updated NEWS,

 所以如果 C 看到 B 更新后的 NEWS,

signature will only check if C also sees A's new x.c

  只有当 C 同时看到 A 的 new x.c 时,signature 才能 check 通过。

Strawman design(Section 3.1)

Strawman design (Section 3.1)

Strawman design(Section 3.1)。

Server stores a complete log of file-system modifications

 Server 存储 file-system modifications 的 complete log。

create, write, rename, delete, mkdir, &c

  create、write、rename、delete、mkdir 等。

Clients ask server to append new operations.

 Clients 要求 server append new operations。

Clients reconstruct FS content by fetching and playing entire log.

 Clients 通过 fetch 并 replay entire log 来 reconstruct FS content。

Clients also ask server to append "fetch" log entries.

 Clients 还要求 server append “fetch” log entries。

Strawman details

Strawman details

Strawman details。

Log entries: fetch or modify, user, sig.

 Log entries:fetch 或 modify、user、sig。

Signature covers the entire log up to that point.

  Signature 覆盖截至该点的整个 log。

Client step:

 Client step:

Fetch entire log (other clients now wait).

  Fetch entire log(其他 clients 此时等待)。

Check the log:

  Check log:

  Correct signature in each entry, covering prior log.

   每个 entry 的 signature 都正确,并覆盖 prior log。

  Each operation is allowed by permissions.

   每个 operation 都得到 permissions 允许。

  This client's last log entry is present (so client must remember!).

   该 client 的 last log entry 存在(所以 client 必须 remember!)。

Construct FS state by replaying logged operations, from start.

  从头 replay logged operations,构造 FS state。

Append client's operation with signature over whole resulting log.

  为 client operation append 一个覆盖整个 resulting log 的 signature。

Upload log (then other clients can proceed).

  Upload log(随后其他 clients 才能继续)。

Client remembers its signed new entry (on local disk).

  Client remember 自己 signed 的 new entry(在 local disk 上)。

Inefficient but simple to reason about.

 效率低,但容易 reason about。

Strawman log 示例

Example straw-man log:

Straw-man log 示例:

mod(x.c), X, sig -- X creates x.c

 mod(x.c), X, sig -- X creates x.c。

mod(x.c), A, sig -- A applies a crucial security patch

 mod(x.c), A, sig -- A applies a crucial security patch。

mod(NEWS), B, sig -- B announces the patch

 mod(NEWS), B, sig -- B announces the patch。

Server 能否 forge log entry

Could the server forge a log entry?

server 能 forge 一个 log entry 吗?

No: it would need to know the private key of an authorized user.

不能:它需要知道 authorized user 的 private key。

Client 如何知道 authorized users 的 public keys

How do clients know the public keys of authorized users?

clients 如何知道 authorized users 的 public keys?

  1. All clients must be told public key of root directory owner.

 1. 必须把 root directory owner 的 public key 告诉所有 clients。

  1. File system itself stores the public key of each user.

 2. File system 自身存储每个 user 的 public key。

Server 能否 hide entry

Could the server hide an entry from C?

server 能 hide 一个 entry 不让 C 看到吗?

Yes.

可以。

Hiding and showing are the only bad things a SUNDR server can do.

Hiding 和 showing 是 SUNDR server 能做的仅有两类 bad things。

隐藏 A、B 的 updates

What if the server hides A's and B's updates from C?

如果 server 把 A 和 B 的 updates hide 不让 C 看到,会怎样?

C will read,

 C 会 read,

see just X's mod(x.c),

 只看到 X 的 mod(x.c),

ask to append a fetch() with a signature over what it saw,

 要求 append 一个覆盖其所见内容的 fetch() 及其 signature,

fetch(), C, sig

  fetch(), C, sig。

and remember its last operation (fetch(), C, sig).

 并 remember 它的 last operation(fetch(), C, sig)。

[diagram: start of a forked log]

 [diagram:forked log 的起点]。

Forked log

Server can continue to let C extend a "forked" log

Server 可以继续让 C 扩展一个“forked” log。

I'm assuming server is malicious, and has been modified to trick C

 这里假设 server 是 malicious 的,并且已被修改来 trick C。

Server 之后想向 C 展示 B 的 NEWS

Suppose later the server wants to show B's updated NEWS to C?

假设之后 server 想把 B 更新后的 NEWS 展示给 C?

It won't work for the server to show C the "real" log:

 server 不能把“real” log 展示给 C:

mod(x.c), X, sig

  mod(x.c), X, sig。

mod(x.c), A, sig

  mod(x.c), A, sig。

mod(NEWS), B, sig

  mod(NEWS), B, sig。

because C requires that its last operation (its fetch) be in the log.

  因为 C 要求它的 last operation(它的 fetch)位于 log 中。

It won't work for the server to insert NEWS before C's fetch:

 server 也不能把 NEWS 插到 C 的 fetch 之前:

mod(x.c), X, sig

  mod(x.c), X, sig。

mod(NEWS), B, sig

  mod(NEWS), B, sig。

fetch(), C, sig

  fetch(), C, sig。

Because C's fetch signature didn't include A's mod(x.c).

  因为 C 的 fetch signature 不包含 A 的 mod(x.c)。

Nor NEWS after C's fetch:

 也不能把 NEWS 放在 C 的 fetch 之后:

mod(x.c), X, sig

  mod(x.c), X, sig。

fetch(), C, sig

  fetch(), C, sig。

mod(NEWS), B, sig

  mod(NEWS), B, sig。

Because B's mod()'s signature didn't include C's fetch.

  因为 B 的 mod() signature 不包含 C 的 fetch。

Fork 永久存在

So the server cannot ever show C B's mod(NEWS).

所以 server 永远不能向 C 展示 B 的 mod(NEWS)。

Or any future B operation, since B will generate signatures

 或者 B 的任何 future operation,因为 B 会生成

that include its mod(NEWS).

  包含其 mod(NEWS) 的 signatures。

The server can't show B any future C operation either.

server 也不能向 B 展示 C 的任何 future operation。

Since it can't show B C's fetch(), since it's not compatible

 因为它不能向 B 展示 C 的 fetch(),这与

with B's mod(NEWS).

  B 的 mod(NEWS) 不兼容。

And any future C operations will have signature covering C's fetch.

 而且任何 future C operations 都会拥有覆盖 C fetch 的 signature。

But the server can continue to give C a separate view of the file system.

但 server 可以继续给 C 一个 file system 的 separate view。

Containing only C's future operations.

 其中只包含 C 的 future operations。

But not B's operations.

 但不包含 B 的 operations。

SUNDR 的 fork consistency

This is SUNDR's "fork consistency":

这就是 SUNDR 的“fork consistency”:

A server can permanently fork users, concealing each others' updates.

 server 可以永久 fork users,隐藏彼此的 updates。

But the server cannot heal a fork -- forked forever.

 但 server 不能 heal 一个 fork——forked forever。

Fork consistency 是否足够好

Is fork consistency a good outcome?

fork consistency 是一个 good outcome 吗?

It's not ideal that SUNDR allows fork attacks.

 SUNDR 允许 fork attacks,这并不 ideal。

But a fork will be disruptive, since hiding an update hides

 但 fork 会带来 disruption,因为隐藏一个 update 会隐藏

all future updates from that user.

  该 user 的所有 future updates。

So likely to be detected after a while.

  因此很可能过一段时间后会被 detected。

Users can detect if they can communicate outside of SUNDR.

 如果 users 能在 SUNDR 之外通信,就可以 detect。

e.g. e-mail asking "what do you think of my last update?"

  例如通过 e-mail 询问“你觉得我上一次 update 怎么样?”

Given assumptions, it seems the best one can do.

 在这些 assumptions 下,这似乎是能做到的最好结果。

为什么把 fetch 放进 log

The Question: why include fetch() in the log?

问题:为什么把 fetch() 放入 log?

Strawman 的实践问题

Strawman is not practical: the log keeps growing!

Strawman 不 practical:log 会持续增长!

Serialized SUNDR 概览

Here's a simplified overview of Section 3.3 (Serialized SUNDR).

下面是 Section 3.3(Serialized SUNDR)的 simplified overview。

Idea: store current file-system (FS) state, not log of operations.

Idea:存储当前 file-system(FS)state,而不是 operation log。

(Figure 2)

 (Figure 2)。

A hash tree mimicing an FS directory/file tree.

 一个 mimicing FS directory/file tree 的 hash tree。

[diagram: files, directories, handle w/ signed root hash]

  [diagram:files、directories、带 signed root hash 的 handle]。

Can't be directly updated, but...

  不能直接 update,但是……

A signed "handle" object containing the current root hash.

 一个包含 current root hash 的 signed “handle” object。

Under a known unchanging key.

  位于一个 known unchanging key 之下。

To update: create a new hash tree, sign root hash and update handle,

 要 update:创建一个 new hash tree,sign root hash 并 update handle,

delete old tree.

  delete old tree。

多用户与 per-user tree

But: multiple users, each with their own public/private key.

但是:有 multiple users,每个 user 都有自己的 public/private key。

 users might not fully trust each other.

   users 可能并不 fully trust each other。

 so a single writeable-by-all root is too fragile.

   因此一个 everyone 都可写的 root 太 fragile。

Idea: a tree per user (and signed handle), FS is union of trees.

Idea:每个 user 一棵 tree(以及一个 signed handle),FS 是这些 trees 的 union。

Each user's tree holds just that user's files.

 每个 user 的 tree 只保存该 user 的 files。

A read fetches all trees, merge to form single FS.

 一次 read fetch 所有 trees,merge 成一个 single FS。

需要检测 fork healing

But: we need to enforce fork consistency.

但是:我们需要 enforce fork consistency。

i.e. detect if server is trying to heal a fork.

 也就是说,detect server 是否试图 heal 一个 fork。

i.e. detect if clients saw different sequences of updates.

 也就是说,detect clients 是否看到了不同的 update sequences。

User tree 声明所见的其他 trees

User X's tree needs to declare what other trees X saw

User X 的 tree 需要 declare X 看到了哪些 other trees,

when X last updated or read the file-system.

 即 X 上一次 update 或 read file-system 时的情况。

So clients can check that different user's trees form a linear sequence.

 这样 clients 可以 check 不同 users 的 trees 是否形成 linear sequence。

(like straw-man's signatures over the whole log)

 (类似 straw-man 覆盖 whole log 的 signatures)。

Version vectors

Idea:

Idea:

Each user's tree goes through a sequence of numbered versions.

 每个 user 的 tree 都经过一个 numbered versions sequence。

User X's signed handle includes (paper's Version Structure, Figure 3):

 User X 的 signed handle 包含(论文的 Version Structure,Figure 3):

X's root hash.

  X 的 root hash。

X's version number.

  X 的 version number。

A "version vector" with one number for each other user.

  一个“version vector”,为每个 other user 保存一个 number。

  when X last read, the version it saw of each other user's tree.

   X 上一次 read 时看到的每个 other user's tree version。

signature (just on the handle block)

  signature(只针对 handle block)。

Then can compare numbers in X's and Y's version vectors to decide

 于是可以比较 X 和 Y 的 version vectors 中的 numbers,以判断

do tree updates form a sequence, with each seeing previous?

  tree updates 是否形成 sequence,并且每个 update 都看到了 previous?

is server trying to reveal a previously hidden tree?

  server 是否试图 reveal 一个 previously hidden tree?

Well-behaved server 的示例

Example (when server is well-behaved):

示例(server well-behaved 时):

"A1" is a new signed tree

 “A1” 是一棵 new signed tree。

"1 0 0" is the version vector in A1

 “1 0 0” 是 A1 中的 version vector。

time flows downward

 时间向下流动。

A  B  C

  A B C。

-------

  -------。

A1 1 0 0

A1 1 0 0。

B1 1 1 0

B1 1 1 0。

C1 1 1 1

C1 1 1 1。

B2 1 2 1

B2 1 2 1。

The version vectors advance one slot (user) at a time.

version vectors 每次前进一个 slot(user)。

The fact that B's latest vv is "1 2 1" means B saw

B 的 latest vv 是“1 2 1”,这意味着 B 看到了

A's version 1 and C's version 1.

 A 的 version 1 和 C 的 version 1。

Anyone who sees B's latest update will then know to

任何看到 B latest update 的人随后都会知道要

demand at least those versions for A's and C's tree.

 至少 demand A 和 C 的 trees 达到那些 versions。

The server can't forge vv's b/c everything is signed.

server 不能 forge vv,因为 everything 都是 signed。

But it can hide the latest trees: serve old signed handles.

 但它可以 hide latest trees:serve old signed handles。

Version vectors 的可排序性

Note in example that vv's can be ordered (if server is well-behaved):

注意在这个 example 中 vv 可以被 ordered(如果 server well-behaved):

Each is >= than the one before in all positions.

 每个 vv 在所有 positions 上都 >= 前一个 vv。

Meaning that the updates occured in order,

 这意味着 updates 按顺序发生,

and each saw the previous updates.

 并且每个 update 都看到了 previous updates。

Clients check that vv's are orderable.

 Clients check vv 是否 orderable。

Server 隐藏 tree update

What if the server conceals a tree update?

如果 server conceal 一个 tree update,会怎样?

suppose it conceals B1 from C (it can do that).

 假设它 conceal B1 不让 C 看到(它可以这样做)。

A  B  C

  A B C。

-------

  -------。

A1 1 0 0

A1 1 0 0。

B1 1 1 0 C1 1 0 1

B1 1 1 0 C1 1 0 1。

The server cannot afterwards reveal C's update to B.

server 之后不能把 C 的 update reveal 给 B。

That would reveal C's vv to B.

 那会把 C 的 vv reveal 给 B。

B would see that B's and C's vv's cannot be ordered.

 B 会看到 B 和 C 的 vv 无法被 ordered。

That is, B1 then C1 is not correct, since then B1 was hid from C.

 也就是说,B1 然后 C1 不正确,因为这样 B1 就曾被 hide from C。

And C1 then B1 is not correct, since then C1 was hid from B.

 C1 然后 B1 也不正确,因为这样 C1 就曾被 hide from B。

总结

And indeed SUNDR's version vector scheme enforces fork consistency.

SUNDR 的 version vector scheme 确实 enforces fork consistency。

And it's much cheaper than the straw-man signatures over the whole log.

 而且它比覆盖整个 log 的 straw-man signatures 便宜得多。

Take-away ideas:

Take-away ideas:

The dream of trustworthy service from untrusted servers.

 从 untrusted servers 获得 trustworthy service 的愿景。

Fork attacks.

 Fork attacks。

Hash trees.

 Hash trees。

Version vectors.

 Version vectors。

Next lecture:

Next lecture:

Bitcoin versus fork attacks.

 Bitcoin versus fork attacks。

机制小结

1. Hash 与 content-addressed storage

令 k = hash(v),client 可以把 v 以 k 为 key 写入 untrusted server;读取后重新计算 hash(v),若不等于 k 就 reject。由于 key 绑定内容,单个 block 是 immutable 的,但多个 blocks 可以组成可验证的 list 或 hash tree,并由 root key 递归检查整个 FS structure。

2. Digital signature 解决可变性,但不解决历史一致性

signature 允许 value 在不改变 key 的情况下更新,client 可以确认某个 public/private key pair 的 owner 签署了 value。然而 server 仍可返回旧的 signed value,或向不同 readers 展示不同 versions;当多个 files、users 和 permissions 需要共同一致时,单独的 signature 不足以防止跨对象的 stale view。

3. Strawman 的全量 log 与 fork consistency

Strawman 让每个 update 和 fetch 都进入覆盖整个历史的 signed log。client 必须保存自己的 last entry,因此 server 隐藏某些 entries 后,无法再把另一条 incompatible history 展示给该 client。server 可以把 clients 永久 fork,却不能在不违反 signature chain 的情况下 heal fork;代价是 log 持续增长。

4. Serialized SUNDR 的 version vector

Serialized SUNDR 用 hash tree 保存 FS state,用 signed handle 指向当前 root;每个 user 维护自己的 tree 和 version sequence。handle 中的 version vector 记录该 user 最近一次看到的其他 users 的 versions。若 server 试图 reveal 一个此前向某 user 隐藏的 tree update,两个 version vectors 将不可排序,client 可以 detect fork healing。

5. 安全目标与边界

SUNDR 追求 integrity,不追求 secrecy;cryptography 用于 verify data 和 history,而不是隐藏 data。它无法阻止 malicious server 永久隐藏 updates,但通过 fork consistency 把攻击限制为可检测、不可愈合的分叉视图;users 若能通过 SUNDR 外部渠道通信,更容易发现 fork。

本篇验收

  • [x] 官方 l-sundr.txt 已固定:306 行、256 个非空源行,SHA-256 与来源记录一致。
  • [x] 源文本的非空行按原顺序逐行保留,中文译文紧随对应英文源行。
  • [x] untrusted storage、integrity/secrecy、hash、digital signature、content-hash storage、hash tree、strawman log、fork consistency、serialized SUNDR 和 version vector 全部覆盖。
  • [x] diagram、forked log、Figure 2/3 和 version-vector ASCII tables 按原文位置保留;源文件没有独立图片。
  • [x] SUNDR、hash tree、fork consistency、version vector、handle、public/private key 等专用词没有强行翻译。
  • [ ] 中文译文仍建议进行一次人工术语审校;自动审计只验证源文覆盖与顺序,不证明翻译语义正确。
← 返回列表
← 上一篇 MIT 6.5840:Lecture 18 Ray 下一篇 → MIT 6.5840:Lecture 20 Bitcoin

评论 (0)

暂无评论,来留下第一条吧。
登录 或 注册 后才能发表评论