# Password encryption method question

**URL:** <https://forums.suse.com/t/password-encryption-method-question/26096>\
**Category:** SLES Configure-Administer\
**Created:** [September 18, 2014, 9:51pm UTC](https://forums.suse.com/t/password-encryption-method-question/26096 "2014-09-18T21:51:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [September 18, 2014, 9:51pm UTC](https://forums.suse.com/t/password-encryption-method-question/26096/1 "2014-09-18T21:51:40Z")

</div>

Hello,

Yast-\>Security Center and Hardening-\>Password Settings

Is the password encryption method “Blowfish” the same as “bcrypt”?

Thanks

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [September 18, 2014, 10:23pm UTC](https://forums.suse.com/t/password-encryption-method-question/26096/2 "2014-09-18T22:23:26Z")

</div>

Guessing, no:

[http://en.wikipedia.org/wiki/Bcrypt](http://en.wikipedia.org/wiki/Bcrypt)

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 1, 2014, 12:27am UTC](https://forums.suse.com/t/password-encryption-method-question/26096/3 "2014-10-01T00:27:47Z")

</div>

The reason I’m asking is because the /etc/shadow file on my SLES11SP3  
machine contains entries that have the prefix $2y which according to  
that article makes it bcrypt??

From Wikipedia:  
The prefix “$2a$” or “2y” in a hash string in a shadow password file  
indicates that hash string is a bcrypt hash in modular crypt format.

But in yast there is no mention of bcrypt, just Blowfish…

I can’t seem to find a definitive reference.

On 2014-09-18 21:23, ab wrote:[color=blue]

> Guessing, no:
> 
> [http://en.wikipedia.org/wiki/Bcrypt](http://en.wikipedia.org/wiki/Bcrypt)
> 
> [/color]

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [October 1, 2014, 12:41am UTC](https://forums.suse.com/t/password-encryption-method-question/26096/4 "2014-10-01T00:41:10Z")

</div>

Yeah, and based on that article I’m guessing the terms are being used  
interchangeably in Yast. The proof is likely in the fact that one of them  
is used in /etc/shadow (or /etc/passwd for old/odd installs) since that  
only contains hashes (I’ve never seen an option on Linux to do otherwise,  
anyway). Another, probably better, clue, is that it’s fixed-length. Set  
a short password, then an insanely-long password. Same-length means you  
have a hash (bcrypt) and not the output of something reversible (Blowfish).

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 1, 2014, 1:43am UTC](https://forums.suse.com/t/password-encryption-method-question/26096/5 "2014-10-01T01:43:15Z")

</div>

Yes, it’s fixed length for all the passwords in /etc/shadow.

Found some more info on the $2a prefix:  
[https://www.suse.com/support/security/advisories/2011\_35\_blowfish.html](https://www.suse.com/support/security/advisories/2011_35_blowfish.html)

I’ve found some info on a couple of websites that use the terms  
interchangeably as well.

For example:  
[http://toves.freeshell.org/bf/](http://toves.freeshell.org/bf/)  
Noticing that SuSE 10.x had a different password hash from RHEL4 (md5)  
I was curious.  
Its apparently based on the blowfish cipher and originally used in OpenBSD.

If I look at what OpenBSD uses it’s apparently bcrypt.

I’ll just have to install OpenBSD and compare.

On 2014-09-30 23:41, ab wrote:[color=blue]

> Yeah, and based on that article I’m guessing the terms are being used  
> interchangeably in Yast. The proof is likely in the fact that one of them  
> is used in /etc/shadow (or /etc/passwd for old/odd installs) since that  
> only contains hashes (I’ve never seen an option on Linux to do otherwise,  
> anyway). Another, probably better, clue, is that it’s fixed-length. Set  
> a short password, then an insanely-long password. Same-length means you  
> have a hash (bcrypt) and not the output of something reversible (Blowfish).
> 
> [/color]

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 3, 2014, 1:53am UTC](https://forums.suse.com/t/password-encryption-method-question/26096/6 "2014-10-03T01:53:09Z")

</div>

So I’ve installed OpenBSD, it sure does look the same.  
Same length and copying the hash from Suse to OpenBSD works.  
OpenBSD uses the prefix 2a while Suse uses 2y.

On 2014-10-01 00:43, alekz wrote:[color=blue]

> Yes, it’s fixed length for all the passwords in /etc/shadow.
> 
> Found some more info on the $2a prefix:  
> [https://www.suse.com/support/security/advisories/2011\_35\_blowfish.html](https://www.suse.com/support/security/advisories/2011_35_blowfish.html)
> 
> I’ve found some info on a couple of websites that use the terms  
> interchangeably as well.
> 
> For example:  
> [http://toves.freeshell.org/bf/](http://toves.freeshell.org/bf/)  
> Noticing that SuSE 10.x had a different password hash from RHEL4 (md5)  
> I was curious.  
> Its apparently based on the blowfish cipher and originally used in OpenBSD.
> 
> If I look at what OpenBSD uses it’s apparently bcrypt.
> 
> I’ll just have to install OpenBSD and compare.
> 
> On 2014-09-30 23:41, ab wrote:[color=green]
> 
> > Yeah, and based on that article I’m guessing the terms are being used  
> > interchangeably in Yast. The proof is likely in the fact that one of them  
> > is used in /etc/shadow (or /etc/passwd for old/odd installs) since that  
> > only contains hashes (I’ve never seen an option on Linux to do otherwise,  
> > anyway). Another, probably better, clue, is that it’s fixed-length. Set  
> > a short password, then an insanely-long password. Same-length means you  
> > have a hash (bcrypt) and not the output of something reversible (Blowfish).
> > 
> > [/color][/color]
