Commit graph

46 commits

Author SHA1 Message Date
ckolivas
df1ec6dd08 Remove unused. 2011-03-22 13:06:44 +11:00
ckolivas
f56e48c4f2 Modify maxram to mean the most we'll allocate in one chunk and add usable_ram for the most we'll allocate to one task.
Limit all maxram on 32bits to 1GB since most don't like mallocing more than this.
Update testing to allow larger total amount based on usable ram while sticking to maxram limit per alloc.
2011-03-22 12:10:21 +11:00
Con Kolivas
68cca4dea5 More streamlining of version number. Fixes problems with osx version displayed. 2011-03-22 09:06:13 +11:00
Con Kolivas
131d4c92c2 Modify the file format to not include rzip chunk size except for STDOUT chunked files thus decreasing the file format size further. 2011-03-22 09:04:24 +11:00
Con Kolivas
2736118f82 Check for different endian.h includes and variants of le32toh. 2011-03-22 07:57:32 +11:00
Con Kolivas
fae0f0d493 Merge branch 'master' into endian 2011-03-22 00:51:15 +11:00
Con Kolivas
93f7c602d0 Fixes for 32 bit limits and osx compilation. 2011-03-22 00:46:12 +11:00
Con Kolivas
a30efcaa55 Portable generic byteswap for BE. 2011-03-22 00:13:29 +11:00
Con Kolivas
5c24fd02cc Make tmp bufs uchar to avoid warnings. 2011-03-21 23:09:39 +11:00
Con Kolivas
3a4344bba4 Convert salt 8 to SALT_LEN. 2011-03-21 20:56:36 +11:00
Con Kolivas
8c8f5bdd48 lrz_crypt tweaks courtesy of Serge Belyshev. 2011-03-21 20:54:53 +11:00
Con Kolivas
77d44ce108 Disable output when it's not known. More endian fixes. 2011-03-20 22:22:54 +11:00
Con Kolivas
0dad7dcc5a Modify the encrypted version to not write down the rzip chunk size, then keep track of where each block header is written, go back and write 8 bytes of salt before it and encrypt the headers in place. 2011-03-20 15:45:44 +11:00
ckolivas
5005c2dff5 Get rid of extra data in new header and stick to old header size, compacting extra info into existing space. 2011-03-18 17:32:47 +11:00
ckolivas
e856d481bf Discard hash_iv entirely, using passphrase hash and centralise key generation.
Patch by Serge Belyshev.
2011-03-18 10:22:58 +11:00
Con Kolivas
a3e80871c2 Add 8 bytes of random data to the start of every encrypted compressed block and use it along with 8 bytes from the stored salt to make a unique key and IV for encryption. 2011-03-18 00:06:11 +11:00
ckolivas
d63a9a02ff Use a separate IV for when it is sequentially updated in preparation for encrypting the headers as well. 2011-03-17 16:00:57 +11:00
Con Kolivas
5fd7c82e1f Implement ciphertext stealing to not have to pad compressed blocks courtesy of Serge Belyshev who saved me hours of debugging thanks! 2011-03-16 21:24:05 +11:00
Con Kolivas
928a0a098a Consolidate padded length throughout. 2011-03-16 10:29:16 +11:00
Con Kolivas
519123966a total_read field is no longer used. 2011-03-16 08:32:16 +11:00
Con Kolivas
c5938c6a8b Implement the actual aes cbc encryption and decryption. 2011-03-15 23:52:39 +11:00
Con Kolivas
acb023988f Generate sha512 hash and hash iv required to encrypt based on password, timestamp, loops and random salt. 2011-03-15 21:18:29 +11:00
Con Kolivas
412cf013c4 Implement passphrase input. 2011-03-15 16:32:32 +11:00
Con Kolivas
202d972a6c Add encryption -e option and flag encryption with a control flag, removing encrypt field. 2011-03-15 15:04:58 +11:00
Con Kolivas
65f901a83c Get the seconds, salt and encryption loop data before compressing.
Store seconds in only 5 bytes which is enough for 400 years, leaving more room for random data.
2011-03-15 14:41:47 +11:00
Con Kolivas
6a903eff8d Convert the usecs field to a dedicated salt one which has 6 random bytes and 2 encoded loops bytes. 2011-03-15 13:14:27 +11:00
ckolivas
65a681a254 Relative offset is not required in tmp inbuf, it can be safely zeroed. 2011-03-15 11:21:26 +11:00
Con Kolivas
d56c826725 Add fd_in field to struct rzip_control. 2011-03-14 14:58:41 +11:00
Con Kolivas
684959efed Add fields for temporary input buffer and clamp memory accordingly in preparation. 2011-03-14 14:47:26 +11:00
Con Kolivas
4a6fa7602f Begin decompressing to stdout via temporary buffer by creating a read/write wrapper. 2011-03-14 10:07:51 +11:00
Con Kolivas
d9e9f0d71d No need to keep usable_ram as a rzip_control variable. 2011-03-13 22:28:28 +11:00
Con Kolivas
938ef76182 Clean indent. 2011-03-13 22:19:28 +11:00
Con Kolivas
6ac74aa9f0 Create a flag to know when the temporary output buffer is in use, in preparation for when we use it on decompression. 2011-03-13 08:34:06 +11:00
Con Kolivas
2f87f62696 Make the tmp out buf slightly larger to account for incompressible data, and check for buffer overflows. 2011-03-13 08:16:46 +11:00
Con Kolivas
d067a6ea9e Implement the real workings of writing to a temporary buffer before flushing to stdout. 2011-03-12 22:46:57 +11:00
Con Kolivas
1397c0f832 Create custom "loop count" system to determine how many times to hash a password when encrypting based on the datestamp.
This data will be stored as a 2 byte entry in the header in the future (b1 and b2).
2011-03-12 20:31:56 +11:00
Con Kolivas
7fbec0a783 Prepare to write compressed output by flushing stdout after each chunk is compressed. 2011-03-12 19:56:08 +11:00
Con Kolivas
c75a50f723 Being modifying write_1g function to be able to write to a temporary buffer instead of straight to fd_out.
Split out make_magic to be able to write magic wherever we want later.
2011-03-12 14:13:28 +11:00
Con Kolivas
9444441d51 Modify maximum ram usable when stdout is being used in preparation for temporary in-ram file during stdout and fix summary shown and 32 bit limits. 2011-03-12 12:19:02 +11:00
Con Kolivas
fe68b9a3f7 Institute writing and reading of 0.6 file format for compress/decompress. 2011-03-12 11:17:11 +11:00
Con Kolivas
d87df4f44e Store the file size as zero when the magic header will be written before the size is known. 2011-03-11 23:45:22 +11:00
Con Kolivas
a10d423596 Write/read new magic header and fix version number in configure.ac 2011-03-11 23:29:56 +11:00
Con Kolivas
643054ae22 Fix threading errors.
Patch by <mike@zentific.com>
2011-03-11 08:33:35 +11:00
Con Kolivas
2db75fe408 Get rid of trailing whitespace 2011-03-09 08:50:46 +11:00
Con Kolivas
1a7c409e10 header-mangling-part-X-move-all-headers-defines-into 2011-03-09 08:37:26 +11:00
Con Kolivas
1511c27aad header-mangling-part-2-move-all-function-prototypes 2011-03-09 08:34:44 +11:00