{"id":23174361,"url":"https://github.com/dracoon/dracoon-csharp-crypto-sdk","last_synced_at":"2025-06-27T18:11:07.177Z","repository":{"id":90103082,"uuid":"108822962","full_name":"dracoon/dracoon-csharp-crypto-sdk","owner":"dracoon","description":"Official DRACOON Crypto SDK for C#","archived":false,"fork":false,"pushed_at":"2024-06-12T08:54:45.000Z","size":210,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-02T02:41:46.213Z","etag":null,"topics":["crypto","cryptography","csharp","dracoon","sdk"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dracoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-30T08:34:30.000Z","updated_at":"2024-08-20T14:21:43.000Z","dependencies_parsed_at":"2024-06-12T11:23:27.103Z","dependency_job_id":null,"html_url":"https://github.com/dracoon/dracoon-csharp-crypto-sdk","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/dracoon/dracoon-csharp-crypto-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracoon%2Fdracoon-csharp-crypto-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracoon%2Fdracoon-csharp-crypto-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracoon%2Fdracoon-csharp-crypto-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracoon%2Fdracoon-csharp-crypto-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dracoon","download_url":"https://codeload.github.com/dracoon/dracoon-csharp-crypto-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracoon%2Fdracoon-csharp-crypto-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262308095,"owners_count":23291097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crypto","cryptography","csharp","dracoon","sdk"],"created_at":"2024-12-18T05:19:57.076Z","updated_at":"2025-06-27T18:11:07.143Z","avatar_url":"https://github.com/dracoon.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/dracoon/dracoon-csharp-crypto-sdk.svg?branch=master)](https://travis-ci.com/dracoon/)\n# Dracoon C# Crypto SDK\n\nA library which implements the client-side encryption of Dracoon.\n\n# Introduction\n\nA document which describes the client-side encryption in detail can be found here:\n\nhttps://support.dracoon.com/hc/en-us/articles/360000986345 \n\n# Setup\n\n#### Minimum Requirements\n\n.NET Standard 2.0\n\n#### Download\n\nNuGet: Add the this dependency to your packages.config:\nIf you're using nuget with package management \"Packages.config\", then edit your project's \"packages.config\" and add this to the packages section:\n```xml\n\u003cpackage id=\"Dracoon.Crypto.Sdk\" version=\"5.1.0\" /\u003e\n```\nIf you are using Visual Studio 2017 (or higher) add you're using nuget with package management \"PackageReference\" then edit your .csproj file and add this to the package dependency group:\n```xml\n\u003cPackageReference Include=\"Dracoon.Crypto.Sdk\" Version=\"5.1.0\" /\u003e\n```\n\nDLL import: The latest DLL can be found [here](https://github.com/dracoon/dracoon-csharp-crypto-sdk/releases).\n\nNote that you also need to include the following dependencies:\n1. Bouncy Castle Provider (v2.4.0): https://www.nuget.org/packages/BouncyCastle.Cryptography\n\n# Example\n\nAn example can be found here: `DracoonCryptoSdkExample/Program.cs`\n\nThe example shows the complete encryption workflow, i.e. generate user keypair, validate user keypair, generate file key, encrypt file key, and finally encrypt and decrypt a file.\n\n```c#\nstatic void Main(String[] args) {\n    // --- INITIALIZATION ---\n    // Generate key pair\n    UserKeyPair userKeyPair = Crypto.GenerateUserKeyPair(USER_PASSWORD);\n    // Check key pair\n    if (!Crypto.CheckUserKeyPair(userKeyPair, USER_PASSWORD)) {\n        ...\n    }\n\n    byte[] plainData = Encoding.UTF8.GetBytes(DATA);\n\n    ...\n\n    // --- ENCRYPTION ---\n    // Generate plain file key\n    PlainFileKey fileKey = Crypto.GenerateFileKey();\n    // Encrypt blocks\n    byte[] encData = EncryptData(fileKey, plainData);\n    // Encrypt file key\n    EncryptedFileKey encFileKey = Crypto.EncryptFileKey(fileKey, userKeyPair.UserPublicKey);\n\n    ...\n\n    // --- DECRYPTION ---\n    // Decrypt file key\n    PlainFileKey decFileKey = Crypto.DecryptFileKey(encFileKey, userKeyPair.UserPrivateKey, USER_PASSWORD);\n    // Decrypt blocks\n    byte[] decData = DecryptData(decFileKey, encData);\n}\n```\n\n# Copyright and License\n\nCopyright 2021 Dracoon GmbH. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the\nLicense. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific\nlanguage governing permissions and limitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdracoon%2Fdracoon-csharp-crypto-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdracoon%2Fdracoon-csharp-crypto-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdracoon%2Fdracoon-csharp-crypto-sdk/lists"}