Protocols for Secure Cloud Computing
IBM Research – Zurich Christian Cachin 28 September 2010
Where is my data?
Who runs my computation?
Overview
1.Protecting untrusted storage for a single client
2.Consistency and integrity of storage for multiple clients 3.Proofs of storage
4.Intrusion-tolerance via replication
1
Protecting untrusted storage
for a single client
Integrity Protection for Remote Storage
■ Storage consists of n data items x1, ..., xn (entries in list, blocks of file ...) ■ Applications access storage via integrity checker
• Checker uses small trusted memory to store short reference value v
(i.e., together with encryption key in meta-data)
■ Integrity checker operations
• Read item and verify w.r.t. v
• Write item and update v accordingly Trusted
Implementing an Integrity Checker
■ Use hash function H to compute v? v = H(x1 || ... || xn)
• Infeasible for long files • No random access to item
■ Use a secret key with a MAC?
• Suffers from replay attacks
■ Well-known solution: Hash tree [Merkle 79]
• Overhead of read/verify and write/update is logarithmic (in n) ■ Recent alternatives
– Dynamic accumulators [CL02]
• Overhead of read/verify is constant
– Incremental hashing [BM97,CDDGS03]
Hash trees for Integrity Checking [Merkle 79]
■ Parent node is hash of its children ■ Root hash value commits all
data blocks
• Root hash in trusted memory • Tree is on extra untrusted
storage
■ To verify xi, recompute path from xi to
root with sibling nodes and compare to trusted root hash
■ To update xi, recompute new root hash
and nodes along path from xi to root
root
H
0H
1H
00H
01H
10H
11x1 x2 x3 x4
Read & write operations need work
O(log n)
→
Hash operations
Dynamic Accumulator for Integrity Checking
■ An accumulator is a cryptographic abstraction for collecting data values and checking their
presence:
– Init() → (a, k) -- generates authenticator/accumulator value a and key k
– Add(a, i, xi, k) → a' -- adds xi to accumulator at position i
– Update(a, i, xi, k) → a' -- updates accumulator at position i to xi
– Witness(a, i, xi, k) → w -- produces a witness w for presence of xi
– Verify(a, i, xi, w) → “yes” / “no” -- checks if witness w is valid and proves that entry xi was added to accumulator at position i
■ Without k, it must be infeasible to forge i', x', w' that verify for given a ■ Impl. with public-key crypto under strong RSA assumption [CL02]:
• Given an RSA modulus N = P ∙ Q (with P, Q safe primes), and r ∈ ZN, it is infeasible
to find a, b s.t. ab = r mod N
– Accumulator a containing x1, ..., xn is a = r H(1||x1) ∙∙∙ H(n||xn) mod N
– Witness for xi in a is w = a 1/H(i||xi) mod N
Incremental Hashing for Integrity Checking
■ Hash function IH(x1, ..., xn) on n entries x1, ..., xn that allows updates:
Given h = IH(x1, ..., xi, ..., xn) and values xi and x'i,
one can compute h' = IH(x1, ..., x'i, ..., xn) in time independent of n.
■ Implementation based on number theory [BM97]: IH(x1, ..., xn) = H(1||xn) ∙∙∙ H(n||xn) mod p
2
Consistency and integrity of storage for
multiple clients
Model
Client
Client
Client
■ Clients: C 1 ... Cn– Correct, but may crash
– Invoke operations on server – Do not talk to each other – Small trusted memory
■ Server S
– Normally correct
– Sometimes faulty (untrusted, Byzantine)
Using an [untrusted] service
■ Clients interact with service through operations (request/reply) ■ Clients may digitally sign their requests
→
Server cannot forge reply values→
But answer with outdated values ("replay attack")The problem
C
1
C
3
C
1
C
2
C
3
write(1,x)
write(1,t)
read(2)
→
w
write(2,v)
read(1)
→
x
write(2,w)
read(1)
→
u
Goals
■ No forged replies
– But server may cause inconsistency
■ Clients should see only consistent history
– No inconsistent operation visible
– Out-of-band communication for detecting server misbehavior
■ When server correct (normal case), clients want strong consistency and strong liveness
– Linearizability
Fork-linearizability [MS02, LKMS04, CSS07]
w(1,x) w(2,v) w(1,u) r(1) x→ w(2,w) r(1) u→ r(2) w→ w(1,t) View of C1 View of C3 View of C2C
1
C
2
C
3
write(1,x) write(1,u)
read(2)
→
w
write(2,v)
read(1)
→
x
write(2,w)
read(1)
→
u
Fork-linearizability formally
A history
is fork-linearizable
⇔
∀
i
exists subset
i
⊆
and permutation
i
of
i
s.t.
–
All operations of
C
i
are in
i
;
–
i
is sequential and follows specification;
–
If
o
∈
i
∩
j
, then
i
=
j
up to
o
;Inefficient protocols
■ Trivial method: Sign the complete history
– Server sends history with all signatures – Client verifies all operations and signatures – Client adds its operation and signs new history – Message size proportional to system age
■ Use n “version vectors” [MS02]
– Communication complexity O(n2)
More efficient protocol (linear complexity) [CSS07]
■ Client Ci stores a version vi
– Increment at every operation
■ Vector of versions orders operations
– After every operation, client signs new value and new vector
V =
■ Client stores version vector T of last operation
– Version V of next operation must be V ≥ T
– Signatures must verify
v1 v2 v3
[COMMIT,
read
,
T
,
σ'
]
[REPLY,
V
,
σ
,
x1
]
[SUBMIT,
read
,
1
]
Illustration
C
2
T =
t1t2 t3V =
v1 v2 v3X =
x1 x2 x3V
≥
T ?
v2 = t2 ?
verify
σ
?
If not
→
abort.
T := V +
σ
' := sign(T)
1 0 0V := T
σ
:=
σ
'
σ
Discussion
■ If clients are forked, their versions become incomparable
■ Signatures prevent server from other manipulations
– O(n)-protocol for emulating fork-linearizable shared memory on Byzantine server – Message size 40KB for 10'000 users
■ Increasing concurrency?
– Here, clients proceed in lock-step mode
– Extensions of this protocol let all clients operate concurrently u v w+1 u v+1 w
?
Properties of fork-linearizable storage protocol
■ If server correct, then linearizable
– Correct server schedules ops. in order of arrival
■ If server Byzantine, then admits only fork-linearizable client views
– From properties of versions
■ Requires waiting
– Improved versions of this protocol do not require waiting
■ Complexity
– Three messages
3
4
Further reading
■ Introduction to Reliable and Secure Distributed
Programming
– C. Cachin, R. Guerraoui, L. Rodrigues
– 2nd ed. of Introduction to Reliable Distributed Programming
– To be published by Springer, 2010
■ More info on
References (1)
■ [BM97] M. Bellare and D. Micciancio. A new paradigm for collision-free hashing:
Incrementality at reduced cost. In Advances in Cryptology: EUROCRYPT '97, vol. 1233 of Lecture Notes in Computer Science, Springer, 1997.
■ [CDDGS03] D. Clarke, S. Devadas, M. van Dijk, B. Gassend, and G. E. Suh.
Incremental multiset hash functions and their application to memory integrity checking. In Advances in Cryptology: ASIACRYPT 2003, vol. 2894 of Lecture Notes in Computer Science, Springer, 2003.
■ [CL02] J. Camenisch and A. Lysyanskaya. Dynamic accumulators and application to
efficient revocation of anonymous credentials. In Advances in Cryptology: CRYPTO 2002, vol. 2442 of Lecture Notes in Computer Science, Springer, 2002.
■ [CSS07] C. Cachin, A. Shelat, and A. Shraer. Efficient fork-linearizable access to
untrusted shared memory. In Proc. 26th ACM Symp. Principles of Distributed Computing (PODC), 2007.
■ [KRS+03] M. Kallahalla, E. Riedel, R. Swaminathan, Q. Wang, and K. Fu. Plutus:
Scalable secure file sharing on untrusted storage. In Proc. 2nd USENIX Conference on File and Storage Technologies (FAST 2003), 2003.
References (2)
■ [LKMS04] J. Li, M. Krohn, D. Mazières, and D. Shasha. Secure untrusted data
repository (SUNDR). In Proc. Symp. Operating Systems Design and Implementation (OSDI), 2004.
■ [MS02] D. Mazières and D. Shasha. Building secure file systems out of Byzantine
storage. In Proc. 21st ACM Symp. Principles of Distributed Computing (PODC), 2002.
■ [PC07] R. Pletka and C. Cachin. Cryptographic security for a high-performance
distributed file system. In Proc. 24th Mass Storage Systems and Technologies (MSST), Sept. 2007.