Skip to content

Instantly share code, notes, and snippets.

View mjosaarinen's full-sized avatar
🐻
busy with usual space bear stuff

Markku-Juhani O. Saarinen mjosaarinen

🐻
busy with usual space bear stuff
View GitHub Profile
@mjosaarinen
mjosaarinen / permissions.md
Created May 20, 2026 08:58
One way for setting up file permissions for Agentic CLI

One way for setting up file permissions for Agentic CLI

2026-05-20 Markku-Juhani O. Saarinen

Using Agentic AI (Claude Code, Codex) for coding is great, but running such a creative (and sometimes unpredictable) system with full visibility to your personal files (ssh keys, browser-stored passwords, etc.) is dangerous.

There are various ways of doing sandboxing. Using the standard Linux user separation, access control, and shared group permissions is actually one of the more powerful ones and should be used as a baseline.

Note that to do any of this, you need to be competent enough to use a self-administered Linux system (local root). If you're not comfortable with it, don't use Agentic CLIs.

@mjosaarinen
mjosaarinen / sumhash0.go
Last active June 20, 2022 12:27
110 leadig zero bits on Algorand's SumHash-512
// sumhash0.go
// 2022-06-18 Markku-Juhani O. saarinen <mjos@mjos.fi>
// === A sumhash-512 with 110 leading zero bits (from left)
/*
input = AA4F827EE71BF78B816E767A24B271AD046A3C52DA8B25EAB2D59A86C8B93F02FB73184B74A5F8F227FD1500000000
H(x) = 000000000000000000000000000385D978E7FF3D3239DB4F1C357EA40940EAB592F34AEC646DED668859B622341566A838B566490E2AC71DBA89B067E647FC31
*/
@mjosaarinen
mjosaarinen / tslider.py
Created August 6, 2021 20:27
Welch T-Test ("TVLA") Sliders with Python 3 matplotlib. The thick lines are the distributions of averages of N Gaussian variables, which are also Gaussians! When they don't overlap, then the distributions are clearly separate and T value also crosses the +-4.5 line commonly used in side-channel work. This is close to P value 10^-5 or confidence …
#!/usr/bin/env python3
# tslider.py
# 2021-08-02 Markku-Juhani O. Saarinen <mjos@pqshield.com>
# Free to play with!
# === Welch T test sliders (for teaching TVLA statistics)
# Welch T-Test ("TVLA") Sliders with Python 3 matplotlib. The thick lines
# are the distributions of averages of N Gaussian variables, which are
@mjosaarinen
mjosaarinen / cmov_vs_ct.txt
Created April 13, 2021 08:35
CMOV vs Constant-Time
Markku-Juhani O. Saarinen <mjos@pqshield.com>
Apr 11, 2021, 9:32 PM (2 days ago)
to Tech-crypto-ext@lists.riscv.org, tech-bitmanip@lists.riscv.org.
Hello Bitmanip and Krypto,
A colleague asked: "Why CMOV is not on the constant-time Zkt list -- the Bitmanip specification says that it is helpful for cryptography?" https://github.com/rvkrypto/riscv-zkt-list
@mjosaarinen
mjosaarinen / bitlogic.adoc
Last active July 20, 2023 12:29
On RISC-V Logic Optimization for Cryptography

DRAFT of 2020 May 28 Markku-Juhani O. Saarinen <mjos@pqshield.com>

On RISC-V Logic Optimization for Cryptography

Many cryptographic functions require computation of Boolean functions from n bits to m bits. Sometimes these functions are large enough to have been traditionally implemented with table lookups, but timing side-channel considerations force their implementation in a bit-sliced manner.

@mjosaarinen
mjosaarinen / keybase.md
Created December 31, 2014 20:33
keybase.md

Keybase proof

I hereby claim:

  • I am mjosaarinen on github.
  • I am mjos (https://keybase.io/mjos) on keybase.
  • I have a public key whose fingerprint is 143F 245C 066C E2D9 8379 E287 C285 8B1B 5517 1BD5

To claim this, I am signing this object: