ReFineID beta

ReFineID

Refined Electronic Identification.

A command-line tool, a PKCS#11 module and a desktop app for the Finnish electronic identity card. Put the card in a reader and log in to services like Suomi.fi, or sign a document, on Linux and the BSDs.

FINEID

what it is

Use your ID card to log in, and to sign

Three programs from one tree. refineid on the command line reads the card, manages PINs, and produces qualified signatures (PAdES, CAdES, ASiC-E) with RFC 3161 timestamps and eIDAS trusted-list validation. librefineid_pkcs11.so exposes the card through PKCS#11 v2.40, so Firefox logs you in to services like Suomi.fi, and OpenSSL, GnuTLS and OpenSSH reach the same card through p11-kit. refineid-gui is a desktop app for PIN activation, PIN change and PUK unblock, for viewing the card's portrait and signature, and for signing PDFs. The private key never leaves the chip.

betaProven, still growing. The CLI, Firefox card login through PKCS#11, and the reproducible NixOS install are proven against real FINEID hardware. Breadth of card-model coverage is still growing. The module's PIN change is written and shipped, but compiled out by default (--features pin-change) until it is verified on a 2026 ECC card — the GUI's PIN change and PUK unblock are unaffected.

what signing does

Signatures that outlive the certificate

A signed document comes out at the strongest level by default — LTA for PDF and ASiC-E, LT for the other formats. It carries a qualified timestamp and the revocation evidence that was true at the moment you signed, so it still proves something years from now, after the signing certificate has expired and the services that vouched for it have moved on. Collecting that evidence is the one thing RefineID reaches the network for: a timestamp authority sees a hash and the time you asked, and your certificate's issuer answers a revocation query. None of it comes to us. Using the card — logging in, reading it, changing a PIN — contacts nothing at all.

If the timestamp authority cannot be reached, signing fails. It does not quietly hand you a weaker signature. A silent downgrade is how someone ends up believing a document is protected when it is not, and it is the same shape as a TLS downgrade attack: whoever can block one connection gets to pick your security level. Ask for less and you get less, on purpose — --no-timestamp produces a baseline signature with no network contact whatsoever, which verifies only while the certificate and its revocation data are still reachable.

where it runs

Platforms

SystemPath to the cardStatus
Fedora 44PKCS#11 / Firefox / p11-kithardware-proven
NetBSD 10PKCS#11 / Firefoxhardware-proven
FreeBSD 14PKCS#11 / Firefoxuntested
macOSCryptoTokenKit / Safarihardware-proven
Windowsminidriver / Edge / SChannelin development
iOSCoreNFC / CTK / Safarihardware-proven
AndroidNFC / USB / in-app browserbeta
Card authentication works on macOS and iPhone today; both apps are awaiting Apple App Store review, so until they land you install them from source at RefineID-Apple. A Windows minidriver in C# NativeAOT and a Java signing application are both in development, and are not pushed yet.

android

Get the Android app

Android 13 or newer, a USB CCID reader or NFC. The app's own browser opens any HTTPS service, answers certificate requests with the card, and keeps every signature behind the holder's PIN — card login and qualified PAdES signing on a stock phone. Reaching the other browsers system-wide needs the privileged platform build, so today the in-app browser is the card boundary.

refineid-26.8.22.160.apk universal · arm64-v8a + x86_64 · 4.0 MB

sha256  168c0343b3eafba1613e16514fedc992d5cd9ce0b25eae9cf9e8bba33228dd6d

The APK is signed with the maintainer's hardware identity card (PIN 2), not a stored key file — check with apksigner verify --print-certs. To install, open the download on the phone and allow installs from your browser when Android asks. Release builds carry no logging and no analytics; Internet access exists only in the browser boundary.

source

Get the source

The Unix tree lives at github.com/refineid/refineid-unix, Apache-2.0. If you would rather not clone, the source archive keeps timestamped snapshots: each zip is the tree at the commit it names, listed with its SHA-256.

clone
$ git clone https://github.com/refineid/refineid-unix
$ cd refineid-unix

# or a checksummed snapshot, no git needed -- filenames at
# https://www.refineid.fi/src/
$ curl -O https://www.refineid.fi/src/RefineID-Unix-STAMP.zip
$ shasum -a 256 RefineID-Unix-STAMP.zip   # must match SHA256SUMS
$ unzip RefineID-Unix-STAMP.zip

on your machine

Build & install

You need a PC/SC stack, the NSS tools, fontconfig, and Rust 1.95+. Packaged Rust works (pkgsrc, current distros); grab rustup only if yours is older. On NixOS you can skip all of this: one option in configuration.nix installs everything, Firefox card-login integration included — see doc/install-nixos.md.

linux & *bsd
# install the PC/SC stack, NSS tools, fontconfig, and Rust
# Fedora
$ sudo dnf install pcsc-lite ccid nss-tools fontconfig-devel pkgconf-pkg-config rust cargo
# Debian / Ubuntu
$ sudo apt install pcscd libpcsclite-dev libnss3-tools libfontconfig-dev pkg-config rustc cargo
# NetBSD (as root)
# pkgin install pcsc-lite ccid pcsc-tools nss fontconfig rust

# start the PC/SC daemon
# Linux
$ sudo systemctl enable --now pcscd
# NetBSD (as root)
# echo pcscd=YES >> /etc/rc.conf && service pcscd start

# build the CLI, the PKCS#11 module, and the GUI
$ cargo build --release --workspace
    -> target/release/refineid
    -> target/release/librefineid_pkcs11.so
    -> target/release/refineid-gui
Register the module in Firefox: Settings / Privacy & Security / Security Devices / Load, name it RefineID, and point it at the built librefineid_pkcs11.so. Then insert the card, identify at a FINEID service (Suomi.fi / identify / certificate card) and enter PIN1. To reach the same card from OpenSSL, GnuTLS or OpenSSH instead, drop a p11-kit module file rather than registering in Firefox — the repository README has the file's shape.

maintainer

Who's behind it

I'm Petri Koistinen, the main maintainer of this project. Reach me by email at petri.koistinen@iki.fi (also iMessage and FaceTime). Issues and discussion live at github.com/refineid/refineid-unix.