DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

Is bcrypt.hash(password, 10) Secure Enough? What to Check

bcrypt cost 10 is a legacy minimum, not a universal security guarantee. Learn how to tune it, handle the 72-byte limit and plan an upgrade.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

bcrypt.hash(password, 10) is not automatically insecure: OWASP’s current guidance sets cost 10 as the minimum when bcrypt must be used for a legacy system. But that floor does not guarantee the setting is right for your server, that the library handles long inputs safely, or that bcrypt is the best choice for a new system. Check the algorithm, input limit, and real-world verification performance before relying on a copied snippet.

What does bcrypt cost 10 mean?

The 10 is bcrypt’s cost, or work factor. It is not simply ten ordinary rounds: bcrypt’s work grows exponentially with the cost parameter. The Node.js bcrypt package documentation describes cost 10 as 210 rounds. A higher cost makes each hash calculation more expensive for a legitimate login and for an attacker testing guesses against stolen hashes.

As an Amazon Associate I earn from qualifying purchases.

OWASP says bcrypt should be used only for password storage in legacy systems where Argon2 and scrypt are unavailable, and specifies a work factor of at least 10. That makes 10 a floor in this legacy guidance—not a universal production recommendation or proof that a particular deployment is secure. OWASP Password Storage Cheat Sheet

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How should you choose a bcrypt cost?

Choose the largest work factor your verifier can sustain without harming login performance or making resource exhaustion too easy. OWASP offers less than one second to calculate a hash as a general target, not a benchmark result or a universal latency requirement. The acceptable cost depends on your hardware, workload, concurrency, and service requirements; OWASP explicitly says there is no single ideal work factor.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
  1. Benchmark the actual service. Measure both hashing and verification on production-equivalent hardware, under realistic concurrency. A fast result from a developer laptop does not establish safe capacity for a busy authentication service.
  2. Set a practical latency and capacity budget. Consider the effect of expensive verification on normal login traffic as well as bursts of requests. Pair the setting with rate limiting and application-level abuse protections; password-hash cost alone is not an online-attack defense.
  3. Increase carefully and monitor. Raise the cost as far as your measured service can safely support, then watch login latency and resource use. Reassess it as hardware and traffic change. NIST likewise recommends choosing the highest practical cost without harming verifier performance and increasing it over time. NIST SP 800-63B-4

Does bcrypt truncate passwords after 72 characters?

The commonly documented bcrypt limit is 72 bytes, not 72 characters. UTF-8 characters can use multiple bytes, so a password may reach the limit with fewer than 72 visible characters. OWASP advises enforcing a maximum of 72 bytes or a lower limit if the implementation requires it. The exact behavior at and beyond the limit depends on the library and version, so verify its documentation rather than assuming the full submitted password is used.

For the Node.js bcrypt package, its documentation describes the first-72-byte behavior and recommends version 5.0.0 or later to avoid the security issues it documents. Check the version in your application and its specific handling of long and Unicode input. Node.js bcrypt package documentation

Rank #2
Sale
Password Safe
  • Requires 3 "AAA" batteries (included)
  • Unit auto-locks for 30 minutes after 5 consecutive incorrect PINs

OWASP’s authentication guidance recommends allowing a maximum password length of at least 64 characters so users can choose passphrases. That character-based policy recommendation does not override bcrypt’s byte ceiling. If you retain bcrypt, define and explain a limit that accounts for encoded bytes, and reject unsupported overlong passwords explicitly. Silently treating distinct long passwords as equivalent can surprise users and weaken the meaning of their chosen password. OWASP Authentication Cheat Sheet

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should a new system use bcrypt or Argon2id?

For a new password-storage system, evaluate Argon2id first. OWASP positions bcrypt as a legacy choice and recommends Argon2id with a minimum configuration of 19 MiB memory, 2 iterations, and parallelism 1. If Argon2id is unavailable, OWASP lists scrypt as an alternative, with minimum parameters of CPU/memory cost 217, block size 8 (1024 bytes), and parallelization 1. These are OWASP guidance floors, not guarantees that a configuration suits every deployment.

Approach OWASP guidance What to assess
Argon2id Preferred for new systems; minimum 19 MiB memory, 2 iterations, parallelism 1. Library and environment support, measured verifier capacity, and compatibility with stored hashes.
scrypt Alternative if Argon2id is unavailable; minimum CPU/memory cost 217, block size 8 (1024 bytes), parallelization 1. Support in your stack and the resource cost under expected login concurrency.
bcrypt Legacy option when Argon2 and scrypt are unavailable; work factor at least 10. Appropriate cost for your service and the implementation’s 72-byte input behavior.

Algorithm selection also depends on existing hash formats, available libraries, deployment constraints, and compliance requirements. NIST calls for an approved current password-hashing scheme and recommends retaining the scheme and cost information with each verifier so that systems can migrate algorithms or parameters.

How to update an existing bcrypt implementation

  1. Identify the exact package and version. Read its current documentation for cost settings, asynchronous behavior, encoding, and overlong inputs. For Node.js bcrypt, confirm whether the deployed version is at least 5.0.0, as the package recommends for the issues it documents.
  2. Test cost and capacity on representative infrastructure. Benchmark hash and verify operations under expected load; choose a cost that balances resistance to offline guessing with responsive logins and safe resource use.
  3. Make password-length handling explicit. Decide how your application measures and enforces the limit. For bcrypt, account for encoded bytes, and reject unsupported inputs rather than silently accepting a value the implementation does not fully process.
  4. Evaluate a modern scheme for new hashes. Assess Argon2id first and scrypt if Argon2id is unavailable, against your platform and requirements. Store the algorithm and parameters alongside each verifier.
  5. Upgrade hashes after successful authentication. Verify a login with the account’s stored scheme and cost. If those settings are outdated, rehash the password with the current scheme and parameters after successful verification. Keep a password-reset path for accounts that cannot be upgraded through login.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What cost 10 does—and does not—tell you

Cost 10 meets OWASP’s cited minimum for legacy bcrypt, but it does not establish the security of an application by itself. It says nothing about the specific library version, how inputs beyond 72 bytes are handled, whether the service can safely support a higher cost, or whether bcrypt is appropriate for a new system. There is no universal cracking-time estimate implied by the number: the result depends on the implementation and attacker resources, and no deployment-specific hash performance or attack rate is established here.

Rank #4
Yubico - YubiKey Bio C (FIDO Edition) - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C, Biometric, FIDO Certified - Protect Your Online Accounts
  • FIDO-ONLY FUNCTIONALITY: Supports FIDO2 (passkeys) and FIDO U2F protocols for passwordless and second-factor authentication. Does not support OTP, TOTP, Smart Card (PIV), or other advanced features - upgrade to YubiKey 5 Series for extended functionality
  • SECURE AND CONVENIENT: Passwordless MFA login with the YubiKey Bio authenticator and biometric information using a fingerprint, with a PIN as a fallback. Simply plug in via USB and use your fingerprint to authenticate
  • DEVICE & OS COMPATIBILITY: Compatible with Windows, macOS, ChromeOS, and Linux. Works seamlessly with supported services like Google and Microsoft accounts, and major password managers. See the full compatibility list at "Works With YubiKey"
  • DURABLE & RELIABLE: Resistant to tampering, water, and crushing. No batteries or network connectivity required, offering dependable authentication without any downtime. Securely manufactured in USA & Sweden
  • Yubico Authenticator App - Fingerprint enrollment, passkey management and PIN configuration available via the app app - Upgrade to YubiKey 5 Series to generate one-time-passwords (OTP) via Yubico Authenticator and for advanced compatibility (OATH, PIV)

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.