Subject: [Cfrg] Seekable Encryption w secure rewrites

From: Henrick Hellström <[email-masked]>
Date: Sat, 12 Jul 2003 01:03:14 +0200

I am looking for a block cipher mode that meets the following criteria:

* Unpatented, or at least free for both non-commercial and commercial use
* Minimal cipher text size overhead
* Reasonably efficient w.r.t. execution time (approximately two times 
ECB is OK)
* Seekable in both encryption and decryption mode
* No plain text leakage even if parts of the file are re-encrypted or 
data is appended to the file and encrypted with the same key over and over.

This is what I have come up with so far:

Encryption:
for i = 1 to n-1 do
   C_i = E_k(i) xor E_k(P_i xor E_k(i)) -> file
end for
S = P_1 xor ... xor P_{n-1}
Mac = E_k(E_k(S) xor E_k(0)) -> file

To change block j, do the following:

file -> OC_j
OP_j = D_k(OC_j xor E_k(j)) xor E_k(j)
C_j = E_k(P_j xor E_k(j)) xor E_k(j) -> file

file -> OMac
OS = D_k(D_k(OMac) xor E_k(0))
S = OS xor OP_j xor P_j
Mac = E_k(E_k(S) xor E_k(0)) -> file

This mode will reveal which parts of the file were changed during a 
rewrite, but afaics the mode will guarantee the confidentiality and 
integrity of each block. Comments?

-- 
Henrick Hellström,
StreamSec http://www.streamsec.com
Borland Technology Partner
Need security enhancements for your Delphi application? Don't settle for 
anything less than StrSecII:
http://www.streamsec.com/prod_strsec2.asp

_______________________________________________
Cfrg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/cfrg