reverse: Make uniqueIV configurable in expert mode

This commit is contained in:
Jakob Unterwurzacher 2014-11-29 20:04:31 +01:00
parent 7732466277
commit d1363578fc

View File

@ -967,7 +967,6 @@ RootPtr createV6Config(EncFS_Context *ctx, const shared_ptr<EncFS_Opts> &opts) {
long desiredKDFDuration = NormalKDFDuration; long desiredKDFDuration = NormalKDFDuration;
if (reverseEncryption) { if (reverseEncryption) {
uniqueIV = false;
chainedIV = false; chainedIV = false;
externalIV = false; externalIV = false;
blockMACBytes = 0; blockMACBytes = 0;
@ -976,7 +975,7 @@ RootPtr createV6Config(EncFS_Context *ctx, const shared_ptr<EncFS_Opts> &opts) {
if (configMode == Config_Paranoia || answer[0] == 'p') { if (configMode == Config_Paranoia || answer[0] == 'p') {
if (reverseEncryption) { if (reverseEncryption) {
rError(_("Paranoia configuration not supported for --reverse")); rError(_("Paranoia configuration not supported for reverse encryption"));
return rootInfo; return rootInfo;
} }
@ -1011,7 +1010,7 @@ RootPtr createV6Config(EncFS_Context *ctx, const shared_ptr<EncFS_Opts> &opts) {
uniqueIV = true; uniqueIV = true;
if (reverseEncryption) { if (reverseEncryption) {
cout << _("--reverse specified, not using chained IV") << "\n"; cout << _("reverse encryption - chained IV disabled") << "\n";
} else { } else {
chainedIV = true; chainedIV = true;
} }
@ -1035,7 +1034,8 @@ RootPtr createV6Config(EncFS_Context *ctx, const shared_ptr<EncFS_Opts> &opts) {
blockSize = selectBlockSize(alg); blockSize = selectBlockSize(alg);
nameIOIface = selectNameCoding(); nameIOIface = selectNameCoding();
if (reverseEncryption) { if (reverseEncryption) {
cout << _("--reverse specified, not using unique/chained IV") << "\n"; cout << _("reverse encryption - chained IV and MAC disabled") << "\n";
uniqueIV = selectUniqueIV();
} else { } else {
chainedIV = selectChainedIV(); chainedIV = selectChainedIV();
uniqueIV = selectUniqueIV(); uniqueIV = selectUniqueIV();