SShortSingh.
Back to feed

Why Encryption Alone Is Not Enough: The Case for Authenticated Encryption

0
·1 views

Encryption ensures data confidentiality but does not by itself prevent tampering, meaning attackers can alter ciphertext without needing the decryption key. A developer building a cryptography project explains this gap in part four of an ongoing series. To address both confidentiality and integrity, the project uses AES-GCM, an Authenticated Encryption with Associated Data (AEAD) cipher mode that generates an authentication tag alongside the encrypted output. If even a single bit of the ciphertext is altered after encryption, AES-GCM refuses to decrypt and raises an exception rather than silently returning corrupted data. This is why modern cryptographic best practices favour AEAD modes like AES-GCM or ChaCha20-Poly1305 over legacy modes such as AES-CBC, which provide no built-in integrity verification.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

ClickHouse Tiered Storage Cuts S3 Costs 71% While Keeping Query Speed Intact

Engineers running ClickHouse on AWS EC2 face steep storage bills, with 3 TB on gp3 EBS costing roughly $245 per month compared to about $67 on S3 at $0.023 per GB-month. ClickHouse's MergeTree engine stores data in immutable parts that can each reside on different storage backends, making native tiering possible without any application-level changes. A tiered storage policy keeps recent data on fast local EBS while automatically migrating older parts to S3 after a configurable period, such as 12 months, using TTL rules. A secondary trigger called move_factor pushes the oldest parts to S3 once local disk usage crosses roughly 80%, preventing hot storage from filling up. Crucially, existing SQL queries, drivers, and dashboards require no modification, as ClickHouse handles part location transparently at the storage layer.

0
ProgrammingDEV Community ·

Developer spends $20k and 40 billion tokens building open-source AI agent harness in Dart

A solo developer has spent approximately $20,000 across 40 billion AI tokens over three months to build >_Fa, an open-source agent harness written in Dart, with zero lines of code written by hand. The project was built using low-cost models such as Kimi K3 and GLM-5.3, routed per task to keep costs down. The resulting tool is a roughly 7 MB single binary that requires no runtime, installs in under a second, and runs across multiple platforms including mobile, web, CLI, and CI pipelines. Notably, the harness is self-building — an automated factory shipped five releases in a single day without any human involvement. The app has now received Apple App Store approval, making it possible to build mobile apps directly from a mobile device.

0
ProgrammingDEV Community ·

Browser vs. Node.js Event Loop: Key Differences Every JS Developer Should Know

JavaScript is single-threaded but handles high concurrency through the Event Loop, which delegates heavy tasks like I/O and timers to system threads while queuing callbacks for the main thread. Both browsers and Node.js use this mechanism, but their implementations differ significantly in structure and optimization. The browser Event Loop includes a rendering phase targeting ~60Hz frame updates, where microtask bloat can freeze the UI, and requestAnimationFrame is preferred for visual updates. Node.js splits its macrotask queue into distinct phases — Timers, Poll, and Check — and adds process.nextTick(), which executes before standard Promise microtasks and can starve the Event Loop if called recursively. Understanding these differences is critical for writing performant, non-blocking JavaScript in both environments.

0
ProgrammingDEV Community ·

CSS Grid Layout: How grid-template-areas and grid-area Work Together

CSS offers powerful grid properties that simplify webpage layout design. The grid-template-areas property allows developers to define named sections within a grid container. Child elements can then be assigned to these named sections using the grid-area property. For example, setting grid-area: header on a child element places it within the section named 'header' in the parent grid. Together, these two properties make it easier to build structured, readable layouts without complex positioning logic.