Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b90f203
Remove static linking code and dynamic feature flag
nnmkhang Apr 7, 2026
abc3f0c
Fix CI workflows: permissions, remove static steps, lint fixes
nnmkhang Apr 7, 2026
038b28c
Overhaul documentation: merge DEVELOPER.md into CONTRIBUTING.md
nnmkhang Apr 7, 2026
cb5dbad
Bump MSRV to 1.84.0, drop lazy_static, add workspace deps and metadata
nnmkhang Apr 7, 2026
bbc3824
Bump symcrypt version to 0.6.0
nnmkhang Apr 7, 2026
29cf872
Update SymCrypt submodule and references to v103.11.0
nnmkhang Apr 7, 2026
1d06ba0
Regenerate bindings for SymCrypt v103.11.0
nnmkhang Apr 7, 2026
608d55a
Disable Windows CI until Azure host images ship SymCrypt >= v103.11.0
nnmkhang Apr 7, 2026
4663106
Implement std::error::Error for SymCryptError
smalis-msft Apr 23, 2026
29c1e4c
Update build.rs to support OpenVMM use cases (#97)
smalis-msft Apr 24, 2026
c5cbfeb
Merge pull request #95 from smalis-msft/error-error
smalis-msft Apr 24, 2026
050dc7e
User/khangnguyen/sp800 108 kdf (#98)
nnmkhang May 19, 2026
b76fde3
add xts-aes and aes-kw(p) algos (#99)
nnmkhang May 21, 2026
2d83888
fixing 32bit truncation for HKDF and sp800 (#101)
nnmkhang May 22, 2026
c6077cb
Pin GitHub Actions to full-length commit SHAs (#111) (#115)
nnmkhang Aug 26, 2026
beb67eb
User/khangnguyen/release 0.6 review fixes (#116)
nnmkhang Aug 27, 2026
c0247de
fix merge conflicts
nnmkhang Aug 27, 2026
395b866
Pin GitHub Actions to full-length commit SHAs (#111) (#117)
nnmkhang Aug 27, 2026
1e3e704
fix merge conflict
nnmkhang Aug 27, 2026
7eca230
Merge pull request #118 from microsoft/sync/main-into-release-0.6-anc…
nnmkhang Aug 27, 2026
467a3ce
Changing to 103.8 (#119)
nnmkhang Aug 28, 2026
34a384a
Addressing Max's comments (#120)
nnmkhang Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.rs]
indent_style = space
indent_size = 4

[*.{yml,yaml,toml}]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text=auto eol=lf
*.sh text eol=lf
32 changes: 16 additions & 16 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
### Description of Changes:
### Breaking Changes if any:
### ✅ Admin Checklist
- [ ] Review the PR description and ensure all necessary details are included.
- [ ] Update/add unit tests for changed code.
- [ ] Update/add documentation for new or changed APIs.
- [ ] Run `cargo test --all-features` on `Windows` and `WSL`.
Check the Developer Guidelines in [DEVELOPER.md](./DEVELOPER.md) for more info.
### Description of Changes:



### Breaking Changes if any:



### ✅ Admin Checklist
- [ ] PR targets the active `release/X.Y.Z` branch.
- [ ] Review the PR description and ensure all necessary details are included.
- [ ] Update/add unit tests for changed code.
- [ ] Update/add documentation for new or changed APIs.
Comment thread
nnmkhang marked this conversation as resolved.
- [ ] Run `cargo test --all-features` on Windows and WSL.

Check the guidelines in [`CONTRIBUTING.md`](../CONTRIBUTING.md) for more info.
14 changes: 6 additions & 8 deletions .github/workflows/bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [ "main" ]
pull_request:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

Expand All @@ -18,11 +21,11 @@ jobs:
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
os: windows-11-arm
- target: x86_64-unknown-linux-gnu
os: ubuntu-24.04
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04
os: ubuntu-24.04-arm

runs-on: ${{ matrix.os }}
name: Bindgen ${{ matrix.target }}
Expand All @@ -34,12 +37,7 @@ jobs:

- name: Install host target
shell: pwsh
run: |
rustup target add ${{ matrix.target }}
if ("${{ matrix.target }}" -match "aarch64-unknown-linux-gnu") {
sudo apt update
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
}
run: rustup target add ${{ matrix.target }}

- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

Expand Down
148 changes: 71 additions & 77 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,71 @@
name: Build Linux

on:
push:
branches: [ "main" ]
pull_request:

env:
CARGO_TERM_COLOR: always
FEATURES_TO_TEST: md5,sha1,pkcs1-encrypt-decrypt

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
runs-on: ubuntu-latest
run-tests: true
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
runs-on: ubuntu-24.04-arm
run-tests: true

runs-on: ${{ matrix.os }}
name: ${{ matrix.target }}
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: true

- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

# Download SymCrypt via PMC
- name: Install SymCrypt via PMC
shell: bash
run: |
curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y symcrypt

- name: Install host target
shell: pwsh
run: |
rustup target add ${{ matrix.target }}
if ("${{ matrix.target }}" -match "aarch64-unknown-linux-gnu") {
sudo apt update
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
}

- name: Debug build
run: cargo build --locked --verbose --target ${{ matrix.target }}

- name: Release build
run: cargo build --release --locked --verbose --target ${{ matrix.target }}

- name: Run tests (Debug, dynamic)
if: matrix.run-tests
run: cargo test --locked --verbose --all-features --target ${{ matrix.target }}

- name: Run tests (Release, dynamic)
if: matrix.run-tests
run: cargo test --release --locked --verbose --all-features --target ${{ matrix.target }}

- name: Run test (Debug, static)
if: matrix.run-tests
run: cargo test --features ${{ env.FEATURES_TO_TEST }} --locked --target ${{ matrix.target }}

- name: Run test (Release, static)
if: matrix.run-tests
run: cargo test --features ${{ env.FEATURES_TO_TEST }} --locked --target ${{ matrix.target }}
name: Build Linux

on:
push:
branches: [ "main" ]
pull_request:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
FEATURES_TO_TEST: md5,sha1,pkcs1-encrypt-decrypt

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
runs-on: ubuntu-latest
run-tests: true
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
runs-on: ubuntu-24.04-arm
run-tests: true

runs-on: ${{ matrix.os }}
name: ${{ matrix.target }}
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: true

- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

# Download SymCrypt via PMC
- name: Install SymCrypt via PMC
shell: bash
run: |
curl --fail --location --silent --show-error \
--output packages-microsoft-prod.deb \
https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
echo "c13f01ac7c3001b51a9281d40dde666db5e037e05512840c319832f7852bfec4 packages-microsoft-prod.deb" |
sha256sum --check --strict
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y symcrypt

- name: Install target
shell: pwsh
run: rustup target add ${{ matrix.target }}

- name: Debug build
run: cargo build --locked --verbose --target ${{ matrix.target }}

- name: Release build
run: cargo build --release --locked --verbose --target ${{ matrix.target }}

- name: Run tests (Debug)
if: matrix.run-tests
run: cargo test --locked --verbose --all-features --target ${{ matrix.target }}

- name: Run tests (Release)
if: matrix.run-tests
run: cargo test --release --locked --verbose --all-features --target ${{ matrix.target }}
149 changes: 73 additions & 76 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,73 @@
name: Build Windows

on:
push:
branches: [ "main" ]
pull_request:

env:
CARGO_TERM_COLOR: always
FEATURES_TO_TEST: md5,sha1,pkcs1-encrypt-decrypt

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: windows-latest
symcrypt: "https://github.com/microsoft/SymCrypt/releases/download/v103.8.0/symcrypt-windows-amd64-release-103.8.0-53be637d.zip"
run-tests: true
- target: aarch64-pc-windows-msvc
os: windows-latest
runs-on: windows-latest
symcrypt: "https://github.com/microsoft/SymCrypt/releases/download/v103.8.0/symcrypt-windows-arm64-release-103.8.0-53be637d.zip"
run-tests: false # Windows doesn't support ARM64 emulation
runs-on: ${{ matrix.os }}
name: ${{ matrix.target }}
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: true

- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

# Install host architecture, required for cross-compilation since there is no arm64-windows-msvc runner
- name: Install host target
shell: pwsh
run: |
rustup target add ${{ matrix.target }}

- name: Download SymCrypt and Set Environment Variables
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ matrix.symcrypt }} -OutFile symcrypt.zip
New-Item -ItemType Directory -Force -Path symcrypt
Expand-Archive -Path symcrypt.zip -DestinationPath symcrypt
echo "$env:GITHUB_WORKSPACE\symcrypt\dll" >> $env:GITHUB_PATH
echo "SYMCRYPT_LIB_PATH=$env:GITHUB_WORKSPACE\symcrypt\dll" >> $env:GITHUB_ENV
echo "PATH=$env:GITHUB_WORKSPACE\symcrypt\dll;$env:PATH" >> $env:GITHUB_ENV

- name: Debug build
run: cargo build --locked --verbose --target ${{ matrix.target }}

- name: Release build
run: cargo build --release --locked --verbose --target ${{ matrix.target }}

- name: Run tests (Debug, dynamic)
if: matrix.run-tests
run: cargo test --locked --verbose --all-features --target ${{ matrix.target }}

- name: Run tests (Release, dynamic)
if: matrix.run-tests
run: cargo test --release --locked --verbose --all-features --target ${{ matrix.target }}

- name: Run test (Debug, static)
if: matrix.run-tests
run: cargo test --features ${{ env.FEATURES_TO_TEST }} --locked --target ${{ matrix.target }}

- name: Run test (Release, static)
if: matrix.run-tests
run: cargo test --features ${{ env.FEATURES_TO_TEST }} --locked --target ${{ matrix.target }}
name: Build Windows

on:
push:
branches: [ "main" ]
pull_request:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
FEATURES_TO_TEST: md5,sha1,pkcs1-encrypt-decrypt

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-msvc
os: windows-latest
symcrypt: "https://github.com/microsoft/SymCrypt/releases/download/v103.8.0/symcrypt-windows-amd64-release-103.8.0-53be637d.zip"
symcrypt_sha256: "9f57ea2118e8441bef1b6070952ae08f43d0209648009af588143334c7cf58c2"
run-tests: true
- target: aarch64-pc-windows-msvc
os: windows-11-arm
symcrypt: "https://github.com/microsoft/SymCrypt/releases/download/v103.8.0/symcrypt-windows-arm64-release-103.8.0-53be637d.zip"
symcrypt_sha256: "c58bfb0438082422b21290b831e9647dc4faeb2cc8cfb067c6df84b850bcbf11"
run-tests: true

runs-on: ${{ matrix.os }}
name: ${{ matrix.target }}
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: true

- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2

- name: Install target
shell: pwsh
run: rustup target add ${{ matrix.target }}

- name: Download SymCrypt v103.8.0
shell: pwsh
run: |
Invoke-WebRequest -Uri "${{ matrix.symcrypt }}" -OutFile symcrypt.zip
Comment thread
nnmkhang marked this conversation as resolved.
$actualHash = (Get-FileHash -Path symcrypt.zip -Algorithm SHA256).Hash.ToLowerInvariant()
if ($actualHash -ne "${{ matrix.symcrypt_sha256 }}") {
throw "SymCrypt archive checksum mismatch: expected ${{ matrix.symcrypt_sha256 }}, got $actualHash"
}
Expand-Archive -Path symcrypt.zip -DestinationPath symcrypt
"$env:GITHUB_WORKSPACE\symcrypt\dll" >> $env:GITHUB_PATH
"SYMCRYPT_LIB_PATH=$env:GITHUB_WORKSPACE\symcrypt\dll" >> $env:GITHUB_ENV
"PATH=$env:GITHUB_WORKSPACE\symcrypt\dll;$env:PATH" >> $env:GITHUB_ENV

- name: Debug build
run: cargo build --locked --verbose --target ${{ matrix.target }}

- name: Release build
run: cargo build --release --locked --verbose --target ${{ matrix.target }}

- name: Run tests (Debug)
if: matrix.run-tests
run: cargo test --locked --verbose --all-features --target ${{ matrix.target }}

- name: Run tests (Release)
if: matrix.run-tests
run: cargo test --release --locked --verbose --all-features --target ${{ matrix.target }}
Loading
Loading