Safeguard
Tag

cryptography

Safeguard articles tagged "cryptography" — guides, analysis, and best practices for software supply chain and application security.

67 articles

Application Security

Secure password hashing in Go: bcrypt, Argon2, and the mistakes in between

Go's bcrypt package caps input at 72 bytes and returns ErrPasswordTooLong instead of silently truncating — one of several Go-specific quirks that trip up password hashing code.

Jul 8, 20266 min read
Best Practices

Symmetric vs Asymmetric Encryption in Python: A Practical Guide

One key or two? A working comparison of Fernet and RSA in Python's cryptography library — with the OAEP-vs-PKCS1v15 mistake that still causes padding-oracle bugs.

Jul 8, 20267 min read
Industry Analysis

Insecure Randomness in Security-Sensitive Code

A single deleted line broke Debian's OpenSSL keys for two years. We break down real insecure randomness vulnerabilities and how Safeguard catches weak PRNGs before attackers do.

Jul 7, 20267 min read
Security Guides

C# Cryptography Best Practices in .NET

The right way to do cryptography in C#: authenticated encryption with AesGcm, secure randomness, PBKDF2 password hashing, constant-time comparison, and the legacy APIs to stop using.

Jul 5, 20265 min read
Concepts

Symmetric vs Asymmetric Encryption: What's the Difference?

Symmetric encryption uses one shared key for both locking and unlocking. Asymmetric encryption uses a key pair, one public and one private. One is fast; the other solves the key-sharing problem.

Jul 4, 20266 min read
Concepts

Encryption vs Hashing: What's the Difference?

Encryption scrambles data so it can be unscrambled later with a key. Hashing turns data into a fixed fingerprint that can never be reversed. One protects secrets; the other verifies them.

Jul 3, 20266 min read
Industry Analysis

Secure Random Number Generation in JavaScript with crypto...

Math.random() is predictable and unsafe for security tokens. Here's why Node's crypto.randomBytes() is the standard for secure JavaScript randomness.

Jul 3, 20267 min read
Industry Analysis

Secure Random Number Generation in Ruby with SecureRandom

Ruby's built-in rand() uses a predictable Mersenne Twister and should never generate tokens, passwords, or session IDs. Here's how SecureRandom fixes that.

Jul 3, 20267 min read
Industry Analysis

Secure Random Number Generation in PHP with random_bytes

PHP's mt_rand() has a 32-bit seed space attackers can crack in seconds. Here's why random_bytes() and random_int() replaced it in PHP 7.0, and how weak randomness still causes breaches.

Jul 3, 20267 min read
Industry Analysis

Secure Random Number Generation in C# with RandomNumberGe...

Why System.Random is a security liability in C# and how RandomNumberGenerator prevents predictable tokens, nonces, and keys in .NET applications.

Jul 3, 20266 min read
Industry Analysis

Secure Random Number Generation in Java with SecureRandom...

Why java.util.Random and even UUID.randomUUID() can leak predictable tokens, and how Java's SecureRandom and NIST DRBG providers actually protect secrets.

Jul 3, 20267 min read
Secure Development

TLS Library Comparison: OpenSSL vs. LibreSSL vs. BoringSSL

Three forks of the same codebase, three different security philosophies. Here is how to choose the right TLS library for your project.

Jun 21, 20265 min read

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.

cryptography (Page 2) — Safeguard Blog