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;
if (reverseEncryption) {
uniqueIV = false;
chainedIV = false;
externalIV = false;
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 (reverseEncryption) {
rError(_("Paranoia configuration not supported for --reverse"));
rError(_("Paranoia configuration not supported for reverse encryption"));
return rootInfo;
}
@ -1011,7 +1010,7 @@ RootPtr createV6Config(EncFS_Context *ctx, const shared_ptr<EncFS_Opts> &opts) {
uniqueIV = true;
if (reverseEncryption) {
cout << _("--reverse specified, not using chained IV") << "\n";
cout << _("reverse encryption - chained IV disabled") << "\n";
} else {
chainedIV = true;
}
@ -1035,7 +1034,8 @@ RootPtr createV6Config(EncFS_Context *ctx, const shared_ptr<EncFS_Opts> &opts) {
blockSize = selectBlockSize(alg);
nameIOIface = selectNameCoding();
if (reverseEncryption) {
cout << _("--reverse specified, not using unique/chained IV") << "\n";
cout << _("reverse encryption - chained IV and MAC disabled") << "\n";
uniqueIV = selectUniqueIV();
} else {
chainedIV = selectChainedIV();
uniqueIV = selectUniqueIV();