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.

This commit is contained in:
Con Kolivas 2011-03-18 00:06:11 +11:00
parent 9049263f6f
commit a3e80871c2
7 changed files with 69 additions and 44 deletions

2
util.h
View file

@ -29,6 +29,6 @@ void fatal(const char *format, ...);
void failure(const char *format, ...);
void round_to_page(i64 *size);
void get_rand(uchar *buf, int len);
void lrz_crypt(rzip_control *control, uchar *buf, i64 len, int encrypt, int carry_iv);
void lrz_crypt(rzip_control *control, uchar *buf, i64 len, uchar *salt, int encrypt);
#endif