"-O ftrunc=": implement file truncations (without sanity checks).
[tfcrypt.git] / tfcrypt.h
index c41f38d7203dd91db8bdfd6d000529ba5fbbecb1..49073c96ad0d63fb63d97530a531ee247b77855b 100644 (file)
--- a/tfcrypt.h
+++ b/tfcrypt.h
@@ -100,7 +100,7 @@ typedef unsigned long long tfc_useconds;
 #define NOFSIZE ((tfc_fsize)-1)
 #define TFC_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
 
-#define TFC_KEY_BITS (do_tfcrypt1 == YES ? TF_MAX_BITS : TF_NR_KEY_BITS)
+#define TFC_KEY_BITS (do_full_key == NO ? TF_MAX_BITS : TF_NR_KEY_BITS)
 
 #define TFC_ASCII_TFC_MAC_FOURCC "%TF"
 #define TFC_ASCII_TFC_MAC_FOURCC_LEN (sizeof(TFC_ASCII_TFC_MAC_FOURCC)-1)
@@ -127,17 +127,18 @@ extern int ctr_mode;
 extern size_t macbits;
 extern size_t tfc_saltsz;
 extern tfc_byte tfc_salt[TFC_MAX_SALT];
+extern tfc_yesno do_full_key;
 
 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 tfc_byte key[TF_KEY_SIZE], ctr[TF_BLOCK_SIZE], xtskey[TF_KEY_SIZE], mackey[TF_FROM_BITS(TF_MAX_BITS)], tweak[TF_TWEAK_SIZE];
 extern struct skein sk;
 extern struct tfe_stream tfe;
 extern tfc_byte srcblk[TFC_BLKSIZE], dstblk[TFC_BLKSIZE], *pblk;
 extern tfc_byte macvrfy[SKEIN_DIGEST_SIZE], macresult[SKEIN_DIGEST_SIZE];
 extern tfc_byte tmpdata[TFC_TMPSIZE];
 extern char *randsource;
-extern tfc_fsize iseek_blocks, iseek, oseek, maxlen;
+extern tfc_fsize iseek_blocks, iseek, oseek, maxlen, ftrunc_dfd;
 extern tfc_fsize total_processed_src, total_processed_dst;
 extern tfc_fsize delta_processed;
 extern tfc_fsize genrandom_nr_bytes, genzero_nr_bytes;
@@ -154,9 +155,9 @@ extern size_t sksum_turns;
 extern int do_edcrypt, do_stop, quiet, error_action;
 extern int counter_opt, mackey_opt, do_mac, do_outfmt, rawkey;
 extern int idx, write_flags;
-extern tfc_yesno catch_all_errors, ignore_seek_errors, password, overwrite_source, do_fsync, do_pad, do_tfcrypt1;
+extern tfc_yesno catch_all_errors, ignore_seek_errors, password, overwrite_source, do_fsync, do_pad;
 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 tfc_yesno no_repeat, do_full_hexdump, verbose, statline_was_shown, show_secrets;
 extern char *srcfname, *dstfname, *do_mac_file, *counter_file, *sksum_hashlist_file;
 extern char *saltf, *genkeyf, *mackeyf, *tweakf;
 extern char *pw_prompt, *mac_pw_prompt;
@@ -203,7 +204,6 @@ void change_status_width(int signal);
 void change_status_timer(int signal);
 void setup_next_alarm(tfc_useconds useconds);
 void skein(void *hash, size_t bits, const void *key, const void *data, size_t szdata);
-void tf_key_tweak_compat(void *key);
 tfc_yesno skeinfd(void *hash, size_t bits, const void *key, int fd, tfc_fsize offset, tfc_fsize readto);
 
 void read_defaults(const char *path, tfc_yesno noerr);