typedef unsigned long long tfc_fsize;
typedef unsigned long long tfc_useconds;
-#ifndef TFC_NR_TURNS
-#define TFC_NR_TURNS 262144
-#endif
-
-#ifndef TFC_CTR_MODE
-#define TFC_CTR_MODE TFC_MODE_XTS
-#endif
-
#ifndef TFC_BLKSIZE
#define TFC_BLKSIZE 65536
#endif
+#ifndef TFC_MAX_SALT
+#define TFC_MAX_SALT (2048 + TF_KEY_SIZE)
+#endif
+
#ifndef TFC_XTSBLOCKS
#define TFC_XTSBLOCKS 32
#endif
#define mhexdump(data, szdata, group, newline) xmhexdump(1, data, szdata, group, do_full_hexdump, newline)
#define mehexdump(data, szdata, group, newline) xmhexdump(2, data, szdata, group, do_full_hexdump, newline)
-extern char *progname;
-extern int exitcode;
extern size_t nr_turns;
extern int ctr_mode;
extern size_t macbits;
+extern size_t tfc_saltsz;
+extern tfc_byte tfc_salt[TFC_MAX_SALT];
+
+extern char *progname;
+extern int exitcode;
extern tfc_byte key[TF_KEY_SIZE], ctr[TF_BLOCK_SIZE], xtskey[TF_KEY_SIZE], mackey[TF_FROM_BITS(TF_MAX_BITS)];
extern struct skein sk;
extern struct tfe_stream tfe;
extern tfc_fsize total_processed_src, total_processed_dst;
extern tfc_fsize delta_processed;
extern tfc_fsize genrandom_nr_bytes, genzero_nr_bytes;
+extern tfc_fsize rdpos;
extern int sfd, kfd, dfd;
extern struct stat s_stat;
extern size_t blksize, xtsblocks;
extern tfc_yesno do_preserve_time, do_stats_in_gibs, do_statline_dynamic, do_less_stats;
extern tfc_yesno no_repeat, do_full_hexdump, verbose, statline_was_shown;
extern char *srcfname, *dstfname, *do_mac_file, *counter_file, *sksum_hashlist_file;
-extern char *genkeyf, *mackeyf, *tweakf;
+extern char *saltf, *genkeyf, *mackeyf, *tweakf;
extern char *pw_prompt, *mac_pw_prompt;
extern tfc_useconds status_timer, bench_timer;
extern tfc_useconds current_time, delta_time;
const char *tfc_modename(int mode);
void tfc_getcurtime(tfc_useconds *tx);
tfc_fsize tfc_fdsize(int fd);
+tfc_fsize tfc_fdgetpos(int fd);
tfc_fsize tfc_fnamesize(char *fname, tfc_yesno noexit);
tfc_fsize tfc_modifysize(tfc_fsize szmodify, const char *szspec);
void fcopy_matime(int fd, const struct stat *st);
enum { NO, YES };
-enum { TFC_ERRACT_EXIT, TFC_ERRACT_CONT, TFC_ERRACT_SYNC };
+enum { TFC_ERRACT_EXIT, TFC_ERRACT_CONT, TFC_ERRACT_SYNC, TFC_ERRACT_LSYNC };
enum { TFC_STOP_BEGAN = 1, TFC_STOP_FULL };
enum { TFC_DO_PLAIN, TFC_DO_ENCRYPT, TFC_DO_DECRYPT };
enum { TFC_MAC_DROP = -1, TFC_MAC_SIGN = 1, TFC_MAC_VRFY, TFC_MAC_JUST_VRFY };