K

Kristaps Dzonsons

kristaps.bsd.lv · Personal blog · on HN since 2012

Kristaps Dzonsons, a BSD developer, writes about small, secure C tools like kcgi, lowdown and acme-client, and OpenBSD sandboxing with pledge.

What HN saysCommenters recommend his small C acme-client and the fast lowdown Markdown tool, and some cite his SQLite conclusions as reason to skip the BCHS stack.
37HN people shared it
21linked it in comments
18stories submitted
127story points
3 months agolast shared
2012people per year2026

Most-shared posts

  1. 1
    Kcgi – minimal CGI and FastCGI library for C/C++
    9 people · 15 points · first shared 2016 · 1 comments on HN
  2. 2
    Lowdown – Simple Markdown Translator
    6 people · 5 points · first shared 2021 · discussion on HN
  3. 3
    Acme client
    6 people · first shared 2016
  4. 4
    How easy is it for a developer to "sandbox" a program?
    3 people · 68 points · first shared 2025 · 95 comments on HN
  5. 5
    Secure CGI Applications in C on BSD (2016)
    3 people · 17 points · first shared 2016 · 2 comments on HN
  6. 6
    Let's Encrypt client from BSD in C
    3 people · 11 points · first shared 2016 · 1 comments on HN
  7. 7
    SQLite: Securely Using SQLite3 with Pledge(2) on OpenBSD
    2 people · 2 points · first shared 2019 · discussion on HN
  8. 8
    Slant – remote system monitor
    1 people · 3 points · first shared 2018 · discussion on HN
  9. 9
    Bsddistmake - distributed extension to bsdmake
    1 people · 2 points · first shared 2012 · discussion on HN
  10. 10
    Kcgi: Securing CGI web applications [pdf]
    1 people · 2 points · first shared 2021 · discussion on HN
  11. 11
    Lowdown can translate Markdown to an mdoc manpage
    1 people · 1 points · first shared 2026 · discussion on HN
  12. 12
    Sblg: Static Blog Utility
    1 people · 1 points · first shared 2022 · discussion on HN
  13. 13
    Tutorial6
    1 people · first shared 2018
  14. 14
    Database conclusions
    1 people · first shared 2022
  15. 15
    Ksql
    1 people · first shared 2019

What HN people wrote when they linked it

guggle · 2022-01-19
This is really hilarious... I just followed the third given example (https://kristaps.bsd.lv/absdcon2017/database-conclusions.html) and that's how it goes: "the simplicity of SQLite is a lie". Ok, thanks, I'll pass on the "BCHS" stack then. I now consider this website satire.
stepvhen · 2020-04-04
This looks great! I too have been working on a critter tracker[0], but writing it in C using kcgi[1] (no JS at all). I have never done a web project before, so this has been a great learning experience. I still have some functionality to complete, but so far it has been pretty useful, even just the "available now" feature. [0] https://xvetrd.tilde.institute/index.cgi [1] https://kristaps.bsd.lv/kcgi/
Sir_Cmpwn · 2018-02-28
Acme clients are a space where there are a lot of bad choices. My favorite acme client is this: https://kristaps.bsd.lv/acme-client/ It is: - Small - Written in C - Can be statically linked against LibreSSL and curl No nonsense, does what it says on the tin, works on many operating systems.
aomix · 2016-09-20
There seem to be slightly fewer Lets Encrypt and ACME implementations than stars in the sky. Which is fantastic. Last week I read about a privsep/chroot/pledge'd (OpenBSD thing) C implementation https://kristaps.bsd.lv/acme-client/ .
randusername · 2026-08-04
I do this too, but I use cmake to switch the backend between pandoc and lowdown [0]. Lowdown is not a drop-in replacement for pandoc flavored markdown, but it's between 10-100X faster. It's very handy to switch when tinkering with template changes because I can convert ~ 1000 markdown files instantaneously on my mid 2010s desktop. [0]: https://kristaps.bsd.lv/lowdown/
uticus · 2025-08-20
Pushing the burden of network permissions management outside the browser, to the OS? Heresy! To be serious, this has introduced me to sandboxing on BSD via pledge [0] and comparisons against Linux seccomp [1] - thank you! [0] https://news.ycombinator.com/item?id=17289654 [1] https://kristaps.bsd.lv/devsecflops/ (submission by same poster at https://news.ycombinator.com/item?id=44264021)
hlieberman · 2025-05-04
Very impressive design of the application -- haven't looked into the crypto yet. It reminds me a bit of the design the OpenBSD folks made with letskencrypt/acme-client: https://kristaps.bsd.lv/acme-client/
smartmic · 2024-04-15
My main authoring tool is then Emacs Markdown Mode (https://jblevins.org/projects/markdown-mode/). For data entry, it comes with some bells and whistles similar to org-mode, like C-c C-l for inserting links etc. I seldom export my notes for external usage, but if it is the case, I use lowdown (https://kristaps.bsd.lv/lowdown/) which also comes with some nice output targets (among the more unusual are Groff and Terminal). Of cource pandoc (https://pandoc.org/) does a very good job here, too.
divbzero · 2024-02-29
Now all we need is a Markdown to roff converter… which apparently already exists. https://github.com/postmodern/kramdown-man https://rtomayko.github.io/ronn/ronn.1.html https://kristaps.bsd.lv/lowdown/
wwarner · 2022-12-10
If you like the sound of glow, check out lowdown. Renders to colorized term or man page, in addition to odf, latex, html & pdf https://kristaps.bsd.lv/lowdown/
LAC-Tech · 2021-08-23
Not an expert, but I think kcgi uses fastcgi under the hood. https://kristaps.bsd.lv/kcgi/
jhgb · 2021-04-15
> Why not use sqlite? Here's one example - I like to access my database from my IDE remotely - my understanding is that remote access is not possible with sqlite. I found https://kristaps.bsd.lv/sqlbox/ to be an interesting approach.
q3k · 2020-01-22
IIUC, you would usually have a separate subprocess responsible for file access only, communicating over IPC with a less trusted and more complex process (eg. one that parses documents and renders fonts). See: architecture of acme-client(1): https://kristaps.bsd.lv/acme-client/
beefhash · 2019-01-26
If you want to do web applications in C, you may also be interested in the kcgi[1] and ksql[2]. kcgi takes a more traditional approach by using CGI rather than embedding a static file server in the final binary. [1] https://kristaps.bsd.lv/kcgi/ [2] https://kristaps.bsd.lv/ksql/
notaplumber · 2018-06-09
Important pieces of the puzzle are Kristaps' kcgi (perhaps kwebapp/ksql). https://kristaps.bsd.lv/kcgi/ And also OpenBSD pledge / "sandboxing" on other OSs https://man.openbsd.org/pledge https://learnbchs.org/pledge.html https://kristaps.bsd.lv/kcgi/tutorial6.html
brynet · 2018-02-28
I probably wouldn't trust implementing important network speaking services as a shell script, potentially running as root. OpenBSD's acme-client [0] is a fork of Kristaps Dzonsons' project (formerly letskencrypt), it's a properly privilege separated ACME v1 client, written in C, using pledge(2) on OpenBSD, libseccomp on Linux. https://kristaps.bsd.lv/acme-client/ [0] https://man.openbsd.org/acme-client
tbirdz · 2017-06-18
It's not a joke, just look at the author's work on the supporting kcgi and kwebapp libraries: https://kristaps.bsd.lv/kcgi/ https://github.com/kristapsdz/kcgi https://github.com/kristapsdz/kcgi-framework https://github.com/kristapsdz/kwebapp
sedachv · 2016-12-21
kev009 · 2016-05-23
I really wouldn't want to expose GLib to this level but to each their own. kcgi is an interesting C API with security taken seriously: http://kristaps.bsd.lv/kcgi/
tsegratis · 2022-07-25
I like the premise of embedded generating inline c. Kinda like php for c, rather than html I'm not sure of custom BNF per generating command. I notice they're mostly order independent, which makes it a little easier to learn, but what's the advantage over c syntax? Is it roughly that pointers etc are impossible. Maybe a c-esque syntax would be more learnable How does the existing syntax compose, i.e. can the user run away with writing tcl-style scripts If you don't get a lot of feedback, I would guess it is inpart due to custom syntax being an entry barrier to understanding I don't know, I think html is easy, so people want power with php. On the other hand for an audience that is using c, by the time I'm doing that, does Vely's custom syntax give me more than a set of convenient c library calls... such as https://kristaps.bsd.lv/kcgi/ In any case, I like the apis, and aim, and I think the premise has legs
anjbe · 2020-06-22
I’m an OpenBSD developer (mostly a packager). IMO you’ve mischaracterized both Theo’s response and OpenBSD’s culture. If OpenBSD has a culture, it’s not “real men,” but “show me the code.” That’s plain from the mail linked in the post you responded to: mailing lists are full of people making suggestions (like “rewrite OpenBSD in Rust”), but few people doing the necessary work (like implementing or testing a reasonably POSIX‐compatible userland, handling the 8+ architectures that would immediately have to be dropped, measuring the performance impacts on the project build clusters…). Contrast the above response with the WireGuard implementation this whole discussion is about. A non‐OpenBSD contributor sent a draft patchset, which received suggestions and was iterated upon several times, and despite some complaints about the concept from one quarter (https://marc.info/?l=openbsd-cvs&m=159273877612032&w=2), it was committed by the very person who had those complaints! In the end Jason and Matt of WireGuard described the process as “extremely pleasant” (https://lists.zx2c4.com/pipermail/wireguard/2020-June/005588.html). This is feedback I see often from external contributors. You describe safety guards like privilege separation and pledge/unveil as “real men programming”, but they’re the complete opposite: they exist precisely to mitigate the damage that results from human error. acme-client’s design does keep private keys inaccessible this way (see…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close