Not

Hacker News!

Beta
Home
Jobs
Q&A
Startups
Trends
Users
Live
AI companion for Hacker News

Not

Hacker News!

Beta
Home
Jobs
Q&A
Startups
Trends
Users
Live
AI companion for Hacker News
  1. Home
  2. /Story
  3. /Data-at-Rest Encryption in DuckDB
  1. Home
  2. /Story
  3. /Data-at-Rest Encryption in DuckDB
Nov 20, 2025 at 2:26 PM EST

Data-at-Rest Encryption in DuckDB

chmaynard
220 points
24 comments

Mood

informative

Sentiment

positive

Category

tech_discussion

Key topics

Database Security

Data Encryption

DuckDB

Discussion Activity

Active discussion

First comment

48m

Peak period

16

Day 1

Avg / period

16

Comment distribution16 data points
Loading chart...

Based on 16 loaded comments

Key moments

  1. 01Story posted

    Nov 20, 2025 at 2:26 PM EST

    3d ago

    Step 01
  2. 02First comment

    Nov 20, 2025 at 3:14 PM EST

    48m after posting

    Step 02
  3. 03Peak activity

    16 comments in Day 1

    Hottest window of the conversation

    Step 03
  4. 04Latest activity

    Nov 20, 2025 at 10:06 PM EST

    3d ago

    Step 04

Generating AI Summary...

Analyzing up to 500 comments to identify key contributors and discussion patterns

Discussion (24 comments)
Showing 16 comments of 24
kianN
3d ago
2 replies
I’m just continually amazed by the DuckDB team. We had built out a naive solution with OpenSSL to encrypt duckdb files, but that lead to a 2x runtime cost for first time queries and used up a lot of ram because we were encrypting/decrypting the entire file all at once. It seems like because DuckDB is encrypting at the page level and leveraging modern processors native AES operations, they are able to perform read/writes at practically no cost.
PunchyHamster
3d ago
3 replies
Why not just LUKS ? Kernel level, leverages acceleration, transparent to anything you run on top of it.

DB encryption is useful if you have multiple things that need separate ACL and encryption keys but if it is one app one DB there is no need for it

beala
3d ago
From the article:

> This allows for some interesting new deployment models for DuckDB, for example, we could now put an encrypted DuckDB database file on a Content Delivery Network (CDN). A fleet of DuckDB instances could attach to this file read-only using the decryption key. This elegantly allows efficient distribution of private background data in a similar way like encrypted Parquet files, but of course with many more features like multi-table storage. When using DuckDB with encrypted storage, we can also simplify threat modeling when – for example – using DuckDB on cloud providers. While in the past access to DuckDB storage would have been enough to leak data, we can now relax paranoia regarding storage a little, especially since temporary files and WAL are also encrypted.

kianN
3d ago
We are in the separate ACL/encryption key bucket. We provide a Bayesian data analytics platform/api for other companies. Each company can have hundreds to thousands of datasets ("indices") each of which has a separate encryption key, and those keys are also stored encrypted with an organizational level key that is rotated daily.
letmetweakit
3d ago
I believe it's also to protect against the occasionally "lost" DB file.
notorious_pgb
3d ago
1 reply
With respect, none of this sounds like "amazing" work on DuckDB's part. It's not bad work, either! It's competent work.

Comparing it to a naive approach (encrypting an entire database file in a single shot and loading it all into memory at once) is always going to make competent work seem "amazing".

I say this not to shit on DuckDB (I see no reason to shit on them); rather, I think it's important that we as professionals have realistic standards that we expect _ourselves_ to hit. Work we view as "amazing" is work we allow ourselves not to be able to replicate. But this is not in that category, and therefore, you should hold yourself to the same standard.

kianN
3d ago
I'm more amazed that they released this as part of their open-source offering (not clear from my above comment). Encryption is a standard lever for open-source projects to monetize.

I run a small company and needed to budget solid amount of chunk of time for next year to dig into improving this component of our system. I respect your perspective around holding high standards, but I do think it's worth getting excited about and celebrating reliable performant software that demonstrates consistent competence.

glenjamin
3d ago
3 replies
Other than motherduck, is anyone aware of any good models for running multi-user cloud-based duckdb?

ie. Running it like a normal database, and getting to take advantage of all of its goodies

mritchie712
3d ago
For pure duckdb, you can put an Arrow Flight server in front of duckdb[0] or use the httpserver extension[1].

Where you store the .duckdb file will make a big difference in performance (e.g. S3 vs. Elastic File System).

But I'd take a good look at ducklake as a better multiplayer option. If you store `.parquet` files in blob storage, it will be slower than `.duckdb` on EFS, but if you have largish data, EFS gets expensive.

We[2] use DuckLake in our product and we've found a few ways to mitigate the performance hit. For example, we write all data into ducklake in blog storage, then create analytics tables and store them on faster storage (e.g. GCP Filestore). You can have multiple storage methods in the same DuckLake catalog, so this works nicely.

0 - https://www.definite.app/blog/duck-takes-flight

1 - https://github.com/Query-farm/httpserver

2 - https://www.definite.app/

tempest_
3d ago
Feels like I keep seeing "Duckdb in your postgres" posts here. Likely that is what you want.
derekhecksher
3d ago
https://github.com/gizmodata/gizmosql
jedisct1
3d ago
2 replies
"Sqlite [...] encryption extension is a $2000 add-on".

SqliteMultipleCiphers has been around for ages and is free https://utelle.github.io/SQLite3MultipleCiphers/

And Turso Database supports encryption out of the box: https://docs.turso.tech/tursodb/encryption

michaelsbradley
3d ago
There’s also SQLCipher, it’s been in development since 2009 and works quite well:

https://github.com/sqlcipher/sqlcipher

memset
3d ago
How do you use these in practice? Both Python and Go don’t make it easy to link a different variation of SQLite with one of these plugins compiled in. How do you make it work?
jasonthorsness
3d ago
1 reply
AES-GCM sensitivity to nonce reuse is a tricky implementation detail. Here they acknowledge it but then don’t share their solution - and in fact the header contains 16 bytes for the nonce instead of the expected 12 bytes and they do not share what bytes are random. Did I miss something, anyone know?
jedisct1
3d ago
Static key, random 12 byte nonces, no per-session key for temp buffers.

8 more comments available on Hacker News

View full discussion on Hacker News
ID: 45996585Type: storyLast synced: 11/22/2025, 9:17:03 AM

Want the full context?

Jump to the original sources

Read the primary article or dive into the live Hacker News thread when you're ready.

Read ArticleView on HN

Not

Hacker News!

AI-observed conversations & context

Daily AI-observed summaries, trends, and audience signals pulled from Hacker News so you can see the conversation before it hits your feed.

LiveBeta

Explore

  • Home
  • Jobs radar
  • Tech pulse
  • Startups
  • Trends

Resources

  • Visit Hacker News
  • HN API
  • Modal cronjobs
  • Meta Llama

Briefings

Inbox recaps on the loudest debates & under-the-radar launches.

Connect

© 2025 Not Hacker News! — independent Hacker News companion.

Not affiliated with Hacker News or Y Combinator. We simply enrich the public API with analytics.