Dracoon.Crypto.Sdk 4.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dracoon.Crypto.Sdk --version 4.0.0                
NuGet\Install-Package Dracoon.Crypto.Sdk -Version 4.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dracoon.Crypto.Sdk" Version="4.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dracoon.Crypto.Sdk --version 4.0.0                
#r "nuget: Dracoon.Crypto.Sdk, 4.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dracoon.Crypto.Sdk as a Cake Addin
#addin nuget:?package=Dracoon.Crypto.Sdk&version=4.0.0

// Install Dracoon.Crypto.Sdk as a Cake Tool
#tool nuget:?package=Dracoon.Crypto.Sdk&version=4.0.0                

Build Status

Dracoon C# Crypto SDK

A library which implements the client-side encryption of Dracoon.

Introduction

A document which describes the client-side encryption in detail can be found here:

https://support.dracoon.com/hc/en-us/articles/360000986345

Setup

Minimum Requirements

.NET Standard 2.0

Download

NuGet: Add the this dependency to your packages.config: If you're using nuget with package management "Packages.config", then edit your project's "packages.config" and add this to the packages section:

<package id="Dracoon.Crypto.Sdk" version="4.0.0" />

If 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:

<PackageReference Include="Dracoon.Crypto.Sdk" Version="4.0.0" />

DLL import: The latest DLL can be found here.

Note that you also need to include the following dependencies:

  1. Bouncy Castle Provider (v2.3.0): https://www.nuget.org/packages/BouncyCastle.Cryptography

Example

An example can be found here: DracoonCryptoSdkExample/Program.cs

The 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.

static void Main(String[] args) {
    // --- INITIALIZATION ---
    // Generate key pair
    UserKeyPair userKeyPair = Crypto.GenerateUserKeyPair(USER_PASSWORD);
    // Check key pair
    if (!Crypto.CheckUserKeyPair(userKeyPair, USER_PASSWORD)) {
        ...
    }

    byte[] plainData = Encoding.UTF8.GetBytes(DATA);

    ...

    // --- ENCRYPTION ---
    // Generate plain file key
    PlainFileKey fileKey = Crypto.GenerateFileKey();
    // Encrypt blocks
    byte[] encData = EncryptData(fileKey, plainData);
    // Encrypt file key
    EncryptedFileKey encFileKey = Crypto.EncryptFileKey(fileKey, userKeyPair.UserPublicKey);

    ...

    // --- DECRYPTION ---
    // Decrypt file key
    PlainFileKey decFileKey = Crypto.DecryptFileKey(encFileKey, userKeyPair.UserPrivateKey, USER_PASSWORD);
    // Decrypt blocks
    byte[] decData = DecryptData(decFileKey, encData);
}

Copyright 2021 Dracoon GmbH. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dracoon.Crypto.Sdk:

Package Downloads
Dracoon.Sdk

The DRACOON SDK for .NET Standard.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.0 4,115 6/12/2024
4.0.0 1,215 2/13/2024
3.1.0 2,089 10/10/2023
3.0.0 7,988 11/24/2021
2.1.0 676 8/18/2021
2.0.0 1,376 9/24/2020
1.0.2 3,239 8/1/2018
1.0.1 1,026 11/10/2017
1.0.0 1,046 11/7/2017