
eID in .NET
A session at Microsoft Belux in April 2005 on what developers can do with the Belgian electronic identity card in .NET, and what it takes to get each scenario working. It grew out of a feasibility study on eID that I did during my internship: what the technology is, what it can be used for, and how to build it.
What’s on the card. The federal government issues the eID to every citizen, in credit card format, with data printed on the card and stored on its chip. The chip holds two things. First, two certificates, one to authenticate and one to sign, issued by the Citizen CA under the Belgium Root CA, with their private keys behind the card’s PIN. Once the certificates are registered in Windows, .NET code reaches them through CAPICOM or Web Services Enhancements (WSE), and every use of a private key brings up the PIN dialog. Second, identity data that anyone can read without a PIN: name, gender, date and place of birth, nationality, the full address and a photo.
Visitor badges. The simplest scenario reads the card without a PIN. A .NET wrapper’s SmartCardContext notices when a card goes into the reader, the application pulls out the identity data and the photo, and a badge printing application uses them, so nobody types a visitor’s name or makes a typo in it.
An authenticated chat. Logging on to a chat server with nothing but the card and its PIN. The client asks to log on, the server answers with a random challenge, and the client signs that challenge with the authentication certificate and sends it back with the certificate itself. The server then checks the certificate against its list of allowed users, checks that it hasn’t expired or been revoked, and verifies the signature with the certificate’s public key before it accepts or denies the client. After that, every chat message is signed too, so the server knows each one really comes from that user, and it takes the user’s name from the certificate.
Signing in to a website. The federal government’s FedICT ran a reverse authentication proxy that sits between the visitor and the web server. It asks for the visitor’s eID certificate, which brings up the PIN dialog, verifies it over OCSP, and passes the identity on to the site, where ASP.NET reads it from a single request header, SSL_CLIENT_S_DN.
Signing documents. Microsoft Office could already sign documents with the eID: once the signature certificate is registered, signing a Word document or an Outlook e-mail asks for the PIN and produces a legally binding electronic signature.
The demos. Three of them, all built on Belgian test cards (“Alice SPECIMEN”) rather than a real ID: a Word contract signed with the signature certificate; the authenticated chat as a Windows Forms client and server in C#, signing and verifying with RSA over WSE 1.0; and an ASP.NET website that shows the identity the proxy passes on. They are technical tryouts, not production code.
See also the posts eID, eID chat and Presentation: eID in .NET.
Technologies: C#, .NET Framework, Windows Forms, Web Services Enhancements, CAPICOM, ASP.NET, Microsoft Office, Belgian eID, X.509 certificates, RSA signatures, OCSP, FedICT authentication proxy.
Given at
- April 2005: Microsoft Belux
Files
- Slides (PDF) (439 KB), or the original PowerPoint (1.3 MB)
- Demo: signed Word document (29 KB)
- Demo: authenticated chat (260 KB)
- Demo: secured website (18 KB)
You May Also Like

Monitoring Before the Fire
Uptime Kuma on its own instance, a probe catalog derived from config instead of memory, and alerts that found me before my family did.

Self-Hosting Young Software: Tududi
A task manager whose pinned tag vanished, whose documented SSO didn't exist yet, and what deploying early-stage software really costs.

The Repo Now Lives on the Server It Builds
Forgejo on the platform: migrating this project into itself, CI on a RAM budget, and a major upgrade gated on a bit-for-bit restore.



