Changes between Version 2 and Version 3 of NewMutableEncodingDesign


Ignore:
Timestamp:
2009-08-28T02:15:30Z (15 years ago)
Author:
warner
Comment:

more schemes

Legend:

Unmodified
Added
Removed
Modified
  • NewMutableEncodingDesign

    v2 v3  
    6969 * 288: {{{tahoe:MR-11DriaxD9nipA10ueBvv5uoMoehvxgPerpQiXyvMPeiUUdtf6}}}
    7070 * 384: {{{tahoe:MR-3a31SqUbf8fpWE1opRCT3coDhRqTU7bDU2AvC3RQJBu6ZNFhVscyxA9slYtPVT79x}}}
     71
     72[http://allmydata.org/trac/tahoe/ticket/217#comment:44 #217:c44] says that,
     73if we don't need to prevent collisions, then we can use a K-bit hash for
     74K-bit second-pre-image resistance.
    7175
    7276= Design Proposals =
     
    108112   material) (remember, K=kappa, probably 128bits)
    109113 * (2K) readcap = 2*K-bit semiprivate key
    110  * (2K) verifycap = 2*K-bit public key
     114 * verifycap = 2*K-bit public key
    111115 * storage-index = truncated verifycap
    112116
     
    127131 * (2K) readcap = 2*K-bit first semiprivate key
    128132 * (2K) traversalcap = 2*K-bit second semiprivate key
    129  * (2K) verifycap = 2*K-bit public key
     133 * verifycap = 2*K-bit public key
    130134 * storage-index = truncated verifycap
    131135
     
    143147private key out of the share and into the writecap:
    144148
    145  * (1K) writecap = K-bit random string
     149 * (1K) writecap = K-bit random string = privkey
    146150 * (3K) readcap = H(writecap)[:K] + H(pubkey)
    147  * (2K) verifycap = H(pubkey)
     151 * verifycap = H(pubkey)
    148152 * storage-index = truncated verifycap
    149153
     
    160164requiring the client to fetch a copy:
    161165
    162  * (1K) writecap = K-bit random string
     166 * (1K) writecap = K-bit random string = privkey
    163167 * (3K) readcap = H(writecap)[:K] + pubkey
    164  * (2K) verifycap = pubkey
     168 * verifycap = pubkey
    165169 * storage-index = H(pubkey)
    166170
    167171I think ECDSA pubkeys are 2*K long, so this would not change the length of
    168172the readcaps. It would just simplify/speed-up the download process. If we
    169 could use shorter hashes, then the H(pubkey) design might give us slightly
    170 shorter keys.
     173could use shorter pubkeys, this design might give us slightly shorter keys.
     174Alternately, if we could use shorter hashes, then the H(pubkey) design might
     175give us slightly shorter keys.
    171176
    172177=== add traversalcap ===
     
    176181doesn't even change the way the existing caps are used:
    177182
    178  * (1K) writecap = K-bit random string
     183 * (1K) writecap = K-bit random string = privkey
    179184 * (3K) readcap = H(writecap)[:K] + H(pubkey)
    180185 * (3K) traversalcap: H(readcap)[:K] + H(pubkey)
    181  * (2K) verifycap = H(pubkey)
    182  * storage-index = truncated verifycap
     186 * verifycap = H(pubkey)
     187 * storage-index = truncated verifycap
     188
     189== Shorter readcaps ==
     190
     191To make the readcap shorter, we must give up something, like complete
     192server-side validation and complete offline attenuation.
     193
     194 * (1K) writecap = K-bit random string = privkey
     195 * (1K) readcap = H(writecap)[:K]
     196 * storage-index = H(readcap)
     197 * verifycap = storage-index + pubkey
     198
     199The readcap is used as an HMAC key, and the share contains (inside the signed
     200block) an HMAC of the pubkey. The readcap is also hashed with the per-publish
     201salt to form the AES key with which the actual data is encrypted.
     202
     203The writecap begets the readcap, and the readcap begets the storage-index, so
     204both writers and readers will be able to find the shares, and writecaps can
     205be attenuated into readcaps offline. Wally the writecap-holder can generate
     206the pubkey himself and not use (or validate) the value stored in the share.
     207But Rose the readcap-holder must first retrieve the (pubkey,HMAC) pair and
     208validate them, then she can use the pubkey to validate the rest of the share.
     209
     210Wally can generate the verifycap offline, but Rose cannot, since she has to
     211fetch the pubkey first.
     212
     213The verifycap must contain a copy of the pubkey (or its hash), because the
     214storage-index is not usable to validate the pubkey (the HMAC doesn't help,
     215because it is keyed on the readcap, which is unavailable to the Val the
     216verifycap-holder). And it must contain a copy of the storage-index, because
     217the pubkey is insufficient to generate it.
     218
     219The storage-index must be derived from the readcap, not the pubkey, because
     220the pubkey is too long to get into the readcap, and Rose the readcap-holder
     221must have some way of getting the storage-index.
     222
     223The server can check the signature against the embedded pubkey, but has no
     224way to confirm that the embedded pubkey is correct, because the validatable
     225binding between pubkey and storage-index is only available to Rose. You could
     226copy the verifycap into the share, but there's no cryptographic binding
     227between it and the storage index. You could put a copy of the storage-index
     228in the signed block, but again that doesn't prove that the storage-index is
     229the right one. Only a scheme in which the storage-index is securely derived
     230from the pubkey will give the desired property.
     231
     232Another possibility is to have a 2K-long readcap and put K bits of a pubkey
     233hash in it. That would look like:
     234
     235 * (1K) writecap = K-bit random string = privkey
     236 * (1K) storage-index = H(pubkey)[:K]
     237 * (2K) readcap = H(writecap)[:K] + storage-index
     238 * verifycap = storage-index
     239
     240This "half-verifycap" approach restores full offline attenuation, and gives
     241the server 1K bits of validation, but reduces Val the verifycap-holder's
     242validation bits in half (from 2K to 1K). A full verifycap, H(pubkey), could
     243be generated offline by Wally, or by Rose after fetching the pubkey. You
     244still need the HMAC on the pubkey to give Rose 2K confidence that she's got
     245the right pubkey: the storage-index only gives 1K.
     246