00f.net
rss2
Frank DENIS random thoughts.
00f.net · English
Frank DENIS blog
rss2content
- Last post
- Oct 8, 2026
- Posts in 24 h · 7 days · 30 days
- 0 · 0 · 0
- Our last check
- Answering
- Served from
- France
- Text score
- 15,465
- Format
- rss2
- Features in the feed
- content
Posts
What our queue read from this feed. Open one to read it here, or go to the site that published it.
- Branches in branch-free code
Oct 8, 2026 · original
Let’s add two numbers Here’s a complete C function that adds two unsigned 128-bit integers: typedef unsigned _BitInt ( 128 ) u128 ; u128 add ( u128 a , u128 b ) { return a + b ; } Now let’s compile it for 32-bit RISC-V: clang --target = riscv32 -march = rv32imac -mabi = ilp32 -O2 -S add.c -o - You can see the output on Compiler Explorer , alongside versions compiled with GCC and with the Zicond extension we’ll look at below. Here’s the relevant snippet: add a1, t1, t0 add a2, a7, t2 sltu t0, a1, t1 add a2, a2, t0 beq a2, a7, .LBB0_2 sltu t0, a2, a7 .LBB0_2: add a5, a5, a3 add a4, a4, a6 add t0, t0, a5 sltu a3, a5, a3 sltu a5, t0, a5 Wait, why is there a beq in an addition? That’s a conditional branch, right? RV32 registers hold 32 bits, so LLVM has to split our 128-bit addition into four smaller ones, passing the carry from each to the next. This is how the compiled code performs the add - Zeroization, part 3: Copies you can’t wipe
Oct 5, 2026 · original
Welcome to part 3 on zeroization! We added a wipe in part 1 and created an extra copy. And in part 2 , we looked at some options to clear the stack and registers. But why did we need some of those copies in the first place? Turns out that sometimes the answer is right there in the API. Do we need that buffer? Let’s go back to the textbook example: MAC verification. We initialize the state of a MAC function (could be HMAC, an AEAD, etc.), update the state with a message to authenticate, finalize the state, compute the expected tag, compare it with the received tag, and return whether they match. In the toy example below, the state is just two 128-bit blocks, and to produce a tag, we just XOR them to produce a 128-bit tag. #include stddef.h #include stdint.h typedef struct { uint8_t a [ 16 ]; uint8_t b [ 16 ]; } final_state ; __attribute__ (( noinline )) void extract_tag ( const final_stat - Zeroization, part 2: Clearing the stack and registers
Oct 5, 2026 · original
In part 1 , we saw that code intended to wipe secrets can end up creating extra copies. So what can we do? The best mitigation is to use a compiler designed to natively address that issue. Jasmin is a perfect example of this. Jasmin is a high-level assembler, similar to Dan Bernstein’s qhasm , that makes writing assembly code very pleasant, if only because it can do automatic register allocation. But Jasmin does a little bit more: the compiler is able to prove that values tagged as secrets are never returned as public values, are not involved in operations that wouldn’t run in constant time, and are safe against some classes of SPECTRE attacks. And for code using pointers, it’s even able to prove memory safety. In addition to that, and this is where things become relevant to our topic, Jasmin can automatically wipe all the values tagged as secret before returning from a function, regardl - Zeroization, part 1: Wiping can make things worse
Oct 5, 2026 · original
A good hygiene when processing secrets is to wipe them after use. And projects receives countless PRs about adding calls to zeroization functions for anything that looks like a secret. This is a low-hanging fruit, something LLMs love to report, and it feels theoretically useful. But unfortunately, things are a little bit more complicated. Blindly zeroing secrets can do more harm than good. Turns out that adding a wipe for a secret can leave more copies of a secret than the original code. Copies that wouldn’t have existed without it, and that are still there after it returns. Code snippets and their compiled output can be verified in this Godbolt example . Let’s start with memset() Classic starting point: the good old memset() call that gets optimized out: We calculate an intermediate value, use it to produce a result, then clear it before returning. #include stdint.h #include string.h ui - Do your employees actually use your product?
Sep 24, 2026 · original
I’m old, and I’ve worked with a lot of companies, large and small. Some employed me, while others were clients. The most innovative and productive companies I’ve worked with had something in common: employees used the company’s products because they wanted to. When I worked on Skyblog , Skyrock’s French blogging platform, everybody there used the product. And I really mean it: everybody. Night and day. And we had a lot of fun with it. So we cared a lot about it as both employees and as users . Skyblog is gone now, but my former colleagues and I still have great memories of working on it, even though we worked like crazy. That willingness to use the product tells me more about a company than the size of its budget. A company can hire excellent people and have a convincing plan for the future. But neither guarantees that anyone there will choose the product when they have a choice. That’s
Found by rss-feed-index, which checks each feed once a month at most.
Same record as JSON: https://api.agentalog.com/api/feeds/fd_00f_net_66e51be5950b36d9. More from this site: 00f.net in the Feeds tab.