├── .github └── workflows │ └── build.yml ├── .gitignore ├── .vscode └── settings.json ├── ChatClient ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── ChatClient.csproj ├── FingerPrint.xaml ├── FingerPrint.xaml.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Model │ └── Persistent.cs ├── Properties │ ├── Settings.Designer.cs │ └── Settings.settings └── Visual │ └── Colors.cs ├── ChatServer ├── ChatServer.csproj ├── ClientMgr.cs └── Program.cs ├── Common ├── Cipher │ ├── AES256GCM.cs │ ├── ECDH.cs │ └── X509.cs ├── Common.projitems ├── Common.shproj ├── Log │ └── Logger.cs └── Network │ ├── Data │ └── Message.cs │ ├── Multicast.cs │ ├── NetClient.cs │ ├── NetServer.cs │ ├── NetUtils.cs │ └── Transport │ ├── ITransport.cs │ └── TCPTransport.cs ├── LICENSE ├── PROTOCOL.md ├── README.md ├── SimpleSecureChat.sln └── docs └── banner.jpg /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: SSCBuild 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*" 7 | pull_request: 8 | types: [review_requested] 9 | 10 | jobs: 11 | build: 12 | runs-on: windows-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: microsoft/setup-msbuild@v1.1 16 | 17 | - name: Nuget restore 18 | run: nuget restore 19 | 20 | - name: Build client 21 | run: msbuild /t:ChatClient:publish /p:Configuration=Release /p:TargetFramework=net6.0-windows /p:RuntimeIdentifier=win10-x64 /p:SelfContained=false /verbosity:minimal 22 | - name: Build server 23 | run: msbuild /t:ChatServer:publish /p:Configuration=Release /p:TargetFramework=net6.0-windows /p:RuntimeIdentifier=win10-x64 /p:SelfContained=false /verbosity:minimal 24 | 25 | - name: Archive client 26 | uses: thedoctor0/zip-release@0.6.2 27 | with: 28 | type: zip 29 | filename: ssc_client-net6.0-windows.zip 30 | path: ChatClient/bin/Release/net6.0-windows/win10-x64/publish 31 | - name: Archive server 32 | uses: thedoctor0/zip-release@0.6.2 33 | with: 34 | filename: ssc_server-net6.0-windows.zip 35 | path: ChatServer/bin/Release/net6.0-windows/win10-x64/publish 36 | 37 | - name: Client artifact 38 | uses: actions/upload-artifact@v2 39 | with: 40 | name: client-net6.0-windows 41 | path: ssc_client-net6.0-windows.zip 42 | - name: Server artifact 43 | uses: actions/upload-artifact@v2 44 | with: 45 | name: server-net6.0-windows 46 | path: ssc_server-net6.0-windows.zip 47 | 48 | - name: Release 49 | if: startsWith(github.ref, 'refs/tags/') 50 | uses: softprops/action-gh-release@v1 51 | with: 52 | draft: false 53 | prerelease: false 54 | files: | 55 | ssc_client-net6.0-windows.zip 56 | ssc_server-net6.0-windows.zip -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "yaml.schemas": { 3 | "https://json.schemastore.org/github-workflow.json": "file:///d%3A/projects/SimpleSecureChat/.github/workflows/build.yml" 4 | } 5 | } -------------------------------------------------------------------------------- /ChatClient/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 40 | 41 | 42 | 43 | 44 | 94 | 95 | 96 | 97 | 141 | 142 | 143 | 144 | 187 | 188 | 189 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /ChatClient/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace ChatClient 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ChatClient/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /ChatClient/ChatClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net6.0-windows 6 | win10-x64 7 | enable 8 | true 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Code 21 | 22 | 23 | True 24 | True 25 | Settings.settings 26 | 27 | 28 | 29 | 30 | 31 | SettingsSingleFileGenerator 32 | Settings.Designer.cs 33 | 34 | 35 | 36 | 37 | 38 | Designer 39 | MSBuild:Compile 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ChatClient/FingerPrint.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 |