LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2022, 08:30 AM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,433

Rep: Reputation: 110Reputation: 110
Is there an encryption tool that won't return an error?


I could swear that a wrong password on decryption would cause openssl (command line) to just output garbage without any indication of a bad password. I thought that was great for thwarting brute force attacks. But I just tested it and it does return an error. Did they change the tool's behavior or is my memory wrong? More important, is there any encryption tool that will output garbage and give no other hints of a bad password? GPG also returns an error BTW.

TIA
 
Old 03-08-2022, 09:17 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,640

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
Quote:
Originally Posted by lucmove View Post
I could swear that a wrong password on decryption would cause openssl (command line) to just output garbage without any indication of a bad password. I thought that was great for thwarting brute force attacks. But I just tested it and it does return an error. Did they change the tool's behavior or is my memory wrong? More important, is there any encryption tool that will output garbage and give no other hints of a bad password? GPG also returns an error BTW.

TIA
Interesting question, but it occurs to me that such an encryption tool would be nearly worthless for the most common cases.
Your usage is atypical.
You might want to grab the code for a tool that can encrypt/decrypt and modify it to suppress error detection and error code return.
 
Old 03-08-2022, 09:24 AM   #3
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,433

Original Poster
Rep: Reputation: 110Reputation: 110
It would not be nearly worthless. It would seriously make brute force more difficult.

Modifying an existing tool is the worthless option. It would only work as expected for me, who already has the password. An attacker would just use the unmodified tool.
 
Old 03-08-2022, 03:25 PM   #4
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by lucmove View Post
It would not be nearly worthless. It would seriously make brute force more difficult.

Modifying an existing tool is the worthless option. It would only work as expected for me, who already has the password. An attacker would just use the unmodified tool.
Too much effort for a security issue that is created on the user side.
 
Old 03-08-2022, 11:54 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I agree with the 2 other comments, however, why don't you show us the actual command(s)?
Maybe something did change.
 
Old 03-09-2022, 01:18 PM   #6
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,433

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by ondoho View Post
I agree with the 2 other comments, however, why don't you show us the actual command(s)?
Maybe something did change.
Encryption:
Code:
$ openssl aes-256-cbc -a -e -salt -in file.txt -out encryptedfile.txt
Decryption:
Code:
$ openssl aes-256-cbc -a -d -in encryptedfile.txt -out decryptedfile.txt
 
Old 03-10-2022, 01:10 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by lucmove View Post
Encryption:
Code:
$ openssl aes-256-cbc -a -e -salt -in file.txt -out encryptedfile.txt
Decryption:
Code:
$ openssl aes-256-cbc -a -d -in encryptedfile.txt -out decryptedfile.txt
Code:
$ openssl aes-256-cbc -a -d -in encryptedfile.txt -out decryptedfile.txt
enter aes-256-cbc decryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bad decrypt
140049431397632:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:crypto/evp/evp_enc.c:610:
 
Old 03-10-2022, 04:10 PM   #8
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,433

Original Poster
Rep: Reputation: 110Reputation: 110
What does that mean?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can read from signalfd return data in not-multiple of sizeof(signalfd_siginfo)? Can read return zero? yvw Linux - Kernel 0 02-22-2022 07:45 AM
Kprobe return callback not called on function return bogdanul2003 Linux - Kernel 1 03-16-2017 11:17 AM
dpkg return error :post installation script return an error code (1) grimfold Debian 2 09-10-2009 01:55 PM
return 0 or return(0) in C? servnov Programming 5 01-08-2005 04:39 PM
Mandrake 9.0 Wireless Works without encryption.. does not with encryption topcat Linux - Wireless Networking 3 05-04-2003 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration