-
Notifications
You must be signed in to change notification settings - Fork 12
Decouple underlying libraries from EG UI #509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Decouple underlying libraries from EG UI #509
Conversation
…ents so that, in theory, someone could build a different UI/storage solution but rely on the core crypto
feat: prep Decryption for Nuget
Remove Enhanced Voting specific nuget publishing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to build the ElectionGuard project on Windows, sans arm64 target.
There is one broken test, that appears to predate this PR. It is a failing test for Test_Save_TestDataOutput (part of ElectionGuard.Decryption.Tests.dll).
Error Message:
Newtonsoft.Json.JsonSerializationException : Error getting value from 'Pad' on 'ElectionGuard.HashedElGamalCiphertext'.
----> System.ArgumentNullException : SafeHandle cannot be null. (Parameter 'pHandle')`
The ElectionGuard.UI tests are commented out (prior to this PR) so it is hard to gauge how these changes affect its function.
We can update to .NET 9, but my preference is to only upgrade to .NET 8, which is the LTS version unless we need the features .NET 9 provides.
We will update the remaining .NET projects to the agreed upon .NET version post-merge.
There is a large number of whitespace-only changes in this PR. I am OK with using a linter/formatter, but it needs to be integrated into the build process (please point to where).
| <!-- Package --> | ||
| <PackageId>Enhanced.ElectionGuard.Encryption</PackageId> | ||
| <Title>Enhanced ElectionGuard Encryption</Title> | ||
| <Description>Private fork of open source implementation of ElectionGuard's ballot encryption.</Description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not be announced as a fork.
| <PackageId>Enhanced.ElectionGuard.Encryption</PackageId> | ||
| <Title>Enhanced ElectionGuard Encryption</Title> | ||
| <Description>Private fork of open source implementation of ElectionGuard's ballot encryption.</Description> | ||
| <Authors>Enhanced Voting</Authors> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave as Microsoft. Attributes will given per the CLA.
| <Authors>Enhanced Voting</Authors> | ||
| <PackageVersion>1.75.17</PackageVersion> | ||
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
| <PackageProjectUrl>https://github.com/Enhanced-Voting/electionguard</PackageProjectUrl> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use existing paths
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
| <PackageProjectUrl>https://github.com/Enhanced-Voting/electionguard</PackageProjectUrl> | ||
| <RepositoryUrl>https://github.com/Enhanced-Voting/electionguard</RepositoryUrl> | ||
| <PackageTags>Enhanced;Electionguard;Encryption;Windows;Linux</PackageTags> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove tag
| <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
| <!-- <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> --> | ||
| <!-- <PackageReleaseNotes>Changelog</PackageReleaseNotes> --> | ||
| <Platforms>x64;x86</Platforms> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to understand why we are dropping ARM. It seems desirable to keep it given the relative state of x64/x86
| <Nullable>enable</Nullable> | ||
| <EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
| <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
| <Platforms>arm64;x64;x86</Platforms> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to understand why arm is being removed here.
| using System.Xml.Linq; | ||
|
|
||
| var target = HasArgument("target") ? Argument("target", "Build") : Argument("t", "Build"); | ||
| var target = HasArgument("target") ? Argument("target", "Build") : Argument("t", "Build"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's going on in this file at all.
| <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
| <RestoreProjectStyle>PackageReference</RestoreProjectStyle> | ||
| <!--<Configurations>Release;Debug</Configurations>--> | ||
| <Platforms Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">arm64;x64</Platforms> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we want to do this.
| <Title>Enhanced ElectionGuard Election Setup</Title> | ||
| <Description>Private fork of open source implementation of ElectionGuard's election setup.</Description> | ||
| <Authors>Enhanced Voting</Authors> | ||
| <PackageVersion>1.75.17</PackageVersion> | ||
| <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
| <PackageProjectUrl>https://github.com/Enhanced-Voting/electionguard</PackageProjectUrl> | ||
| <RepositoryUrl>https://github.com/Enhanced-Voting/electionguard</RepositoryUrl> | ||
| <PackageTags>Enhanced;Electionguard;Election;Setup;Windows;Linux</PackageTags> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove EV specific details
|
|
||
| <PropertyGroup Label="Debug|arm64" Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-maccatalyst|arm64'"> | ||
| <CreatePackage>false</CreatePackage> | ||
| <RuntimeIdentifiers>maccatalyst-arm64;maccatalyst-x64</RuntimeIdentifiers> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Label="Release|arm64" Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-maccatalyst|arm64'"> | ||
| <CreatePackage>true</CreatePackage> | ||
| <RuntimeIdentifiers>maccatalyst-arm64;maccatalyst-x64</RuntimeIdentifiers> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Label="Debug|x64" Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-maccatalyst|x64'"> | ||
| <CreatePackage>false</CreatePackage> | ||
| <RuntimeIdentifiers>maccatalyst-x64</RuntimeIdentifiers> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Label="Release|x64" Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-maccatalyst|x64'"> | ||
| <CreatePackage>false</CreatePackage> | ||
| <RuntimeIdentifiers>maccatalyst-x64</RuntimeIdentifiers> | ||
| </PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If MAUI is supported on mac, i see no need to remove this.
Issue
Unable to write a different UI application and still use some of the reusable components of EG.
Description
The construction of EG solution made it such that we could not write our own UI application and still use the underlying features/functionality of EG. These changes primarily refactor several areas of the code to allow for the UI layer to be separate and swapped out by another UI in a different implementation without breaking this UI in this solution.