Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into task/rangedproof
  • Loading branch information
SteveMaier-IRT committed Jan 18, 2024
2 parents c658107 + 05ecf89 commit 6f088b8
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 75 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

Expand All @@ -52,4 +52,4 @@ jobs:
make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/pull-request-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:

- name: Install .NET
if: (steps.filter.outputs.any == 'true')
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x

Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:

- name: save build artifacts
if: (steps.filter.outputs.bindings == 'true' || steps.filter.outputs.source == 'true')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: electionguard-admin
retention-days: 7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ jobs:

# Tools
- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
if: (steps.filter.outputs.any == 'true')
with:
dotnet-version: 7.0.x
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Build
run: make build-x64
- name: Upload Library (x64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linux-x64
path: |
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Build
run: make build-maccatalyst
- name: Upload Library (arm64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: maccatalyst-arm64
path: |
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Build
run: make build-arm64
- name: Upload Library (x64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: osx-arm64
path: |
Expand All @@ -118,7 +118,7 @@ jobs:
- name: Build
run: make build-x64
- name: Upload Library (x64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: osx-x64
path: |
Expand All @@ -145,7 +145,7 @@ jobs:
- name: Build
run: make build-wasm
- name: Upload Library (wasm)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wasm
path: |
Expand All @@ -159,15 +159,15 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup Environment
run: make environment
- name: Build
run: make build-x86
- name: Upload Library (x86)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: win-x86
path: |
Expand All @@ -185,15 +185,15 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup Environment
run: make environment
- name: Build
run: make build-x64
- name: Upload Library (x64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: win-x64
path: |
Expand Down Expand Up @@ -224,37 +224,37 @@ jobs:
run: make environment

- name: Get Linux x64 Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-x64
path: build/libs/Linux/x64/Release

- name: Get MacCatalyst arm64 Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: maccatalyst-arm64
path: build/libs/MacCatalyst/arm64/Release

- name: Get MacOS arm64 Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: osx-arm64
path: build/libs/Darwin/arm64/Release

- name: Get MacOS x64 Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: osx-x64
path: build/libs/Darwin/x64/Release

- name: Get Windows x86 Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: win-x86
path: build/libs/Windows/x86/Release

- name: Get Windows x64 Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: win-x64
path: build/libs/Windows/x64/Release
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:
with:
node-version: 16
- name: Get WASM Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: wasm
path: bindings/typescript/src/wasm
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
run: cd ${{ github.workspace }}

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x

Expand All @@ -344,13 +344,13 @@ jobs:
run: make environment-ui

# - name: Get MacCatalyst arm64 Artifacts
# uses: actions/download-artifact@v3
# uses: actions/download-artifact@v4
# with:
# name: maccatalyst-arm64
# path: build/libs/MacCatalyst/arm64/Release

- name: Get Windows x64 Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: win-x64
path: build/libs/Windows/x64/Release
Expand All @@ -364,7 +364,7 @@ jobs:
run: make publish-ui

- name: save build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: electionguard-admin
path: ./publish/*
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ publish-ui-appcenter:
ifneq ($(APPCENTER_SECRET_UWP),)
ifeq ($(OPERATING_SYSTEM),Windows)
@echo "Publishing UWP to AppCenter"
appcenter distribute release -f $(ELECTIONGUARD_PUBLISH_DIR)/ElectionGuard.UI.zip -g QualityAssurance -a "InfernoRed-Technology/ElectionGuard-Admin-1" -n $(BUILD_NUMBER) -b $(BUILD_VERSION) --disable-telemetry --token $(APPCENTER_API_TOKEN_UWP)
appcenter distribute release -f $(ELECTIONGUARD_PUBLISH_DIR)/ElectionGuard.UI.zip -g QualityAssurance -a "Election-Technology-Initiative/ElectionGuard-Admin-1" -n $(BUILD_NUMBER) -b $(BUILD_VERSION) --disable-telemetry --token $(APPCENTER_API_TOKEN_UWP)
endif
else
@echo "APPCENTER_SECRET_UWP not set. Skipping AppCenter publish"
Expand All @@ -426,7 +426,7 @@ endif
ifneq ($(APPCENTER_SECRET_MACOS),)
ifeq ($(OPERATING_SYSTEM),Darwin)
@echo "Publishing MacCatalyst to AppCenter"
appcenter distribute release -f $(ELECTIONGUARD_PUBLISH_DIR)/*.pkg -g QualityAssurance -a "InfernoRed-Technology/ElectionGuard-Admin" -n $(BUILD_NUMBER) -b $(BUILD_VERSION) --disable-telemetry --token $(APPCENTER_API_TOKEN_MACOS)
appcenter distribute release -f $(ELECTIONGUARD_PUBLISH_DIR)/*.pkg -g QualityAssurance -a "Election-Technology-Initiative/ElectionGuard-Admin" -n $(BUILD_NUMBER) -b $(BUILD_VERSION) --disable-telemetry --token $(APPCENTER_API_TOKEN_MACOS)
endif
else
@echo "APPCENTER_SECRET_MACOS not set. Skipping AppCenter publish"
Expand Down
81 changes: 36 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Learn More in the [ElectionGuard Repository](https://github.com/microsoft/electi

ElectionGuard supports a variety of use cases. The Primary use case is to generate verifiable end-to-end (E2E) encrypted elections. The ElectionGuard process can also be used for other use cases such as privacy enhanced risk-limiting audits (RLAs). This implementation only includes encryption functions and cannot be used to generate election keys and it cannot decrypt tally results.

This c++ implementation also includes a C API that can be consumed from anywhere that can call C code directly. A .Net Standard package is also provided.
This C++ implementation also includes a C API that can be consumed from anywhere that can call C code directly. A .Net Standard package is also provided.

## 💻 Requirements

Expand Down Expand Up @@ -67,7 +67,7 @@ The automated install of dependencies is currently only supported on debian-base

### Web Assembly

Building for WebAssembly (wasm) is supported with the `emscripten` toolchain.
Building for WebAssembly (wasm) is supported with the `emscripten` toolchain. This currently is setup for compiling on Linux and Mac only.

- Install [emscripten](https://emscripten.org/docs/getting_started/downloads.html)
- Install [Node Version Manager](https://github.com/nvm-sh/nvm)
Expand All @@ -77,36 +77,19 @@ Building for WebAssembly (wasm) is supported with the `emscripten` toolchain.

### 🖥️ Windows (using MSVC)

Building on windows is supported using the `MSVC` toolchain. MSVC is the default toolchain on Windows.
Building on windows is supported using the `MSVC` toolchain. MSVC is the default toolchain on Windows. All of these tools should be installed as admin or in a command prompt as admin to make sure that all of the security settings are appropriate. As for the Visual Studio 2022 install, VS 2022 Community edition will work for developing ElectionGuard. You also may use Professional or Enterprise versions.

- Install [Chocolatey](https://chocolatey.org/install)
- Install [Visual Studio Code](https://code.visualstudio.com/) or [Visual Studio Code](https://community.chocolatey.org/packages/vscode)
- Install [Github CommandLine](https://community.chocolatey.org/packages/git) or [Github CLI](https://community.chocolatey.org/packages/gh) or [Github Desktop](https://community.chocolatey.org/packages/github-desktop)
- Install [Powershell Core](https://github.com/powershell/powershell)
- Install [VS 2022](https://visualstudio.microsoft.com/vs/)
- Install [VS 2022](https://visualstudio.microsoft.com/vs/) or [VS 2022](https://community.chocolatey.org/packages/visualstudio2022community)
- Open the Visual Studio Installer and install
-- MSVC v142 - VS 2022 C++ x64/x86 build tools
-- Windows 10 SDK (latest)
-- C++ CMake tools for Windows
-- C++/CLI support for v142 build tools

### 🖥️ Windows (using MSYS2)

Building on windows is supported using the `MSYS2` toolchain.

- Install [Chocolatey](https://chocolatey.org/install)
- Install [Powershell Core](https://github.com/powershell/powershell)
- Install [MSYS2](https://www.msys2.org)
- Open the MSYS2 prompt by running the newly-created "MSYS2 MSYS" shortcut in your start menu.
- Inside the prompt, run `pacman -Syu`, then close the window when it prompts you to.
- Reopen the MSYS2 prompt and run:
```
pacman -Syu
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make
```
- Modify your `%Path%` to include the newly-installed software. You should include these two paths:
```
C:\msys64\mingw64\bin
C:\msys64\usr\bin
```
- MSVC v142 - VS 2022 C++ x64/x86 build tools
- Windows 10 SDK (latest)
- C++ CMake tools for Windows
- C++/CLI support for v142 build tools
- ![Visual Studio Options][vs options]

#### 🚧 The Procedure Entry Point Could not be Located

Expand Down Expand Up @@ -165,16 +148,13 @@ make build-ios

### Windows

Using the default MSYS2 toolchain:
Using the default MSVC 2022 toolchain (with optional platform builds):

```pwsh
```sh
make build
```

Using the MSVC toolchain:

```pwsh
make build-msvc
make build-arm64
make build-x86
make build-x64
```

## Build Wrappers
Expand All @@ -189,18 +169,12 @@ make build-netstandard

## Test

### Running the C++ and C tests
### Running the C++ and C tests on Windows using the MSVC toolchain

```sh
make test
```

#### Running the tests on Windows using the MSVC toolchain

```sh
make test-msvc
```

### Running the netstandard tests

To run the tests when building for the current host (Linux, Mac, windows:)
Expand All @@ -224,6 +198,12 @@ Then, open Visual studio for Mac and run the `ElectionGuard.Tests.Android` or `E

There is a command line interface in the `./apps/electionguard-cli` folder. This is a tool useful for generating test data and interacting with ElectionGuard.

```sh
make build-cli
make test-cli
make verify
```

## 📄 Documentation

## Contributing
Expand All @@ -240,7 +220,7 @@ Please report any bugs, feature requests, or enhancements using the [GitHub Issu

### Have Questions?

ElectionGuard would love for you to ask questions out in the open using GitHub Discussions. If you really want to email the ElectionGuard team, reach out at electionguard@microsoft.com.
ElectionGuard would love for you to ask questions out in the open using GitHub Discussions.

## License

Expand All @@ -254,9 +234,19 @@ A huge thank you to those who helped to contribute to this project so far, inclu

<a href="https://www.microsoft.com/en-us/research/people/benaloh/"><img src="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/09/avatar_user__1473484671-180x180.jpg" title="Josh Benaloh" width="80" height="80"></a>

**[Michael Naehrig _(Microsoft)_](https://www.microsoft.com/en-us/research/people/mnaehrig/)**

<a href="https://www.microsoft.com/en-us/research/people/mnaehrig/"><img src="https://www.microsoft.com/en-us/research/uploads/prod/2023/09/square_small.jpg" title="Michael Naehrig" width="80" height="80"></a>

**Olivier Pereira _(Microsoft)_**

**[RC Carter _(Election Tech)_](https://www.election.tech/)**

<a href="https://github.com/rc-eti"><img src="https://avatars.githubusercontent.com/u/139162996?v=4" title="rc-eti" width="80" height="80"></a>

**[Steve Maier](https://github.com/SteveMaier-IRT) [_(InfernoRed Technology)_](https://infernored.com/)**

<a href="https://github.com/SteveMaier-IRT"><img src="https://avatars2.githubusercontent.com/u82616727?v=4" title="SteveMaier-IRT" width="80" height="80"></a>
<a href="https://github.com/SteveMaier-IRT"><img src="https://avatars.githubusercontent.com/u/82616727?v=4" title="SteveMaier-IRT" width="80" height="80"></a>

**[Keith Fung](https://github.com/keithrfung) [_(InfernoRed Technology)_](https://infernored.com/)**

Expand Down Expand Up @@ -289,3 +279,4 @@ A huge thank you to those who helped to contribute to this project so far, inclu
[contributing]: https://github.com/microsoft/electionguard-core2/blob/main/CONTRIBUTING.md
[security]: https://github.com/microsoft/electionguard-core2/blob/main/SECURITY.md
[mit license]: https://github.com/microsoft/electionguard-core2/blob/main/LICENSE
[vs options]: https://github.com/microsoft/electionguard-core2/blob/main/images/vs_options.png
6 changes: 3 additions & 3 deletions apps/angular-demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added images/vs_options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6f088b8

Please sign in to comment.