# Bernstein's cryptoint library defends constant-time code against compiler optimizations

Original title: The cryptoint library (2025) \[pdf\]

> Hacker News story 50103588 · language: en · submitted 2026-10-15
> Web version: https://zeli.app/story/50103588
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 26 · by [akkartik](<https://news.ycombinator.com/user?id=akkartik>) · 💬 0
[original](<https://cr.yp.to/papers/cryptoint-20250424.pdf>) · [HN discussion](<https://news.ycombinator.com/item?id=50103588>)

## Summary

Daniel J. Bernstein's cryptoint library provides constant-time integer operations for C/C++ that resist gcc and clang optimizations which can silently reintroduce branches and timing leaks. Rather than merely blocking conditional-selection branches, it prevents compilers from introducing any bool conditions internally, using a global volatile zero plus platform assembly. Already used across SUPERCOP, lib25519, libmceliece, libntruprime, and OpenSSH's sntrup761, each function is verified through symbolic execution and SMT equivalence checking.

## Key quote

> This is not a fool's errand: it is common-sense engineering.

---

## Cite

- Page: https://zeli.app/story/50103588
- Date: 2026-10-15
- Source: cr.yp.to (https://cr.yp.to/papers/cryptoint-20250424.pdf)
- Hacker News: https://news.ycombinator.com/item?id=50103588

## Other languages

- zh: https://zeli.app/zh/story/50103588 · markdown: https://zeli.app/zh/story/50103588.md
- ja: https://zeli.app/ja/story/50103588 · markdown: https://zeli.app/ja/story/50103588.md
- ko: https://zeli.app/ko/story/50103588 · markdown: https://zeli.app/ko/story/50103588.md
- de: https://zeli.app/de/story/50103588 · markdown: https://zeli.app/de/story/50103588.md
- es: https://zeli.app/es/story/50103588 · markdown: https://zeli.app/es/story/50103588.md
- ru: https://zeli.app/ru/story/50103588 · markdown: https://zeli.app/ru/story/50103588.md
