Skip to content

Commit 30ead46

Browse files
authored
Merge pull request #102 from shinji-san/release-v0.9.0
Release v0.9.0 Added - Add ToInt32() method to BigIntCalculator and Calculator class. - Introduce the `IExtendedGcdResult` interface to decouple GCD result implementations. Changed - Moved generic version of the Calculator class from the Calculator.cs file to the Calculator`1.cs file. - Updated Microsoft.NET.Test.Sdk Nuget package version to 17.2.0. - Updated xunit.runner.visualstudio Nuget package version to 2.4.5. - Set Calculator fields ChildTypes and ChildBaseCtors from protected to private. - Performance improvements for ShamirsSecretSharing classes. - Performance improvements for FinitePoint class. - Performance improvements for generic Calculator class. Deprecated - Ctor ShamirsSecretSharing(IExtendedGcdAlgorithm<TNumber> extendedGcd, int securityLevel) is deprecated. - Method MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares) is deprecated. Fixed - Fixed style guide violations in CHANGELOG.md. - Fixed style guide violations in FinitePoint.cs. - Fixed style guide violations in Shares.cs. - Fixed style guide violations in SharesEnumerator.cs. - Fixed style guide violations in IExtendedGcdAlgorithm`2.cs. - Fixed style guide violations in ExtendedEuclideanAlgorithm.cs. - Fixed style guide violations in Calculator.cs. - Fixed style guide violations in Calculator`1.cs. - Fixed style guide violations in BigIntCalculator.cs. - Fixed style guide violations in Secret.cs. Split file into Secret.cs and Secret`1.cs. - Fixed possible null reference exception in Calculator class. - Fixed possible null reference exception in Shares class. - Fixed possible null reference exception in ShamirsSecretSharing class. - Fixed unnecessary boxing/unboxing in the ToString() methods in Calculator classes. Removed - Removed constructor w/ ReadOnlyCollection parameter from the SharesEnumerator{TNumber} class. - Removed tuple type casting from the Shares class. - Removed Shares.Item1 property. - Removed Shares.Item2 property. Resolves: No entry
2 parents 881bd92 + 8a77072 commit 30ead46

29 files changed

+1430
-1008
lines changed

.github/workflows/codeql-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ develop, main, master ]
16+
branches: [ develop, main ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ develop ]
19+
branches: [ develop, main ]
2020
schedule:
2121
- cron: '18 17 * * 4'
2222

CHANGELOG.md

+181-140
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,181 @@
1-
# Changelog
2-
All notable changes to this project will be documented in this file.
3-
4-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6-
7-
## [0.8.0] - 2022-07-05
8-
### Added
9-
- Added more examples in the section *Usage* of the `README.md` file to explain the use of shares and the use of the new type casting from byte array to secret and vice versa.
10-
- Added method `MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares, int securityLevel)`
11-
- Added method `MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares, Secret<TNumber> secret, int securityLevel)`
12-
- Added localization for exception messages in English and German languages
13-
14-
### Changed
15-
- Changed existing examples in the section *Usage* of the `README.md` file to explain the use and the type casting of recovered secrets.
16-
- Minify NuGet package README.md
17-
- Changed ctor `ShamirsSecretSharing(IExtendedGcdAlgorithm<TNumber> extendedGcd)`. This ctor sets the SecurityLevel to 13.
18-
19-
### Deprecated
20-
- Ctor `ShamirsSecretSharing(IExtendedGcdAlgorithm<TNumber> extendedGcd, int securityLevel)` is deprecated.
21-
- Method `MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares)` is deprecated.
22-
- Shares to tuple type casting is obsolete and will be remove in the next release.
23-
- Shares.Item1 property is obsolete and will be remove in the next release.
24-
- Shares.Item2 property is obsolete and will be remove in the next release.
25-
26-
### Removed
27-
- Removed .NET 5 support, because it retires on May 10, 2022. See [Microsoft .NET and .NET Core - Support Dates](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core).
28-
29-
## [0.7.0] - 2022-02-09
30-
### Added
31-
- Added implicit casts for byte arrays in *Secret* class.
32-
- Added legacy mode. See README.md, section "Usage" for more details.
33-
34-
### Changed
35-
- Changed behavior of *Secret* class for negative secret values. See README.md, section "Usage" and bug report [#60](https://github.com/shinji-san/SecretSharingDotNet/issues/60) for more details.
36-
- Changed calculation of maximum security level in Reconstruction method.
37-
38-
### Fixed
39-
- Fixed reopened bug [#60](https://github.com/shinji-san/SecretSharingDotNet/issues/60) "Reconstruction fails at random".
40-
- Fixed assembly output path in `SecretSharingDotNetFx4.6.2.csproj`
41-
42-
### Removed
43-
- Removed .NET FX 4.5.2 support, because it retires on April 26, 2022. See [.NET FX Lifecycle Policy](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-framework).
44-
- Removed .NET FX 4.6 support, because it retires on April 26, 2022. See [.NET FX Lifecycle Policy](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-framework).
45-
- Removed .NET FX 4.6.1 support, because it retires on April 26, 2022. See [.NET FX Lifecycle Policy](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-framework).
46-
47-
## [0.6.0] - 2021-11-25
48-
### Added
49-
- Add .NET 6 support
50-
51-
### Changed
52-
- Use RandomNumberGenerator class instead RNGCryptoServiceProvider class to create the polynomial. For details see dotnet runtime issue [40169](https://github.com/dotnet/runtime/issues/40169)
53-
54-
### Fixed
55-
- Fixed bug [#60](https://github.com/shinji-san/SecretSharingDotNet/issues/60) "Reconstruction fails at random" which occurs when the secret is created from a base64 string
56-
57-
### Removed
58-
- Removed .NET Core 2.1 (LTS) support
59-
60-
## [0.5.0] - 2021-10-07
61-
### Added
62-
- Introduced a new return type for the split method 'MakeShares'
63-
- Added CLI building instructions in README.md
64-
65-
### Changed
66-
- Updated examples in README.md based on the new return type for the split method
67-
- Updated xUnit package references in CSharp projects
68-
- Updated Microsoft Test SDK package references in CSharp projects
69-
- Updated Mircosoft .NET FX reference assemblies package references in CSharp projects
70-
71-
### Deprecated
72-
- The tuple return type for the split method 'MakeShares' is obsolete
73-
74-
### Fixed
75-
- Fixed CI version dependency
76-
- Fixed code quality issues in CSharp code
77-
- Fixed spelling mistakes in README.md
78-
- Fixed .NET 5 solution filename in README.md
79-
- Added missing target framework .NET 5 to SecretSharingDotNetTest.csproj
80-
81-
## [0.4.2] - 2020-12-18
82-
### Fixed
83-
- Fixed wrong NuGet package version
84-
85-
## [0.4.1] - 2020-12-18
86-
### Fixed
87-
- NuGet build environment modified to build for .NET 5.0
88-
89-
## [0.4.0] - 2020-12-18
90-
### Added
91-
- Added .NET 5.0 support
92-
93-
### Fixed
94-
- Fixed bug 40 (_Maximum exceeded!_) reported [@varshadqz](https://github.com/shinji-san/SecretSharingDotNet/issues/40)
95-
96-
## [0.3.0] - 2020-04-19
97-
### Added
98-
- Added .NET FX 4.6 support
99-
- Added .NET FX 4.6.1 support
100-
- Added .NET FX 4.6.2 support
101-
- Added .NET FX 4.7 support
102-
- Added .NET FX 4.7.1 support
103-
- Added .NET FX 4.7.2 support
104-
- Added .NET FX 4.8 support
105-
- Added .NET Standard 2.1 support
106-
107-
### Changed
108-
- README.md: Extend build & test status corresponding to the .NET versions
109-
110-
## [0.2.0] - 2020-04-12
111-
### Added
112-
- Addded full .NET Core 3.1 support
113-
114-
## [0.1.1] - 2020-04-11
115-
### Fixed
116-
- Fixed wrong NuGet package version
117-
118-
## [0.1.0] - 2020-04-11
119-
### Added
120-
- Added initial verion of SecretSharingDotNet
121-
- Added .NET FX 4.5.2 support
122-
- Added .NET Core 2.1 support
123-
- Added limited .NET Core 3.1 support
124-
- Added GitHub issue template
125-
- Added CODE_OF_CONDUCT.md
126-
- Added LICENSE.md
127-
- Added README.md
128-
129-
[Unreleased]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.8.0...HEAD
130-
[0.8.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.7.0...v0.8.0
131-
[0.7.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.6.0...v0.7.0
132-
[0.6.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.5.0...v0.6.0
133-
[0.5.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.4.2...v0.5.0
134-
[0.4.2]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.4.1...v0.4.2
135-
[0.4.1]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.4.0...v0.4.1
136-
[0.4.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.3.0...v0.4.0
137-
[0.3.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.2.0...v0.3.0
138-
[0.2.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.1.1...v0.2.0
139-
[0.1.1]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.1.0...v0.1.1
140-
[0.1.0]: https://github.com/shinji-san/SecretSharingDotNet/releases/tag/v0.1.0
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [0.9.0] - 2022-10-09
8+
### Added
9+
- Add `ToInt32()` method to `BigIntCalculator` and `Calculator` class.
10+
- Introduce the `IExtendedGcdResult` interface to decouple GCD result implementations.
11+
12+
### Changed
13+
- Moved generic version of the `Calculator` class from the `Calculator.cs` file to the ``Calculator`1.cs`` file.
14+
- Updated `Microsoft.NET.Test.Sdk` Nuget package version to 17.2.0.
15+
- Updated `xunit.runner.visualstudio` Nuget package version to 2.4.5.
16+
- Set `Calculator` fields `ChildTypes` and `ChildBaseCtors` from protected to private.
17+
- Performance improvements for `ShamirsSecretSharing` classes.
18+
- Performance improvements for `FinitePoint` class.
19+
- Performance improvements for generic `Calculator` class.
20+
21+
### Deprecated
22+
- Ctor `ShamirsSecretSharing(IExtendedGcdAlgorithm<TNumber> extendedGcd, int securityLevel)` is deprecated.
23+
- Method `MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares)` is deprecated.
24+
25+
### Fixed
26+
- Fixed style guide violations in `CHANGELOG.md`.
27+
- Fixed style guide violations in `FinitePoint.cs`.
28+
- Fixed style guide violations in `Shares.cs`.
29+
- Fixed style guide violations in `SharesEnumerator.cs`.
30+
- Fixed style guide violations in ``IExtendedGcdAlgorithm`2.cs``.
31+
- Fixed style guide violations in `ExtendedEuclideanAlgorithm.cs`.
32+
- Fixed style guide violations in `Calculator.cs`.
33+
- Fixed style guide violations in ``Calculator`1.cs``.
34+
- Fixed style guide violations in `BigIntCalculator.cs`.
35+
- Fixed style guide violations in `Secret.cs`. Split file into `Secret.cs` and ``Secret`1.cs``.
36+
- Fixed possible null reference exception in `Calculator` class.
37+
- Fixed possible null reference exception in `Shares` class.
38+
- Fixed possible null reference exception in `ShamirsSecretSharing` class.
39+
- Fixed unnecessary boxing/unboxing in the `ToString()` methods in `Calculator` classes.
40+
41+
### Removed
42+
- Removed constructor w/ `ReadOnlyCollection` parameter from the `SharesEnumerator{TNumber}` class.
43+
- Removed tuple type casting from the `Shares` class.
44+
- Removed `Shares.Item1` property.
45+
- Removed `Shares.Item2` property.
46+
47+
## [0.8.0] - 2022-07-05
48+
### Added
49+
- Added more examples in the section *Usage* of the `README.md` file to explain the use of shares and the use of the new type casting from byte array to secret and vice versa.
50+
- Added method `MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares, int securityLevel)`
51+
- Added method `MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares, Secret<TNumber> secret, int securityLevel)`
52+
- Added localization for exception messages in English and German languages
53+
54+
### Changed
55+
- Changed existing examples in the section *Usage* of the `README.md` file to explain the use and the type casting of recovered secrets.
56+
- Minify NuGet package `README.md`
57+
- Changed ctor `ShamirsSecretSharing(IExtendedGcdAlgorithm<TNumber> extendedGcd)`. This ctor sets the SecurityLevel to 13.
58+
59+
### Deprecated
60+
- Ctor `ShamirsSecretSharing(IExtendedGcdAlgorithm<TNumber> extendedGcd, int securityLevel)` is deprecated.
61+
- Method `MakeShares(TNumber numberOfMinimumShares, TNumber numberOfShares)` is deprecated.
62+
- Shares to tuple type casting is obsolete and will be remove in the next release.
63+
- `Shares.Item1` property is obsolete and will be remove in the next release.
64+
- `Shares.Item2` property is obsolete and will be remove in the next release.
65+
66+
### Removed
67+
- Removed .NET 5 support, because it retires on May 10, 2022. See [Microsoft .NET and .NET Core - Support Dates](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core).
68+
69+
## [0.7.0] - 2022-02-09
70+
### Added
71+
- Added implicit casts for byte arrays in *Secret* class.
72+
- Added legacy mode. See `README.md`, section "Usage" for more details.
73+
74+
### Changed
75+
- Changed behavior of *Secret* class for negative secret values. See `README.md`, section "Usage" and bug report [#60](https://github.com/shinji-san/SecretSharingDotNet/issues/60) for more details.
76+
- Changed calculation of maximum security level in Reconstruction method.
77+
78+
### Fixed
79+
- Fixed reopened bug [#60](https://github.com/shinji-san/SecretSharingDotNet/issues/60) "Reconstruction fails at random".
80+
- Fixed assembly output path in `SecretSharingDotNetFx4.6.2.csproj`
81+
82+
### Removed
83+
- Removed .NET FX 4.5.2 support, because it retires on April 26, 2022. See [.NET FX Lifecycle Policy](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-framework).
84+
- Removed .NET FX 4.6 support, because it retires on April 26, 2022. See [.NET FX Lifecycle Policy](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-framework).
85+
- Removed .NET FX 4.6.1 support, because it retires on April 26, 2022. See [.NET FX Lifecycle Policy](https://docs.microsoft.com/en-us/lifecycle/products/microsoft-net-framework).
86+
87+
## [0.6.0] - 2021-11-25
88+
### Added
89+
- Add .NET 6 support
90+
91+
### Changed
92+
- Use `RandomNumberGenerator` class instead `RNGCryptoServiceProvider` class to create the polynomial. For details see dotnet runtime issue [40169](https://github.com/dotnet/runtime/issues/40169)
93+
94+
### Fixed
95+
- Fixed bug [#60](https://github.com/shinji-san/SecretSharingDotNet/issues/60) "Reconstruction fails at random" which occurs when the secret is created from a base64 string
96+
97+
### Removed
98+
- Removed .NET Core 2.1 (LTS) support
99+
100+
## [0.5.0] - 2021-10-07
101+
### Added
102+
- Introduced a new return type for the split method 'MakeShares'
103+
- Added CLI building instructions in `README.md`
104+
105+
### Changed
106+
- Updated examples in `README.md` based on the new return type for the split method
107+
- Updated xUnit package references in CSharp projects
108+
- Updated Microsoft Test SDK package references in CSharp projects
109+
- Updated Microsoft .NET FX reference assemblies package references in CSharp projects
110+
111+
### Deprecated
112+
- The tuple return type for the split method 'MakeShares' is obsolete
113+
114+
### Fixed
115+
- Fixed CI version dependency
116+
- Fixed code quality issues in CSharp code
117+
- Fixed spelling mistakes in `README.md`
118+
- Fixed .NET 5 solution filename in `README.md`
119+
- Added missing target framework .NET 5 to `SecretSharingDotNetTest.csproj`
120+
121+
## [0.4.2] - 2020-12-18
122+
### Fixed
123+
- Fixed wrong NuGet package version
124+
125+
## [0.4.1] - 2020-12-18
126+
### Fixed
127+
- NuGet build environment modified to build for .NET 5.0
128+
129+
## [0.4.0] - 2020-12-18
130+
### Added
131+
- Added .NET 5.0 support
132+
133+
### Fixed
134+
- Fixed bug 40 (_Maximum exceeded!_) reported [@varshadqz](https://github.com/shinji-san/SecretSharingDotNet/issues/40)
135+
136+
## [0.3.0] - 2020-04-19
137+
### Added
138+
- Added .NET FX 4.6 support
139+
- Added .NET FX 4.6.1 support
140+
- Added .NET FX 4.6.2 support
141+
- Added .NET FX 4.7 support
142+
- Added .NET FX 4.7.1 support
143+
- Added .NET FX 4.7.2 support
144+
- Added .NET FX 4.8 support
145+
- Added .NET Standard 2.1 support
146+
147+
### Changed
148+
- `README.md`: Extend build & test status corresponding to the .NET versions
149+
150+
## [0.2.0] - 2020-04-12
151+
### Added
152+
- Added full .NET Core 3.1 support
153+
154+
## [0.1.1] - 2020-04-11
155+
### Fixed
156+
- Fixed wrong NuGet package version
157+
158+
## [0.1.0] - 2020-04-11
159+
### Added
160+
- Added initial version of SecretSharingDotNet
161+
- Added .NET FX 4.5.2 support
162+
- Added .NET Core 2.1 support
163+
- Added limited .NET Core 3.1 support
164+
- Added GitHub issue template
165+
- Added `CODE_OF_CONDUCT.md`
166+
- Added `LICENSE.md`
167+
- Added `README.md`
168+
169+
[Unreleased]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.9.0...HEAD
170+
[0.9.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.8.0...v0.9.0
171+
[0.8.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.7.0...v0.8.0
172+
[0.7.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.6.0...v0.7.0
173+
[0.6.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.5.0...v0.6.0
174+
[0.5.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.4.2...v0.5.0
175+
[0.4.2]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.4.1...v0.4.2
176+
[0.4.1]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.4.0...v0.4.1
177+
[0.4.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.3.0...v0.4.0
178+
[0.3.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.2.0...v0.3.0
179+
[0.2.0]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.1.1...v0.2.0
180+
[0.1.1]: https://github.com/shinji-san/SecretSharingDotNet/compare/v0.1.0...v0.1.1
181+
[0.1.0]: https://github.com/shinji-san/SecretSharingDotNet/releases/tag/v0.1.0

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ An C# implementation of Shamir's Secret Sharing.
7474
</thead>
7575
<tbody>
7676
<tr>
77-
<td rowspan=9><a href="https://github.com/shinji-san/SecretSharingDotNet/actions?query=workflow%3A%22SecretSharingDotNet+NuGet%22" target="_blank"><img src="https://github.com/shinji-san/SecretSharingDotNet/workflows/SecretSharingDotNet%20NuGet/badge.svg?branch=v0.8.0" alt="SecretSharingDotNet NuGet"/></a></td>
78-
<td rowspan=9><a href="https://badge.fury.io/nu/SecretSharingDotNet" target="_blank"><img src="https://badge.fury.io/nu/SecretSharingDotNet.svg" alt="NuGet Version 0.8.0"/></a></td>
79-
<td rowspan=9><a href="https://github.com/shinji-san/SecretSharingDotNet/tree/v0.8.0" target="_blank"><img src="https://img.shields.io/badge/SecretSharingDotNet-0.8.0-green.svg?logo=github&logoColor=959da5&color=2ebb4e&labelColor=2b3137" alt="Tag"/></a></td>
77+
<td rowspan=9><a href="https://github.com/shinji-san/SecretSharingDotNet/actions?query=workflow%3A%22SecretSharingDotNet+NuGet%22" target="_blank"><img src="https://github.com/shinji-san/SecretSharingDotNet/workflows/SecretSharingDotNet%20NuGet/badge.svg?branch=v0.9.0" alt="SecretSharingDotNet NuGet"/></a></td>
78+
<td rowspan=9><a href="https://badge.fury.io/nu/SecretSharingDotNet" target="_blank"><img src="https://badge.fury.io/nu/SecretSharingDotNet.svg" alt="NuGet Version 0.9.0"/></a></td>
79+
<td rowspan=9><a href="https://github.com/shinji-san/SecretSharingDotNet/tree/v0.9.0" target="_blank"><img src="https://img.shields.io/badge/SecretSharingDotNet-0.9.0-green.svg?logo=github&logoColor=959da5&color=2ebb4e&labelColor=2b3137" alt="Tag"/></a></td>
8080
<td>Core 3.1 (LTS)</td>
8181
</tr>
8282
<tr>
@@ -110,10 +110,10 @@ An C# implementation of Shamir's Secret Sharing.
110110

111111
1. Open a console and switch to the directory, containing your project file.
112112

113-
2. Use the following command to install version 0.8.0 of the SecretSharingDotNet package:
113+
2. Use the following command to install version 0.9.0 of the SecretSharingDotNet package:
114114

115115
```dotnetcli
116-
dotnet add package SecretSharingDotNet -v 0.8.0 -f <FRAMEWORK>
116+
dotnet add package SecretSharingDotNet -v 0.9.0 -f <FRAMEWORK>
117117
```
118118
119119
3. After the completition of the command, look at the project file to make sure that the package is successfuly installed.
@@ -122,7 +122,7 @@ An C# implementation of Shamir's Secret Sharing.
122122
123123
```xml
124124
<ItemGroup>
125-
<PackageReference Include="SecretSharingDotNet" Version="0.8.0" />
125+
<PackageReference Include="SecretSharingDotNet" Version="0.9.0" />
126126
</ItemGroup>
127127
```
128128
## Remove SecretSharingDotNet package

0 commit comments

Comments
 (0)