Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8756635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:07:40+00:00 2026-06-13T14:07:40+00:00

I’ve searched around and I can’t find a good resource that walks through the

  • 0

I’ve searched around and I can’t find a good resource that walks through the entirety of implementing Blowfish.

I am using 5.3.8 so I know I can use the crypt() function, and that I need to pass it a salt that is in the form of

$2[x,y,a]$[base 2 log of number of rounds]$[some string]

But I read somewhere that you need to generate the salt uniquely every time. Does that mean you have to store the salt in your database? If someone steals your database aren’t you in the same position as if you used shaX? How exactly does all of that work.

ALSO

I’ve been reading that Blowfish is also used to decrypt passwords. I had understood it just to be a hashing algorithm, where you encrypt two strings and then check if they match. How and why would you use an algorithm that can be decryptedf?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:07:41+00:00Added an answer on June 13, 2026 at 2:07 pm

    Salt protects you against rainbow table attack, so it’s OK to store the salt in the same database.

    Essentially a rainbow table is a huge table with millions of pre-computed hashes. So if the password is ‘some_pass’ and the hash is ‘ABC123’ the attacker would look at ‘ABC123’ in his rainbow table and he would see that ‘some_pass’ is generating this hash.

    If you use salt, the attacker would have the hash and the salt, but this rainbow table cannot work. Rainbow tables contain common passwords and / or all combinations of 1-6 (or more) chars. So if you hash ‘some_pass_salt__123123123123′ you can see the attacker won’t have luck with a rainbow table.

    As for implementing your own Blowfish, I hope this is for learning (homework?). Otherwise, it’s almost always a bad idea to implement your own security algorithms, simply because you are not a domain expert and you will miss some obscure details.

    Note that you may also want to verify what encryption algorithm is actually used when you call crypt(). MD5 is no longer secure and it can be broken with a good GPU (no typo, you can use your graphics card to break a hash). SHA-1 has been broken but it is computationally difficult to do it (the military can do it); so SHA-1 family is not recommended. Aim for the SHA-2 family.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.