tfc_say(" show: do default action, then dump CTR value to stderr,");
tfc_say(" head: when decrypting, read CTR from beginning of stream,");
tfc_say(" rand: generate random CTR and write it to beginning of stream,");
+ tfc_say(" zero: assume zero CTR is used, do not read from and write it to stream,");
tfc_say(" <file>: read CTR from given file (both when encrypting/decrypting).");
tfc_say(" default is to derive CTR from user provided password or keyfile with");
tfc_say(" a single Skein function turn over derived, %u byte raw key", TFC_U(TF_KEY_SIZE));
counter_opt = TFC_CTR_HEAD;
else if (!strcasecmp(optarg, "rand"))
counter_opt = TFC_CTR_RAND;
+ else if (!strcasecmp(optarg, "zero"))
+ counter_opt = TFC_CTR_ZERO;
else counter_file = sksum_hashlist_file = optarg;
break;
case 'C':
}
break;
case TFC_CTR_RAND: tfc_getrandom(ctr, ctrsz); break;
+ case TFC_CTR_ZERO: memset(ctr, 0, ctrsz); break;
}
_ctrskip2:
TFC_MODE_SKSUM = -2, TFC_MODE_PLAIN = -1, TFC_MODE_CTR = 1,
TFC_MODE_STREAM, TFC_MODE_XTS, TFC_MODE_ECB, TFC_MODE_CBC, TFC_MODE_OCB
};
-enum { TFC_CTR_SHOW = 1, TFC_CTR_HEAD, TFC_CTR_RAND };
+enum { TFC_CTR_SHOW = 1, TFC_CTR_HEAD, TFC_CTR_RAND, TFC_CTR_ZERO };
#endif