Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
PKCS11SSHAgent — SRO PKCS11 – SSH Agent CNG est un agent Windows souverain, ultra‑léger et zéro‑dépendance qui unifie PKCS#11, SSH-agent, Pageant et CNG/Smartcard dans un seul binaire robuste. Pensé pour les environnements exigeants, il offre une cryptographie matérielle native, une isolation service/userland, un support complet smartcards. | Kitploit
Tools/GitHubGitHub/sanmilie/pkcs11sshagent
Encryption/Decryption ToolsCryptographyHardware SecurityUtilities & FrameworksIdentity & Access Management (IAM)Authentication
GitHubsanmilie/pkcs11sshagent

PKCS11SSHAgent

View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →

About

SRO PKCS11 – SSH Agent CNG est un agent Windows souverain, ultra‑léger et zéro‑dépendance qui unifie PKCS#11, SSH-agent, Pageant et CNG/Smartcard dans un seul binaire robuste. Pensé pour les environnements exigeants, il offre une cryptographie matérielle native, une isolation service/userland, un support complet smartcards.

Website
246 months agoReviewed by Kitploit
Share

SRO PKCS11 – SSH Agent CNG

Compatibility Memory Service Memory Agent Stability GitHub release

Sovereign unification PKCS#11 + SSH-agent + Pageant + CNG/Smartcard

A single Windows executable that unifies four traditionally separate functions:

  • Full PKCS#11 module (Firefox, OpenSC, ssh -I)
  • SSH agent compatible with OpenSSH/Git/VS/WSL
  • Pageant server compatible with PuTTY/plink/pscp
  • Secure CNG/KSP orchestrator for smartcards

Table of Contents

  1. Philosophy
  2. Architecture
  3. Execution Modes
  4. Installation
  5. Configuration
  6. Supported Protocols
  7. PIN Management
  8. CNG Backend
  9. Security
  10. Compatibility
  11. Public Key Export
  12. Tray Icon
  13. WSL2 Support
  14. Conflict Detection
  15. Dependencies
  16. Known Limitations
  17. Roadmap

Philosophy

Sovereign. No CRT dependency. All memory operations use RtlCopyMemory, RtlZeroMemory, RtlEqualMemory (FreeCRT.h). Unicode everywhere (native Win32). No malloc, memcpy, strlen, printf.

Secure. Private keys are never exported. No PIN transits. CNG/KSP handles native Windows PIN UI. Strict service ↔ userland isolation via secure pipes.

Minimalist. Single binary. No external DLLs. No registry bloat. Simple installation (regsvr32 or -install).

Versatile. Simultaneous support for PKCS#11, SSH-agent, Pageant, and WSL2 in the same process.


Architecture```

┌──────────────────────────────────────────────────────────────┐ │ Clients (Git, VS, WSL, OpenSSH, PuTTY, Firefox) │ └────────────────────────┬─────────────────────────────────────┘ │ ┌───────────────┼───────────────┬─────────────────┐ │ │ │ │ SSH-agent Pageant (WM_COPYDATA) PKCS#11 WSL2 (TCP) │ │ │ │ v v v v ┌──────────────────────────────────────────────────────────────┐ │ Service Stub (session 0, SYSTEM) │ │ - Accepte connexions sur \.\pipe\openssh-ssh-agent │ │ - Crée pipe interne par client (GUID unique) │ │ - Lance helper userland avec token interactif │ │ - Forwarde messages sans manipuler de secrets │ └────────────────────────┬─────────────────────────────────────┘ │ lancé par le service v ┌──────────────────────────────────────────────────────────────┐ │ Helper Userland (session interactive) │ │ - Connecte au pipe interne │ │ - Décode protocole SSH-agent/Pageant │ │ - Invoque CNG/KSP pour signature │ │ - UI PIN native Windows (pas de relay) │ │ - Renvoie signature au service │ │ - Fenêtre Pageant cachée pour WM_COPYDATA │ │ - Listener TCP 127.0.0.1:10022 pour WSL2 │ │ - Tray icon avec menu contextuel │ └────────────────────────┬─────────────────────────────────────┘ │ v ┌──────────────────────────────────────────────────────────────┐ │ CNG/KSP Backend │ │ - NCryptSignHash avec PKCS#1/PSS padding │ │ - Enumération certificats Windows Store │ │ - Filtrage SmartCardOnly / AllowedKSP │ │ - Support RSA + ECDSA (P-256, P-384, P-521) │ │ - Support EdDSA (Ed25519, Ed448) │ │ - Support Brainpool (P256r1, P384r1, P512r1) │ │ - Cache clés + providers (4h timeout) │ └──────────────────────────────────────────────────────────────┘

root@kitploit:~
---

## Execution Modes

### 1. PKCS#11 Mode (automatic)

Loaded by:
- `ssh -I ssh-agent.exe user@host`
- Firefox (Security Devices → Load PKCS#11 Module)
- `pkcs11-tool --module ssh-agent.exe --list-objects`

Exposes standard PKCS#11 exports:
- `C_Initialize`, `C_Finalize`, `C_GetInfo`
- `C_GetSlotList`, `C_GetSlotInfo`, `C_GetTokenInfo`
- `C_GetMechanismList`, `C_GetMechanismInfo`
- `C_OpenSession`, `C_CloseSession`, `C_Login`, `C_Logout`
- `C_FindObjectsInit`, `C_FindObjects`, `C_FindObjectsFinal`
- `C_GetAttributeValue`
- `C_SignInit`, `C_Sign`
- `C_VerifyInit`, `C_Verify`
- `C_DecryptInit`, `C_Decrypt`
- `C_GenerateRandom`, `C_SeedRandom`

**Supported mechanisms (14 total):**
- `CKM_RSA_PKCS` (raw with padding)
- `CKM_RSA_X_509` (raw without padding)
- `CKM_SHA1_RSA_PKCS` (legacy ssh-rsa)
- `CKM_SHA256_RSA_PKCS` (rsa-sha2-256)
- `CKM_SHA384_RSA_PKCS` (rsa-sha2-384)
- `CKM_SHA512_RSA_PKCS` (rsa-sha2-512)
- `CKM_SHA256_RSA_PKCS_PSS` (RSA-PSS SHA-256)
- `CKM_SHA384_RSA_PKCS_PSS` (RSA-PSS SHA-384)
- `CKM_SHA512_RSA_PKCS_PSS` (RSA-PSS SHA-512)
- `CKM_ECDSA` (raw)
- `CKM_ECDSA_SHA1` (legacy)
- `CKM_ECDSA_SHA256` (ecdsa-sha2-nistp256/384/521)
- `CKM_ECDSA_SHA384`
- `CKM_ECDSA_SHA512`

### 2. Userland Agent Mode (standalone)```bash
ssh-agent.exe
  • Creates the pipe \\.\pipe\openssh-ssh-agent in user session
  • Implements the SSH-agent protocol
  • Multi-client support (max 16 simultaneous connections)
  • Automatically launches the Pageant server
  • Automatically launches the WSL2 listener (127.0.0.1:10022)
  • Uses CNG/KSP directly (no service)
  • PIN UI in the current session
  • Optional PIN cache (configurable)
  • Tray icon with real-time statistics

Compatible with:

  • Git for Windows (set SSH_AUTH_SOCK=\\.\pipe\openssh-ssh-agent)
  • Visual Studio
  • WSL (via npiperelay or socat)
  • WSL2 (via TCP 127.0.0.1:10022)
  • OpenSSH for Windows
  • PuTTY, plink, pscp, psftp (via Pageant)

3. Service stub mode```bash

ssh-agent.exe -install net start SROSSHAgentCNG

root@kitploit:~
- Runs in session 0 (SYSTEM)
- Accepts connections on global pipe
- Creates an internal pipe per client (secured by SID)
- Launches a userland helper with `CreateProcessAsUserW`
- Forwards messages without touching secrets
- Helper pool with 4h timeout (automatic reuse)
- LRU eviction if pool full

**Advantages:**
- UI PIN in user session (not in session 0)
- Compatible with hardened environments
- Strict isolation service ↔ crypto
- Multi-user multiplexing

### 4. Userland crypto helper mode```bash
ssh-agent.exe -useragent -pipe \\.\pipe\ssh-ksp-helper-{GUID}

Launched automatically by the service:

  • Connects to internal pipe
  • Processes SSH-agent/Pageant requests
  • Invokes NCryptSignHash (native PIN UI)
  • Returns the signature to the service
  • Launches Pageant (hidden window)
  • Launches WSL2 listener (127.0.0.1:10022)
  • Shows tray icon (SERVICE mode)
  • Terminates after timeout or disconnection

Installation

Register as PKCS#11 module```bash

regsvr32 ssh-agent.exe

root@kitploit:~
Create the keys:
- `HKLM\SOFTWARE\San@sro Inc\PKCS11-SSH-Agent`
- `HKCU\SOFTWARE\San@sro Inc\PKCS11-SSH-Agent`
- `HKCU\SOFTWARE\Mozilla\Firefox\PKCS11Modules\SROSSHAgent`

### Install the Windows service```bash
ssh-agent.exe -install
net start SROSSHAgentCNG

Configure WSL2

Add to ~/.bashrc or ~/.zshrc :```bash

--- Pont SSH Agent Windows (TCP -> Unix Socket) ---

export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"

Vérifier si le socket est déjà géré par un socat actif

if ! pgrep -u $USER socat > /dev/null || [ ! -S "$SSH_AUTH_SOCK" ]; then # Nettoyage préventif rm -f "$SSH_AUTH_SOCK"

root@kitploit:~
# Lancement du bridge en arrière-plan
# Note: Utiliser 127.0.0.1 si mode 'mirrored'
# sinon l'IP du host (ex: 192.168.99.x)
socat UNIX-LISTEN:"$SSH_AUTH_SOCK",fork,unlink-early \
      TCP:127.0.0.1:10022 > /dev/null 2>&1 &

fi

root@kitploit:~
### Uninstall```bash
regsvr32 /u ssh-agent.exe
ssh-agent.exe -remove

Configuration

Key: HKLM\SOFTWARE\San@sro Inc\pkcs11-cng or HKCU\SOFTWARE\San@sro Inc\pkcs11-cng



Example:``` StoreName = "MY" StoreLocation = "CurrentUser" SmartCardOnly = 1 AllowedKSP = "Microsoft Smart Card Key Storage Provider;YubiKey Smart Card Key Storage Provider" RelaxCheckMode = 0 LogLevel = 2

root@kitploit:~
---

## Supported protocols

### SSH-Agent

#### SSH2_AGENTC_REQUEST_IDENTITIES (11)

Request:```
[type=11]

Response :``` [type=12][count][key_blob_1][comment_1][key_blob_2][comment_2]...

root@kitploit:~
**key_blob RSA :**```
[len]["ssh-rsa"][len][exponent][len][modulus]

key_blob ECDSA :``` [len]["ecdsa-sha2-nistp256"][len]["nistp256"][len][point]

root@kitploit:~
**key_blob EdDSA :**```
[len]["ssh-ed25519"][len][point]

SSH2_AGENTC_SIGN_REQUEST (13)

Request:``` [type=13][len][key_blob][len][data][flags]

root@kitploit:~
**Flags :**
- `0x00` : ssh-rsa (SHA-1, legacy)
- `0x02` : rsa-sha2-256
- `0x04` : rsa-sha2-512

Response :```
[type=14][len][signature_blob]

signature_blob :``` [len]["rsa-sha2-256"][len][signature_data]

root@kitploit:~
### Pageant

Compatible PuTTY via `WM_COPYDATA` :

1. Client creates shared memory via `CreateFileMapping`
2. Writes the SSH-agent request in standard format
3. Sends `WM_COPYDATA` to the "Pageant" window
4. Reads the response from the shared memory

Shared memory format :```
[uint32 length][SSH-agent payload]

WSL2 Network

TCP listener on 127.0.0.1:10022 :

  • Accepts multi-client (max 16 connections)
  • Standard SSH-agent protocol over TCP
  • Bind localhost only (security)
  • Thread per connection
  • Forwarding to handle_ssh_message()

PIN Management

Windows fully manages the PIN via CNG/KSP and the smartcard minidriver.

The module never stores the PIN and never sees it in transit:

  • In standalone mode: NCryptSignHash triggers the native PIN UI
  • In service mode: The userland helper (interactive session) invokes NCryptSignHash, the PIN UI appears in the user session
  • The stub service only performs transparent forwarding (passthrough) between pipes

PIN Cache: Managed automatically by Windows/minidriver (no need for application cache).

NCrypt Flags:

  • PIN cache active + hit: NCRYPT_SILENT_FLAG (no UI)
  • PIN cache active + miss: No flag (UI displayed)
  • PIN cache disabled: No flag (UI always displayed)
  • If SILENT_FLAG fails: Automatic retry with UI

CNG Backend

Multi-level cache

Key cache (timeout 4h) :

  • Indexed by SHA-1 thumbprint
  • Stores CNG_KEY_INFO (handle, provider, container)
  • Automatic eviction if expired
  • Manual cleanup via tray icon

Provider cache (timeout 4h) :

  • Indexed by KSP name
  • Stores NCRYPT_PROV_HANDLE
  • Avoids repeated calls to NCryptOpenStorageProvider

Certificate enumeration```c

cng_store_enum_certificates(cfg, callback, user_data);

root@kitploit:~
Filter:
- Private keys available
- Authorized KSPs (if `SmartCardOnly`)
- Non-exportable keys (if `SmartCardOnly`)

### Signature```c
cng_sign_hash(key_info, mechanism, hash, hash_len, signature, &sig_len);

Mechanism → Padding :

  • CKM_RSA_PKCS → BCRYPT_PAD_PKCS1
  • CKM_SHA256_RSA_PKCS → BCRYPT_PAD_PKCS1 + BCRYPT_SHA256_ALGORITHM
  • CKM_SHA256_RSA_PKCS_PSS → BCRYPT_PAD_PSS + salt size = hash size
  • CKM_ECDSA_SHA256 → No padding (raw signature)

Public key encoding

RSA :```c cng_cert_get_public_key(cert, modulus, &mod_len, exponent, &exp_len);

root@kitploit:~
**ECDSA :**```c
cng_cert_get_ec_params(cert, params, &params_len);  // OID courbe
cng_cert_get_ec_point(cert, point, &point_len);     // Point public

Supported curves:

  • NIST: nistp256 (OID: 1.2.840.10045.3.1.7), nistp384 (1.3.132.0.34), nistp521 (1.3.132.0.35)
  • Brainpool: brainpoolP256r1, brainpoolP384r1, brainpoolP512r1
  • EdDSA: ed25519 (OID: 1.3.101.112), ed448 (1.3.101.113)

UPN Extraction

Support Active Directory authentication:```c cng_extract_upn_from_certificate(cert, upn, upn_size);

root@kitploit:~
Extracts the `szOID_NT_PRINCIPAL_NAME` extension to use it as an SSH comment.

---

## Security

### Private Keys

**Never exported.** All cryptographic operations are delegated to CNG/KSP. `NCryptSignHash` is called with the key handle, never with the key itself.

### PIN

**Managed exclusively by Windows (CNG/KSP/minidriver).**

The module **never stores the PIN** and **never sees it in transit**:
- The PIN is never transmitted to the PKCS#11 module
- The PIN UI is displayed by the smartcard minidriver
- PIN caching is managed automatically by Windows/minidriver
- In service mode: the userland helper (interactive session) receives the PIN UI

**Service mode (pure passthrough):**
The service stub only does transparent forwarding:
- Client → Service → Helper (forward message SSH-agent)
- Helper → Service → Client (forward SSH-agent response)
- The service never parses the content
- The service never sees: PIN, hash, signature, key

### Service ↔ userland isolation

**Secure pipes.** Each internal pipe is:
- Generated with a unique GUID
- Created with `FILE_FLAG_FIRST_PIPE_INSTANCE`
- DACL allowing only the current user

The userland helper invokes CNG/KSP in the interactive session → native PIN UI.

### Audit

**Unicode logs.** All events are logged via `utils_log()`:
- Client connections
- Key enumeration
- Signature requests
- CNG/KSP errors
- Agent conflicts

**Location:** OutputDebugString + optional file (`utils_set_log_file()`).

---

## Compatibility

| Environment                   | Mode                   | Status |
|-------------------------------|------------------------|--------|
| OpenSSH for Windows           | Standalone / Service   | ✓      |
| Git for Windows               | Standalone / Service   | ✓      |
| Visual Studio                 | Standalone / Service   | ✓      |
| WSL (npiperelay)              | Standalone / Service   | ✓      |
| WSL2 (TCP)                    | Standalone / Service   | ✓      |
| PuTTY / plink / pscp          | Pageant                | ✓      |
| Firefox                       | PKCS#11                | ✓      |
| OpenSC / pkcs11-tool          | PKCS#11                | ✓      |
| ssh -I (OpenSSH)              | PKCS#11                | ✓      |
| Hardened environments         | Service stub           | ✓      |
| SmartCard GIDS                | CNG/KSP                | ✓      |
| SmartCard PIV                 | CNG/KSP                | ✓      |
| YubiKey                       | CNG/KSP                | ✓      |
| Nitrokey                      | CNG/KSP                | ✓      |

---

## Exporting public keys

### CLI command```bash
ssh-agent.exe -exportkey [output.pub]

Interactive Dialogue

  1. Opens CryptUIDlgSelectCertificateFromStore
  2. Shows all certificates with private keys
  3. Allows visual selection
  4. Extracts public key (RSA/ECDSA/EdDSA)
  5. Encodes to SSH wire format
  6. Generates two formats:
    • OpenSSH (authorized_keys)
    • RFC4716 (SSH2 Public Key)

Output formats

OpenSSH :``` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5... [email protected]

root@kitploit:~
**RFC4716 :**```
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "[email protected]"
AAAAB3NzaC1yc2EAAAADAQABAAABAQC5ABCDEF...
---- END SSH2 PUBLIC KEY ----

Supported Curves

  • RSA (all sizes)
  • ECDSA NIST (P-256, P-384, P-521)
  • ECDSA Brainpool (P256r1, P384r1, P512r1)
  • EdDSA (Ed25519, Ed448)

Identity Extraction

Priority order for the comment:

  1. UPN (szOID_NT_PRINCIPAL_NAME)
  2. CN (Common Name)
  3. Full Subject DN

Tray Icon

Display Modes

TRAY_MODE_USERLAND (green) :

  • Active standalone agent
  • Tooltip : "SRO SSH-Agent (Userland)"

TRAY_MODE_SERVICE (blue) :

  • Helper launched by the service
  • Tooltip : "SRO SSH-Agent (Service Helper)"

Real-time Statistics

Dynamic tooltip :``` SRO SSH-Agent (Userland) 12 keys, 3 clients

root@kitploit:~
Mise à jour :
- Every 5 seconds
- On each client connection/disconnection
- On cache flush

### Context menu

**Show Keys...**: Dialog listing all available keys```
═══════════════════════════════════════════════
  SRO SSH-Agent - Available Keys
═══════════════════════════════════════════════

[01] RSA-2048 - [email protected]
[02] ECDSA-nistp256 - [email protected]
[03] EdDSA-Ed25519 - [email protected]

═══════════════════════════════════════════════
Total: 3 keys

💡 Tip: Use 'Export Public Key' to copy SSH format

Export Public Key... : Opens the selection dialog and copies to clipboard

Flush & Reload Keys : Clears key/provider caches and reloads

Settings... : Displays current configuration``` Current Configuration:

Store Name: MY Store Location: CurrentUser SmartCard Only: Yes Relax Key Usage Check Mode: No Log Level: 2

Edit registry to change: HKLM\SOFTWARE\San@sro Inc\pkcs11-cng

root@kitploit:~
**Exit** : Clean shutdown (signals `g_shutdown_event`)

### Dedicated UI Thread

- Hidden window with message pump
- `GetMessage/DispatchMessage` loop
- Event `g_tray_ready_event` for synchronization
- Automatic cleanup (`Shell_NotifyIcon(NIM_DELETE)`)

---

## WSL2 Support

### Architecture```
┌─────────────────────────────────────────────┐
│  WSL2 (Linux)                               │
│  - socat UNIX-LISTEN → TCP:127.0.0.1:10022 │
└─────────────────────────────────────────────┘
                    │
                    │ TCP
                    v
┌─────────────────────────────────────────────┐
│  Windows Host                               │
│  - ssh-agent.exe (listener 127.0.0.1:10022)│
│  - CNG/KSP → Smartcard                     │
└─────────────────────────────────────────────┘

TCP Listener

Security:

  • Acceptor thread with reactive shutdown
  • One thread per client (max 16)
  • Connection timeout: 1 second

Client Pool

  • Static array g_wsl2_clients[16]
  • CRITICAL_SECTION per slot
  • LRU eviction if pool full
  • Automatic cleanup on shutdown

WSL2 Configuration

Mirrored mode (Windows 11 22H2+):```bash socat UNIX-LISTEN:"$SSH_AUTH_SOCK",fork,unlink-early
TCP:127.0.0.1:10022 > /dev/null 2>&1 &

root@kitploit:~
**Classic NAT mode:**```bash
# Récupérer l'IP du host Windows
HOST_IP=$(ip route | grep default | awk '{print $3}')

socat UNIX-LISTEN:"$SSH_AUTH_SOCK",fork,unlink-early \
      TCP:$HOST_IP:10022 > /dev/null 2>&1 &

Public functions```c

BOOL wsl2_network_start(WORD port, HANDLE shutdown_event); void wsl2_network_stop(void); BOOL wsl2_network_is_running(void); DWORD wsl2_network_get_client_count(void);

root@kitploit:~
---

## Conflict detection

### Detected agents```c
typedef enum {
    AGENT_NONE = 0,
    AGENT_OPENSSH_NATIVE,    // OpenSSH for Windows (ssh-agent.exe)
    AGENT_PAGEANT,           // PuTTY Pageant (fenêtre "Pageant")
    AGENT_SRO_USERLAND,      // SRO SSH-Agent userland
    AGENT_SRO_SERVICE,       // SRO SSH-Agent service Windows
    AGENT_UNKNOWN            // Agent inconnu détecté
} AGENT_TYPE;

Detection Methods

Native OpenSSH:

  • Search for ssh-agent.exe process via CreateToolhelp32Snapshot
  • Verify it is not the current process

Pageant:

  • Search for window FindWindowW(L"Pageant", L"Pageant")
  • Verify it is not the current process window

SRO Userland:

  • Attempt CreateFileW(\\.\pipe\openssh-ssh-agent)
  • If successful: an agent is already listening

SRO Service:

  • SCM query OpenServiceW(L"SROSSHAgentCNG")
  • Check status SERVICE_RUNNING

Resolution dialog

Displayed at startup if conflict detected:``` ⚠ SSH Agent Conflict Detected

The following SSH agents are already running: • OpenSSH Native (ssh-agent.exe) • PuTTY Pageant

Running multiple agents may cause conflicts.

Do you want to continue anyway?

[Continue] [Stop conflicting agents] [Exit]

root@kitploit:~
**Actions :**
- **Continue** : Run anyway (risk of conflict)
- **Stop** : Attempt to stop agents (if possible)
- **Exit** : Exit without running

### Public function```c
BOOL detect_running_agents(AGENT_TYPE* detected_agents, DWORD* count);
BOOL show_agent_conflict_dialog(const AGENT_TYPE* agents, DWORD count);
const WCHAR* agent_type_to_string(AGENT_TYPE agent);

Dependencies

None. The binary is self-contained and only loads system DLLs:

  • kernel32.dll (always present)
  • advapi32.dll (registry, SCM)
  • crypt32.dll (certificates)
  • ncrypt.dll (CNG)
  • bcrypt.dll (hashing)
  • wtsapi32.dll (sessions)
  • shell32.dll (tray icon)
  • ws2_32.dll (Winsock)
  • cryptui.dll (certificate selection dialog)

No CRT. All memory operations via RtlCopyMemory, RtlZeroMemory, RtlEqualMemory.


Known limitations

  • No encryption. SSH-agent only implements signing (not SSH2_AGENTC_*_ENCRYPT).
  • No key constraints. No implementation of SSH2_AGENTC_ADD_ID_CONSTRAINED.
  • CNG PIN cache. Managed by Windows/minidriver, no fine-grained application control.
  • Limited helper pool. Max 16 helpers in service mode (configurable via MAX_HELPERS).
  • YubiKey PIV self-signed. YubiKeys in PIV mode generate self-signed certificates that do not comply with standard EKU/KeyUsage fields. Enable RelaxCheckMode = 1 to use them.

Roadmap

  • Full PKCS#11 (14 mechanisms)
  • SSH-agent multi-client
  • Pageant compatible PuTTY
  • WSL2 listener TCP
  • Windows service stub
  • Tray icon with statistics
  • Export public keys (OpenSSH + RFC4716)
  • Agent conflict detection
  • Cache keys/providers (4h timeout)
  • Support EdDSA (Ed25519, Ed448)
  • Support Brainpool
  • Graphical configuration UI (Simplified Registry Editor)
  • Metrics and monitoring (signature counters)
  • JSON configuration export

Contributing

Contributions are welcome! Please:

  • Respect the sovereign architecture (no CRT)
  • Use only Win32 API
  • Document public functions
  • Test with real smartcards
  • Follow the existing code style

Ownership & License

This software is the property of San@sro inc.
It is distributed under a Trust License model:

• Personal & Educational Use: Free and encouraged.
• Professional / Commercial Use: Requires purchase of a Technical Peace License.
Use in a company without a valid license constitutes copyright infringement, despite the deliberate absence of any technical lock.

Redistribution

Redistribution is permitted provided that: • the binary remains intact, • the original Authenticode signature is preserved.

Warranty

This software is provided "as is", without warranty of any kind.

The complete license (FR + EN), including definitions, redistribution conditions, duration, termination, and how to obtain a Technical Peace License, is available here:

👉 LICENSE.md

For any professional license request:
📧 [email protected]


Security & Responsible Disclosure

SRO PKCS11 – SSH Agent CNG does not handle any sensitive secrets:
the PIN, private keys, and cryptographic operations are fully managed by Windows (CNG/KSP/minidriver).

To report a bug, abnormal behavior, or potential vulnerability, a responsible disclosure policy is available here:

👉 SECURITY.md

Security contact:
📧 [email protected]


SRO PKCS11 – SSH Agent CNG
Sovereign. Robust. Operational.
A single binary to do it all.

Download Tool
ValueTypeDescription
StoreNameREG_SZ"MY", "Root", etc. (default: "MY")
StoreLocationREG_SZ"CurrentUser" or "LocalMachine"
ModeREG_SZ"All" or "SmartCard"
SmartCardOnlyREG_DWORD1 = filter only smartcards
AllowedKSPREG_SZList of allowed KSPs (separated by ";")
RelaxCheckModeREG_DWORD1 = disable EKU/KeyUsage/date validation (YubiKey PIV self-signed)
LogLevelREG_DWORD0=off, 1=error, 2=info, 3=debug