public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Question concerning commit #eef9b2529c3cab522dac4f4bcfa1a0075376514e
Date: Wed, 05 Oct 2016 11:52:21 +0100	[thread overview]
Message-ID: <1475664741.2582.60.camel@ipfire.org> (raw)
In-Reply-To: <be92e546-5488-c129-f84a-17982c5bcd78@web.de>

[-- Attachment #1: Type: text/plain, Size: 2708 bytes --]

Hi,

I didn't occur to me that someone will build SHA just like that.

Well, you have a point here.

However, our version of htpasswd does not have bcrypt:

[root(a)ipfire ~]# htpasswd --help
Usage:
	htpasswd [-cmdpsD] passwordfile username
	htpasswd -b[cmdpsD] passwordfile username password

	htpasswd -n[mdps] username
	htpasswd -nb[mdps] username password
 -c  Create a new file.
 -n  Don't update file; display results on stdout.
 -m  Force MD5 encryption of the password (default).
 -d  Force CRYPT encryption of the password.
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it.
 -D  Delete the specified user.
On other systems than Windows, NetWare and TPF the '-p' flag will probably not
work.
The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.

Could you please investigate why and how we can enable that?

I am really tight on time this week but I would like to push out the core update
as soon as possible.

Best,
-Michael

On Wed, 2016-10-05 at 08:13 +0000, IT Superhack wrote:
> Hello Michael, hello List,
> 
> I have a question concerning the commit
> #eef9b2529c3cab522dac4f4bcfa1a0075376514e
> (http://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=eef9b2529c3cab522dac4f4bcf
> a1a0075376514e).
> 
> It is correct that htpasswd uses the MD5 algorithm as default, which is
> not very secure indeed. However, the -s option (which enforces the use
> of SHA) is insecure since there is no salt.
> 
> In case IPFire uses the same htpasswd version I use, I'd suggest the
> use of bcrypt (option: -B), since it is stronger than both SHA and MD5.
> 
> This issue also appears in the help output of htpasswd:
> 
> twilson(a)fra-03-47-1b:~> htpasswd --help
> [...]
>  -m  Force MD5 encryption of the password (default).
>  -B  Force bcrypt encryption of the password (very secure).
>  -C  Set the computing time used for the bcrypt algorithm
>      (higher is more secure but slower, default: 5, valid: 4 to 31).
>  -d  Force CRYPT encryption of the password (8 chars max, insecure).
>  -s  Force SHA encryption of the password (insecure).
>  -p  Do not encrypt the password (plaintext, insecure).
> [...]
> On other systems than Windows and NetWare the '-p' flag will probably not
> work.
> The SHA algorithm does not use a salt and is less secure than the MD5
> algorithm.
> twilson(a)fra-03-47-1b:~>
> 
> If your htpasswd version is somehow patched against this problem, just
> ignore my e-mail. :-)
> 
> Best regards,
> Timmothy Wilson
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-10-05 10:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05  8:13 IT Superhack
2016-10-05 10:52 ` Michael Tremer [this message]
2016-10-06 14:00   ` IT Superhack
2016-10-06 15:46     ` IT Superhack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475664741.2582.60.camel@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox