PADME 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package PADME --version 1.0.1                
NuGet\Install-Package PADME -Version 1.0.1                
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="PADME" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PADME --version 1.0.1                
#r "nuget: PADME, 1.0.1"                
#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 PADME as a Cake Addin
#addin nuget:?package=PADME&version=1.0.1

// Install PADME as a Cake Tool
#tool nuget:?package=PADME&version=1.0.1                

License: MIT

PADMÉ.NET

A .NET implementation of PADMÉ padding, which limits information leakage about the length of the plaintext for a wide range of encrypted data sizes.

Usage

Here is an example of Pad-then-Encrypt using PADMÉ with ISO/IEC 7816-4 padding, which can be easily removed after decryption:

// Get the amount of padding to add
int paddingLength = PADME.GetPaddingLength(message.Length);

// Apply ISO/IEC 7816-4 padding
byte[] paddedMessage = Padding.Apply(message, paddingLength);

// Encrypt the padded plaintext using an AEAD
byte[] ciphertext = XChaCha20BLAKE2b.Encrypt(paddedMessage, nonce, key);

// Decrypt the ciphertext
byte[] paddedPlaintext = XChaCha20BLAKE2b.Decrypt(ciphertext, nonce, key);

// Remove the padding
byte[] plaintext = Padding.Remove(paddedPlaintext);
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 475 9/5/2022
1.0.1 440 1/18/2022