Is there an encrypted version control system?

前端 未结 13 1459
暗喜
暗喜 2020-12-13 00:24

I am looking for an encrypted version control system . Basically I would like to

  • Have all files encrypted locally before sending to the ser

相关标签:
13条回答
  • 2020-12-13 00:36

    It is possible to create a version control system of cipher text. It would be ideal to use a stream cipher such as RC4-drop1024 or AES-OFB mode. As long as the same key+iv is used for each revision. This will mean that the same PRNG stream will be generated each time and then XOR'ed with the code. If any individual byte is different, then you have a mismatch and the cipher text its self will be merged normally.

    A block cipher in ECB mode could also be used, where the smallest mismatch would be 1 block in size, so it would be ideal to use small blocks. CBC mode on the other hand can produce widely different cipher text for each revision and thus is undesirable.

    I recognize that this isn't very secure, OFB and ECB modes shouldn't normally be used as they are weaker than CBC mode. The sacrifice of the IV is also undesirable. Further more it isn't clear what attack is being defended against. Where as using something like SVN+HTTPS is very common and also secure. My post is merely stating that it is possible to do this efficiently.

    0 讨论(0)
  • 2020-12-13 00:38

    You could use a Tahoe-LAFS grid to store your files. Since Tahoe is designed as a distributed file system, not a versioning system, you'd probably need to use another versioning scheme on top of the file system.

    Edit: Here's a prototype extension to use Tahoe-LAFS as the backend storage for Mercurial.

    0 讨论(0)
  • 2020-12-13 00:39

    Use rsyncrypto to encrypt files from your plaintext directory to your encrypted directory, and decrypt files from your encrypted directory and your plaintext directory, using keys that you keep locally.

    Use your favorite version control system (or any other version control system -- svn, git, mercurial, whatever) to synchronize between your encrypted directory and the remote host.

    The rsyncrypto implementation you can download now from Sourceforge not only handles changes in bytes, but also insertions and deletions. It implements an approach very similar to the approach that that "The Rook" mentions.

    Single-byte insertions, deletions, and changes in a plaintext file typically cause rsyncrypto to make a few K of completely different encrypted text around the corresponding point in the encrypted version of that file.

    Chris Thornton points out that ssh is one good solution; rsyncrypto is a very different solution. The tradeoff is:

    • using rsyncrypto requires transferring a few K for each "trivial" change rather than the half-a-K it would take using ssh (or on a unencrypted system). So ssh is slightly faster and requires slightly less "diff" storage than rsyncrypto.
    • using ssh and a standard VCS requires the server to (at least temporarily) have the keys and decrypt the files. With rsyncrypto, all encryption keys never leave the local computer. So rsyncrypto is slightly more secure.
    0 讨论(0)
  • 2020-12-13 00:40

    What specifically are you trying to guard against?

    Use Subversion ssh or https for the repo access. Use an encrypted filesystem on the clients.

    0 讨论(0)
  • 2020-12-13 00:41

    Source safe stores data in Encrypted files. Wait, I take that back. They're obfuscated. And there's no other security other than a front door to the obfuscation.

    C'mon, it's monday.

    0 讨论(0)
  • 2020-12-13 00:49

    Based on my understanding this cannot be done, because in SVN and other versioning systems, the server needs access to the plaintext in order to perform versioning.

    0 讨论(0)
提交回复
热议问题