From 4f3160a1763dd07aa018f56ceb8261c1d736cd99 Mon Sep 17 00:00:00 2001 From: Sebastian Walther Date: Sat, 9 Sep 2023 00:20:46 +0200 Subject: [PATCH 1/3] Secret.cs: Mark legacy mode as obsolete Resolves: No entry --- src/Cryptography/Secret.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Cryptography/Secret.cs b/src/Cryptography/Secret.cs index de8f722..ff69b5b 100644 --- a/src/Cryptography/Secret.cs +++ b/src/Cryptography/Secret.cs @@ -47,6 +47,7 @@ public class Secret /// Gets or sets the legacy mode on () or to be compatible with /// v0.6.0 or older. /// + [Obsolete("Legacy mode is deprecated and will be removed in the next versions.")] public static readonly ThreadLocal LegacyMode = new ThreadLocal {Value = false}; /// @@ -118,6 +119,7 @@ internal static Secret CreateRandom(Calculator prime) /// /// Creates an array from a base64 string as in version 0.6.0 or older /// + [Obsolete("Legacy mode is deprecated and will be removed in the next versions.")] protected static readonly Func FromBase64Legacy = base64 => { var bytes = Convert.FromBase64String(base64).ToList(); From 02f56515c83240193ab846ea0d4ebcc30bd43029 Mon Sep 17 00:00:00 2001 From: Sebastian Walther Date: Sun, 10 Sep 2023 21:34:51 +0200 Subject: [PATCH 2/3] CHANGELOG.md: Section Deprecated, Secret Legacy Mode Resolves: No entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b24741a..62f3ff3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - FinitePoint: Use `ReadOnlySpan` for `string` parameters in ctor and methods. +### Deprecated +- The Secret Legacy Mode is marked as deprecated and will be removed in one of the next releases. + ## [0.10.1] - 2023-05-08 ### Fixed - Fixed BigIntCalculator's Equals method to avoid timing attacks. The slow equal implementation is used now. From c9942120ee88e3585f275e9873f47a74ad57dcd3 Mon Sep 17 00:00:00 2001 From: Sebastian Walther Date: Sun, 10 Sep 2023 21:38:13 +0200 Subject: [PATCH 3/3] README.md: Mark Secret Legacy Mode as deprecated Resolves: No entry --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af18409..80f71dc 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ Afterwards, use the function `Reconstruction` to re-construct the original secre The length of the shares is based on the security level. It's possible to pre-define a security level by `ctor` or the `SecurityLevel` property. The pre-defined security level will be overriden, if the secret size is greater than the Mersenne prime, which is calculated by means of the security level. It is not necessary to define a security level for a re-construction. -## Attention: Breaking change - Normal and legacy mode in v0.7.0 +## Attention: Breaking change - Normal and legacy mode in v0.7.0 [Deprecated] Library version 0.7.0 introduces a normal mode and a legacy mode for secrets. The normal mode is the new and default mode. The legacy mode is for backward compatibility.