What is Crypto Fails

A package for hiding data inside jpeg files using steganography techniques.

Highlighting Poor Cryptography Practices

Archive Ask Crypto Questions About Reasoning by Lego: A flawed perspective on cryptography. Scott Arciszewski from Paragon Initiative directed me to this example of PHP cryptography.

The code is bad and there are lessons to learn

The code is indeed poor, and the crypto design has significant flaws. However, as is customary for this blog, we can extract some valuable lessons from it. Let’s set aside the fact that it uses MCRYPT_RIJNDAEL_256 (the 256-bit block variant of Rijndael, which is not AES) instead of MCRYPT_RIJNDAEL_128 (the actual AES), the lack of return value checks for substr(), and the issue of passing a hexadecimal-encoded key to a function that requires a binary string. I have previously addressed all these shortcomings in this blog, so I will not revisit them here. Instead, let’s concentrate on two key points. First, the code implements a “MAC then Encrypt” (MtA) approach, meaning the Message Authentication Code (MAC) is applied to the plaintext message prior to encryption, which goes against contemporary cryptographic best practices. Second, the MAC is verified using a non-timing-safe comparison. This vulnerability allows an attacker to glean information about how much of the MAC matches by measuring the timing of failed decryption attempts with high precision. In contrast, in an “Encrypt then MAC” (EtM) design, where the MAC is applied to the ciphertext after encryption, such a timing leak could potentially allow message forgery. However, in this instance, since the MAC is embedded within the ciphertext and encrypted, exploiting this vulnerability may initially appear more challenging. Indeed, this issue has been raised previously.

Crypto Fails Reviews

No reviews yet.

Similar Tools

Free
Data Protection

Zama

Zama is pioneering the future of privacy with homomorphic encryption, making privacy a non-issue by design. Our community is dedicated to solving complex privacy and security challenges across cloud applications and public blockchain smart contracts. By enabling end-to-end encryption wherever applications run, Zama aims to make secure, private online interactions a mainstream reality.

Pioneering Homomorphic Encryption TechnologyEnd-to-End Data Encryption SolutionsEnhanced Cloud Application Security
Free
Data Protection

Tenzir

Tenzir empowers cybersecurity teams with next-generation network forensics, leveraging big data analytics to systematically investigate cyber attacks. Our platform provides intelligent decision support and automated forensic capabilities, enabling proactive defense against today's complex threat landscape and significantly improving an organization's security posture and ROI.

Advanced Network ForensicsBig Data Analytics for SecurityReal-time Threat Investigation
Free
Data Protection

Kriptos

Kriptos is an AI-powered platform designed to elevate your organization's cybersecurity, risk, and compliance posture. By automatically classifying and labeling sensitive documents based on content and context, Kriptos provides unparalleled visibility into your critical information assets. Gain actionable insights into data usage, identify potential risks, and streamline compliance with regulatory requirements by understanding where your most sensitive information resides and who has access to it.

AI-driven automatic document classification and labelingMulti-level sensitivity assessment (Confidential, Restricted, Internal Use, Public)Advanced analytics for information usage and anomaly detection
Free
Data Protection

Kiteworks

Kiteworks offers a Private Content Network (PCN) that provides zero-trust security and compliance for an organization's sensitive digital communications. It empowers businesses to manage risks associated with sending, sharing, receiving, and storing critical data, ensuring robust content governance and regulatory adherence. The platform unifies, tracks, controls, and secures all sensitive content flows, significantly enhancing risk management and bolstering compliance.

Private Content Network (PCN)Zero-Trust Security ArchitectureEnd-to-End Content Protection
Free
Data Protection

Cyera

Cyera is the leading Data Security Posture Management (DSPM) platform, empowering organizations to gain complete context and control over their sensitive data. By providing instant visibility into all data assets, nuanced risk assessment, and automated remediation, Cyera significantly reduces attack surfaces and strengthens operational resilience. We are fundamentally transforming how businesses approach data security, offering a holistic solution for comprehensive data protection.

Comprehensive Data Discovery and ClassificationReal-time Data Risk and Exposure AssessmentAutomated Remediation and Security Posture Improvement

Do not let AI keep
recommending someone else

Start your 7-day free trial and get your AI Visibility Score in about a minute. See exactly where you stand, where competitors are beating you, and the ranked fixes to get into the answer. Cancel anytime before the trial ends.

7-day free trial. Cancel anytime before it ends. Trusted by 500+ B2B SaaS teams.

Partnered with
Powered by