}
opterr = 0;
- while ((c = getopt(argc, argv, "L:s:aU:C:r:K:t:PXkzxc:l:qedn:vV:pwE:o:O:S:AmuM:R:Z:WHD:")) != -1) {
+ while ((c = getopt(argc, argv, "L:s:aU:C:r:K:t:PXkzxc:l:qedn:vV:pwE:o:O:S:AmuM:R:Z:WHD:gj")) != -1) {
switch (c) {
case 'L':
read_defaults(optarg, NO);
case 'r':
randsource = optarg;
break;
+ case 'j':
+ case 'g':
+ if (c == 'j') ctr_mode = TFC_MODE_CTR;
+ else if (c == 'g') ctr_mode = TFC_MODE_STREAM;
+ if (do_edcrypt == TFC_DO_DECRYPT) counter_opt = TFC_CTR_HEAD;
+ else if (do_edcrypt == TFC_DO_ENCRYPT) counter_opt = TFC_CTR_RAND;
+ else xerror(NO, YES, YES, "plain mode was selected with -%c, cannot continue", c);
+ break;
case 'c':
if (!strcasecmp(optarg, "show"))
counter_opt = TFC_CTR_SHOW;
break;
case 'q':
quiet = YES;
- xexit_no_nl = YES;
verbose = NO;
do_full_hexdump = NO;
status_timer = 0;
}
total_processed_src = rwd;
memcpy(ctr, svctr, TF_BLOCK_SIZE);
+ if (ctr_mode == TFC_MODE_STREAM) tfe_init_iv(&tfe, key, ctr);
memset(svctr, 0, TF_BLOCK_SIZE);
}
}
else if (do_mac == TFC_MAC_DROP2) total_processed_src += SKEIN_DIGEST_SIZE;
- if (verbose || status_timer || (do_stop == YES && quiet == NO)) print_crypt_status(0);
+ if (verbose || status_timer || (do_stop == YES && quiet == NO)) print_crypt_status(TFC_SIGLAST);
xexit(exitcode);
return -1;