
Show HN: Arc – secure file archiver - arete
https://github.com/wg/arc
======
josho
This is the first that I've heard of ChaCha for encryption
([https://en.wikipedia.org/wiki/Salsa20#ChaCha_variant](https://en.wikipedia.org/wiki/Salsa20#ChaCha_variant)).

Apparently it's a standard that Google is pushing to replace RC4 and already
is using for HTTPS between google.com and Android.

If arc catches on I'm curious if it could support inline operations. E.g. on a
100gb+ archive can I read the tar index without decrypting the entire archive
first, can I extract a single file? The ChaCha algorithm is a _streaming
cipher_ , which as I understand suggests that I cannot do operations like
that.

Even worse now that I'm thinking about this, if my archive has a bit error
early in the file does that mean the entire archive cannot be decrypted. Maybe
for long term storage I'm better off physically securing my archives than
encrypting them to avoid bit rot ruining everything.

~~~
koolba
> Maybe for long term storage I'm better off physically securing my archives
> than encrypting them to avoid bit rot ruining everything.

Just have more copies on more/diverse media. Encrypted backups (with
authenticated encryption) have the pleasant side effect of validating the
backup on restore.

~~~
arete
Indeed. One use case I have in mind is using the Shamir Secret Sharing mode to
create N backups on separate flash drives stored in diverse locations.

------
Pirate-of-SV
Cool! I usually use gpg-zip for this purpose on machines where I have gpg
installed.

    
    
      gpg-zip --symmetric --gpg-args --cipher-algo=AES256 --output backup.tar.gpg file1 file2 file3

~~~
lucaspiller
What do you do to keep your GPG keys safe (i.e. so you don't accidentally lose
them)?

~~~
Johnny_Brahms
in that example he is using symmetric encryption , so a password, no private
key.

~~~
stouset
Symmetric encryption is still based on secret keys, not passwords. Symmetric
cryptosystems that appear to use passwords just transform them with a key
derivation function into a suitable-length encryption key for the underlying
cipher.

------
LeoPanthera
This seems counter to the "unix philosophy". I would expect to use an
archiving tool piped into an encryption tool. I'm not sure of the utility of
something that combines the two.

------
StavrosK
Can anyone tell me what advantage tgz has over zip? I usually curse when I
have to use it, because it lacks indexes and is pretty much only good for
archival tapes, if that. I wish we'd all move to a more modern format, like
zip or 7zip.

~~~
hannob
afaik neither zip nor 7z store unix permissions, file ownership, symlinks and
a bunch of other features.

Other than that the "modern" version of it is .tar.xz.

~~~
aroch
I believe, technically, you can store that data in a zip's metadata headers.
It is just pretty much every zip/unzip implementation doesn't support it /
permission restoration breaks across OSes

------
rsync
It's not clear from the README ... is this a client/server app, wherein I need
to have 'arc' living on the server side ?

Or can I just point arc to SSH/SFTP and the server can be "dumb" ?

------
qwertyuiop924
The name arc has namespace collision problems. Not in software in general (I
never complained about somebody calling their language elm - that's Cantrill's
job), but in archivers in particular. Arc was the format that directly
preceded zip, pkzip being the program that pk started selling after it was
discovered that pkarc's source code was copied verbatim from the source for
the original arc utility.

------
rsync
Can the author compare and contrast to 'borg' which, it appears, has become
the de facto standard for this kind of work ?

~~~
arete
I hadn't heard of borg before, but it appears to be a backup program. arc is a
file archiver, like tar or zip.

------
cyphar
Why use this over tarsnap's client (which is also free software and has
features like local deduplication).

~~~
lfam
Tarsnap's client is _not_ free software:

"2\. You may use the Tarsnap client code for the sole purpose of accessing the
service."

[http://www.tarsnap.com/legal.html](http://www.tarsnap.com/legal.html)

------
grep4master
Just a couple of commits from one contributor. I'll keep an eye on it; hope it
gets more traction.

------
valarauca1
What HMAC is used to verify the contents of the archive before decryption
takes place?

~~~
tekacs
The MAC (not HMAC) used [0] is Poly1305 [1].

[0]:
[https://github.com/wg/arc/blob/cdd799359b6f7050fc5e3aa128bf1...](https://github.com/wg/arc/blob/cdd799359b6f7050fc5e3aa128bf1776a95a8a68/archive/archive.go#L72)

[1]: [https://tools.ietf.org/html/draft-agl-tls-
chacha20poly1305-0...](https://tools.ietf.org/html/draft-agl-tls-
chacha20poly1305-01#section-4)

------
spilk
Seems like it would be more unix-like to just pipe tar into gpg.

