Skip to content

Commit 1c56c71

Browse files
committed
Initial public release of SRO PKCS11 – SSH Agent CNG.
This repository contains a fully mature, production‑grade Windows unified agent: • Complete PKCS#11 module (14 mechanisms) • Full SSH-agent implementation (multi-client) • Native Pageant server (PuTTY-compatible) • Secure CNG/KSP orchestrator for smartcards • WSL2 TCP bridge (0.0.0.0:10022) • Windows service stub + userland helper isolation • Zero-CRT sovereign architecture (Win32 only) Includes: • Full documentation (architecture, security model, protocols, WSL2, service mode) • Complete README rewrite • Public key export (OpenSSH + RFC4716) • Tray icon with live stats • Agent conflict detection • Key/provider caching (4h) • EdDSA + Brainpool support This is the initial push, but the product is already complete, battle-tested, and designed for long-term zero-maintenance operation. Souverain. Robuste. Opérationnel.
1 parent 85a1883 commit 1c56c71

34 files changed

Lines changed: 15066 additions & 33 deletions

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Changelog
2+
Toutes les modifications notables de **SRO PKCS11 – SSH Agent CNG** seront documentées dans ce fichier.
3+
4+
Ce projet suit les principes de *Keep a Changelog* et utilise le versionnement sémantique.
5+
6+
---
7+
8+
## [1.0.0] – Initial Public Release
9+
10+
### Ajouté
11+
- Publication complète du binaire souverain **SRO PKCS11 – SSH Agent CNG**, incluant :
12+
- Module **PKCS#11** complet (14 mécanismes)
13+
- **SSH-agent** multi‑client compatible OpenSSH, Git, Visual Studio, WSL et WSL2
14+
- Serveur **Pageant** natif (PuTTY, plink, pscp, psftp)
15+
- Orchestrateur **CNG/KSP** sécurisé pour smartcards (RSA, ECDSA, Brainpool, EdDSA)
16+
- Listener **WSL2 TCP** (`0.0.0.0:10022`)
17+
- Mode **service Windows** (SYSTEM) + helper userland isolé
18+
- **Tray icon** avec statistiques temps réel et menu contextuel
19+
20+
- Backend cryptographique :
21+
- Signature via `NCryptSignHash` (jamais de clé privée exportée)
22+
- Cache clés/providers (timeout 4h)
23+
- Filtrage SmartCardOnly / AllowedKSP
24+
- Support RSA, ECDSA (NIST + Brainpool), Ed25519, Ed448
25+
26+
- Export de clés publiques :
27+
- CLI : `ssh-agent.exe -exportkey`
28+
- Dialogue graphique Windows
29+
- Formats OpenSSH + RFC4716
30+
- Extraction UPN / CN / DN pour le commentaire
31+
32+
- Détection automatique des agents concurrents :
33+
- OpenSSH natif
34+
- Pageant
35+
- SRO Userland
36+
- SRO Service
37+
- Agents inconnus
38+
39+
- Documentation complète :
40+
- Architecture détaillée
41+
- Modes d’exécution
42+
- Sécurité & isolation
43+
- Backend CNG
44+
- WSL2
45+
- Protocoles SSH-agent & Pageant
46+
- Installation & configuration
47+
- Roadmap
48+
- Politique de licence & divulgation responsable
49+
50+
### Sécurité
51+
- Aucune clé privée manipulée par l’application
52+
- Aucun PIN stocké ou intercepté (UI native CNG/KSP)
53+
- Service SYSTEM en passthrough pur
54+
- Pipes sécurisés par DACL et GUID unique
55+
56+
### Divers
57+
- Aucun CRT, aucune dépendance externe
58+
- Binaire auto‑contenu (Win32 API uniquement)
59+
- Support complet Windows Vista → Server 2025
60+

LICENSE.md

Lines changed: 305 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,305 @@
1+
# SRO PKCS11 – SSH Agent CNG
2+
## Licence de Confiance – San@sro Inc.
3+
4+
Ce logiciel est la propriété exclusive de **San@sro inc.**
5+
Il est distribué selon un modèle souverain fondé sur la confiance, l’intégrité et l’auditabilité du code.
6+
7+
---
8+
9+
## 1. Usage autorisé
10+
11+
### 1.1 Usage Personnel & Éducation
12+
L’utilisation est **gratuite** pour :
13+
- un usage strictement personnel
14+
- un usage éducatif, académique ou expérimental
15+
- l’audit, l’étude ou la compréhension du code source
16+
17+
Les utilisateurs peuvent **modifier le code source** pour leurs besoins personnels uniquement, à condition que :
18+
- les binaires modifiés **ne soient jamais redistribués**
19+
- les modifications restent **strictement privées**
20+
- le nom, la marque et la signature Authenticode ne soient pas utilisés pour une version modifiée
21+
22+
### 1.2 Usage Professionnel / Commercial
23+
Toute utilisation dans un contexte :
24+
- d’entreprise
25+
- institutionnel
26+
- gouvernemental
27+
- commercial
28+
- ou dans le cadre d’un travail rémunéré
29+
30+
…requiert l’achat d’une **Licence de Paix Technique** auprès de San@sro inc.
31+
32+
L’utilisation professionnelle sans licence valide constitue une violation des droits d’auteur, même en l’absence volontaire de verrou technique.
33+
34+
---
35+
36+
## 2. Redistribution
37+
38+
### 2.1 Redistribution du binaire
39+
Autorisé uniquement si :
40+
- le binaire est **strictement intact**
41+
- aucune modification n’a été apportée
42+
- la **signature Authenticode originale** est préservée
43+
- la provenance (San@sro inc.) est clairement indiquée
44+
45+
Toute redistribution d’un binaire modifié est **strictement interdite**.
46+
47+
### 2.2 Redistribution du code source
48+
Autorisé sous conditions :
49+
- le code source peut être partagé, forké ou étudié
50+
- toute redistribution doit inclure ce fichier LICENSE.md
51+
- les forks doivent indiquer clairement les modifications apportées
52+
- aucun binaire modifié ne peut être distribué
53+
54+
---
55+
56+
## 3. Interdictions
57+
58+
Il est interdit de :
59+
- redistribuer un binaire modifié
60+
- utiliser le logiciel en entreprise sans licence commerciale
61+
- retirer ou altérer la signature Authenticode
62+
- présenter une version modifiée comme officielle
63+
- intégrer le binaire dans un produit tiers sans licence commerciale
64+
65+
---
66+
67+
## 4. Garantie & Responsabilité
68+
69+
Ce logiciel est fourni **“tel quel”**, sans garantie d’aucune sorte.
70+
San@sro inc. ne peut être tenu responsable de tout dommage direct ou indirect résultant de son utilisation.
71+
72+
---
73+
74+
## 5. Intégrité & Souveraineté
75+
76+
Ce projet repose sur :
77+
- l’absence de DRM
78+
- l’absence de télémétrie
79+
- l’absence de dépendances externes
80+
- un binaire auto‑contenu, auditable et minimaliste
81+
82+
La confiance est le fondement de cette licence.
83+
La souveraineté technique est son objectif.
84+
85+
---
86+
87+
## 6. Licence Professionnelle
88+
89+
Pour obtenir une **Licence de Paix Technique**, contactez :
90+
**san@sro.ca**
91+
92+
---
93+
94+
## 7. Définitions
95+
96+
**Usage Personnel**
97+
Utilisation par un individu pour ses besoins privés, non rémunérés, hors entreprise, hors institution, hors prestation de service.
98+
99+
**Usage Professionnel / Commercial**
100+
Toute utilisation dans un cadre rémunéré, organisationnel, institutionnel, gouvernemental, ou dans un environnement informatique d’entreprise, même indirect.
101+
102+
**Binaire Intact**
103+
Le fichier exécutable original, non modifié, non recompilé, non patché, incluant sa signature Authenticode d’origine.
104+
105+
**Modification Privée**
106+
Toute modification du code source effectuée pour un usage personnel, non redistribuée, non publiée, non intégrée dans un produit tiers.
107+
108+
**Redistribution**
109+
Toute mise à disposition du logiciel ou du code source à un tiers, par tout moyen (téléchargement, copie, dépôt public, distribution interne).
110+
111+
---
112+
113+
## 8. Durée & Résiliation
114+
115+
**Durée**
116+
La présente licence est accordée pour une durée indéterminée.
117+
118+
**Résiliation automatique**
119+
La licence est automatiquement résiliée en cas de :
120+
- redistribution d’un binaire modifié
121+
- utilisation professionnelle sans licence commerciale
122+
- suppression ou altération de la signature Authenticode
123+
- présentation d’une version modifiée comme officielle
124+
125+
**Effet de la résiliation**
126+
À compter de la résiliation :
127+
- toute utilisation du logiciel devient interdite
128+
- aucune redistribution n’est autorisée
129+
- les versions futures ne sont pas couvertes par une rétro‑licence
130+
131+
---
132+
133+
## 9. Obtention de la Licence de Paix Technique
134+
135+
La Licence de Paix Technique couvre :
136+
- l’usage professionnel ou commercial
137+
- l’intégration dans un produit ou service
138+
- l’usage en environnement d’entreprise
139+
- l’usage institutionnel ou gouvernemental
140+
141+
La tarification dépend :
142+
- du contexte d’usage
143+
- du volume
144+
- de l’environnement technique
145+
146+
Pour obtenir une licence :
147+
**san@sro.ca**
148+
149+
---
150+
151+
# ————————————————————————————————————————
152+
# English Version – Trust License
153+
# ————————————————————————————————————————
154+
155+
# SRO PKCS11 – SSH Agent CNG
156+
## Trust License – San@sro inc.
157+
158+
This software is the exclusive property of **San@sro inc.**
159+
It is distributed under a sovereign trust‑based model focused on integrity, transparency, and source‑level auditability.
160+
161+
---
162+
163+
## 1. Authorized Use
164+
165+
### 1.1 Personal & Educational Use
166+
Use is **free** for:
167+
- strictly personal use
168+
- educational, academic, or experimental use
169+
- auditing, studying, or understanding the source code
170+
171+
Users may **modify the source code** for personal use only, provided that:
172+
- modified binaries are **never redistributed**
173+
- modifications remain **strictly private**
174+
- the original name, branding, and Authenticode signature are not used on modified builds
175+
176+
### 1.2 Professional / Commercial Use
177+
Any use within:
178+
- a company
179+
- an institution
180+
- a government environment
181+
- a commercial product or service
182+
- or any paid work
183+
184+
…requires purchasing a **Technical Peace License** from San@sro inc.
185+
186+
Professional use without a valid license constitutes copyright infringement.
187+
188+
---
189+
190+
## 2. Redistribution
191+
192+
### 2.1 Binary Redistribution
193+
Permitted only if:
194+
- the binary is **completely unmodified**
195+
- no changes have been applied
196+
- the original **Authenticode signature** is preserved
197+
- the origin (San@sro inc.) is clearly indicated
198+
199+
Redistribution of modified binaries is **strictly prohibited**.
200+
201+
### 2.2 Source Code Redistribution
202+
Permitted under the following conditions:
203+
- the source code may be shared, forked, or studied
204+
- this LICENSE.md must be included in all redistributions
205+
- forks must clearly indicate modifications
206+
- no modified binary may be redistributed
207+
208+
---
209+
210+
## 3. Prohibitions
211+
212+
It is forbidden to:
213+
- redistribute any modified binary
214+
- use the software in a professional environment without a commercial license
215+
- remove or alter the Authenticode signature
216+
- present a modified version as official
217+
- embed the binary in a third‑party product without a commercial license
218+
219+
---
220+
221+
## 4. Warranty & Liability
222+
223+
This software is provided **“as is”**, without any warranty of any kind.
224+
San@sro inc. shall not be held liable for any direct or indirect damages.
225+
226+
---
227+
228+
## 5. Integrity & Sovereignty
229+
230+
This project is built on:
231+
- no DRM
232+
- no telemetry
233+
- no external dependencies
234+
- a self‑contained, auditable, minimalistic binary
235+
236+
Trust is the foundation of this license.
237+
Technical sovereignty is its purpose.
238+
239+
---
240+
241+
## 6. Professional Licensing
242+
243+
To obtain a **Technical Peace License**, contact:
244+
**san@sro.ca**
245+
246+
---
247+
248+
## 7. Definitions
249+
250+
**Personal Use**
251+
Use by an individual for private, non‑commercial, non‑paid purposes.
252+
253+
**Professional / Commercial Use**
254+
Any use within a paid, organizational, institutional, governmental, or enterprise environment.
255+
256+
**Unmodified Binary**
257+
The original executable file, unaltered, unrecompiled, unpatched, preserving its Authenticode signature.
258+
259+
**Private Modification**
260+
Any modification of the source code performed for personal use only, not redistributed or published.
261+
262+
**Redistribution**
263+
Making the software or source code available to any third party by any means.
264+
265+
---
266+
267+
## 8. Term & Termination
268+
269+
**Term**
270+
This license is granted for an indefinite duration.
271+
272+
**Automatic Termination**
273+
The license terminates automatically if:
274+
- a modified binary is redistributed
275+
- the software is used professionally without a commercial license
276+
- the Authenticode signature is removed or altered
277+
- a modified version is presented as official
278+
279+
**Effect of Termination**
280+
Upon termination:
281+
- all use becomes prohibited
282+
- redistribution is no longer permitted
283+
- future versions are not covered retroactively
284+
285+
---
286+
287+
## 9. Obtaining a Technical Peace License
288+
289+
The Technical Peace License covers:
290+
- professional or commercial use
291+
- integration into a product or service
292+
- enterprise environments
293+
- institutional or governmental use
294+
295+
Pricing depends on:
296+
- usage context
297+
- scale
298+
- technical environment
299+
300+
To obtain a license:
301+
**san@sro.ca**
302+
303+
---
304+
305+
# End of License

PKCS11SSHAgent.sln

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.14.36121.58 d17.14
4+
VisualStudioVersion = 17.14.36121.58
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SSH-Agent", "SSH-Agent\SSH-Agent.vcxproj", "{E59F9DF4-49CF-46C7-BA6E-D7DFBB74A5B3}"
77
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Éléments de solution", "Éléments de solution", "{9C8CB701-102D-CF49-A3E0-89AC09D42C2C}"
9+
ProjectSection(SolutionItems) = preProject
10+
CHANGELOG.md = CHANGELOG.md
11+
LICENSE.md = LICENSE.md
12+
README.md = README.md
13+
RELEASE.md = RELEASE.md
14+
SECURITY.md = SECURITY.md
15+
EndProjectSection
16+
EndProject
817
Global
918
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1019
Debug|x64 = Debug|x64

0 commit comments

Comments
 (0)