PostQuantum.FileEncryption.Aws
1.4.1
Requires NuGet 6.0.0 or higher.
dotnet add package PostQuantum.FileEncryption.Aws --version 1.4.1
NuGet\Install-Package PostQuantum.FileEncryption.Aws -Version 1.4.1
<PackageReference Include="PostQuantum.FileEncryption.Aws" Version="1.4.1" />
<PackageVersion Include="PostQuantum.FileEncryption.Aws" Version="1.4.1" />
<PackageReference Include="PostQuantum.FileEncryption.Aws" />
paket add PostQuantum.FileEncryption.Aws --version 1.4.1
#r "nuget: PostQuantum.FileEncryption.Aws, 1.4.1"
#:package PostQuantum.FileEncryption.Aws@1.4.1
#addin nuget:?package=PostQuantum.FileEncryption.Aws&version=1.4.1
#tool nuget:?package=PostQuantum.FileEncryption.Aws&version=1.4.1
PostQuantum.FileEncryption.Aws
Envelope encryption with AWS KMS — your master key never leaves AWS.
AwsKmsContentKeyProvider plugs AWS KMS into
PostQuantum.FileEncryption's
IContentKeyProvider seam: every file is encrypted under a fresh per-file content key that
KMS GenerateDataKey wraps under your customer master key; decryption sends only the small
wrapped blob back to KMS Decrypt.
dotnet add package PostQuantum.FileEncryption.Aws
Usage
using Amazon.KeyManagementService;
using PostQuantum.FileEncryption;
using PostQuantum.FileEncryption.Aws;
var kms = new AmazonKeyManagementServiceClient(); // credentials from the usual AWS chain
var provider = new AwsKmsContentKeyProvider(kms, "alias/my-app-key");
await new PqFileEncryptor().EncryptFileAsync("report.pdf", "report.pdf.pqfe", provider);
await new PqFileDecryptor().DecryptFileAsync("report.pdf.pqfe", "report.pdf", provider);
Optionally bind extra encryption context (audited by CloudTrail, required to unwrap):
var provider = new AwsKmsContentKeyProvider(kms, "alias/my-app-key",
new Dictionary<string, string> { ["tenant"] = "contoso" });
Security behavior
- The master key stays in KMS. Only the per-file content key crosses the boundary, and only wrapped. Rotation re-wraps the small content key — multi-gigabyte payloads are never re-encrypted.
- Bound wraps. Every wrap carries a library-specific encryption context (plus your
entries), and unwrap pins the configured key id — a blob wrapped under a different key or
context fails closed with
PqDecryptionException, indistinguishable from tampering. - Operational errors stay operational. Missing keys, access denial, throttling, and network failures surface as the AWS SDK's own exceptions, not as decryption failures.
- IAM permissions needed:
kms:GenerateDataKeyto encrypt,kms:Decryptto decrypt.
Versioning
Kept in lockstep with PostQuantum.FileEncryption. No change to the .pqfe v2 container
format, which remains FROZEN for the 1.x line.
To God be the glory — 1 Corinthians 10:31.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AWSSDK.KeyManagementService (>= 4.0.12.5)
- PostQuantum.FileEncryption (>= 1.4.1)
-
net8.0
- AWSSDK.KeyManagementService (>= 4.0.12.5)
- PostQuantum.FileEncryption (>= 1.4.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.4.1 — documentation and packaging patch, versioned in lockstep with the PostQuantum.FileEncryption family: corrects the package README version references following the 1.4.0 first release. No change to the provider's behavior, API, or the .pqfe v2 container format, which remains FROZEN for the 1.x line.