EQTY LabDocs

Install on Windows and WSL

Install the Windows service from the MSI with TPM-backed keys, verify its identity credential, and run the Linux notary inside WSL on the host's TPM.

View as Markdown

On Windows the notary runs as the EqtyNotary service with its keys in the TPM through the Platform Crypto Provider, the key storage Windows Hello and Credential Guard use. Its identity credential is a TPM quote with the TCG boot log, so a verifier can read Secure Boot state and the code-integrity policies in force at boot. You need:

  • Windows 11, or Windows 10 21H2 or later, with a TPM 2.0 that is on and ready. Get-Tpm should report TpmPresent : True and TpmReady : True.
  • An elevated PowerShell.

1. Install

Download eqty-notary-{{VERSION}}-x64.msi and setup.ps1 from the vcomp-notary-desktop release, then from an elevated PowerShell:

powershell
powershell -ExecutionPolicy Bypass -File .\setup.ps1 -Msi .\eqty-notary-{{VERSION}}-x64.msi

The script checks the TPM, installs the MSI silently, waits for /v1/isReady, and runs eqty-notary-verify on the new identity credential. The MSI installs:

PathWhat
C:\Program Files\EQTY\Notary\eqty-notary.exeThe daemon, registered as the EqtyNotary service with its own service SID, restart on failure, and --auto-register
eqty-notary-verify.exe, on PATHThe offline credential verifier
C:\ProgramData\EQTY\Notary\attestation\The identity credential and its evidence
C:\ProgramData\EQTY\Notary\logs\The service log and the per-process audit logs
C:\ProgramData\Microsoft\Crypto\PCPKSP\Where the Platform Crypto Provider keeps the TPM-wrapped key blobs, DACL’d to the service SID

The service listens on 127.0.0.1:8066 and the well-known 100.100.100.200:8066. There is no local socket yet, and eqty-notaryctl does not build on Windows, so the HTTP API is the whole interface.

2. Check it

powershell
Get-Service EqtyNotary
Get-Content C:\ProgramData\EQTY\Notary\logs\notary.log -Tail 15
(Invoke-WebRequest -UseBasicParsing http://127.0.0.1:8066/v1/isReady).Content

Within a second of starting, the log shows notary SK ready (PCP), created the notary AK under the SRK on the first start only, identity credential written (VCompTpmV1, …), ETW process observer up, two TCP listener up lines and WSL bridge up. /v1/isReady answers {"state":"READY","status":"ready"}.

3. Sign with the EQTY SDK

powershell
python -m pip install eqty-sdk
python .\tests\sdk_smoke.py --export C:\work\smoke-manifest.json

The smoke test is in the repository’s tests/. Expect PASS eqty-sdk 2.5.0: caller DID and dataset registration. The log shows python.exe being auto-registered, its key minted in the TPM, and a VCompProcessV1 issued for it. Run it on the machine itself: attribution maps the TCP connection to a local process, so it does not work through SSH port forwarding.

4. Verify the identity credential

powershell
eqty-notary-verify C:\ProgramData\EQTY\Notary\attestation\latest\credential.json

eqty-notary-verify checks the manifest offline: every blob and statement against its CID, every credential’s proof, the TPM quote, the AK’s TPM2_Certify of the signing key, and the TCG boot log replayed to the quoted PCRs and then read: Secure Boot, ntoskrnl.exe, CI.dll and the code-integrity policies.

Exit codeMeaning
0Everything checked passed
2Nothing failed, but something could not be checked, such as the EK certificate’s issuer without --ek-root
1A check failed

It also reads Linux and WSL manifests, which carry no boot log. It builds on any OS with cargo build -p notary-verify.

Pin the notary with App Control (optional)

Windows has no IMA, so nothing measures a service binary. It does measure every code-integrity policy in force into PCR 13 at boot. setup.ps1 -AppControl Enforce builds a policy that allows Windows’ own code plus the installed notary by hash, deploys it, and keeps a copy under C:\ProgramData\EQTY\Notary\appcontrol\. After a reboot, a verifier can check it was in force from the quote alone:

powershell
eqty-notary-verify <credential.json> --policy C:\ProgramData\EQTY\Notary\appcontrol\{policy-id}.cip

5. The notary in WSL

The Linux notary runs unchanged inside WSL 2, with its eBPF observer and BPF LSM key guard, except that WSL has no TPM. Its keys are created and used in the Windows TPM, through the Windows service, over a Hyper-V socket. The host issues the WSL notary a VCompWslV1 credential, so a manifest from inside WSL carries the whole chain: the host’s VCompTpmV1, the guest’s VCompWslV1, and the VCompProcessV1 for the process that signed.

text
 Windows 11                                   WSL 2 (Ubuntu)
┌──────────────────────────────────────┐     ┌──────────────────────────────┐
│ python.exe ──TCP 127.0.0.1:8066──▶    │     │ python3 ──TCP 127.0.0.1:8066─▶│
│   EqtyNotary service                 │     │   eqty-notary (systemd)      │
│   PCP keys in the TPM, ETW observer  │◀────│   eBPF observer, key guard   │
│   VCompTpmV1 identity (TPM quote)    │ vsock│   keys: the host's, over the│
│   WSL bridge: issues VCompWslV1      │ 8066 │   bridge                     │
└──────────────────────────────────────┘     └──────────────────────────────┘

Part 1 must be running. Keep WSL’s networking on NAT, the default: with networkingMode=mirrored, WSL’s 127.0.0.1:8066 is the Windows notary’s, so the WSL notary cannot listen there, and WSL programs reach the Windows notary, which refuses them because it cannot tell which process they are.

  1. Install WSL and Ubuntu, then check systemd is on inside it (grep -A1 boot /etc/wsl.conf shows systemd=true; Ubuntu 24.04 has it by default):

    powershell
    wsl --install -d Ubuntu-24.04 --web-download
    wsl -d Ubuntu-24.04
  2. Build the notary inside the distribution. A binary built against a newer glibc will not run here, and building under /mnt/c is much slower than in the Linux filesystem:

    sh
    sudo apt-get update
    sudo apt-get install -y build-essential clang llvm libbpf-dev pkg-config git curl
    curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
    source ~/.cargo/env
    git clone git@github.com:eqtylab-RND/vcomp-notary-desktop.git ~/notary
    cd ~/notary
    FEATURES=bpf,backend-hyperv-host,observer-linux ./build.sh --rs-only

    --rs-only uses the BPF objects committed in the repository; rebuilding them needs a bpftool that runs on WSL’s kernel.

  3. Install and start it:

    sh
    sudo --preserve-env=WSL_DISTRO_NAME bash windows/wsl/install-guest.sh "$PWD"

    The script installs the binary and BPF objects, the shipped Linux unit, and a drop-in that clears what WSL lacks (the TPM device, the Key Guardian URL, the tss group), names the distribution so the host scopes this distribution’s keys, and orders the unit after securityfs so the key guard can load. --preserve-env keeps WSL_DISTRO_NAME, which sudo would otherwise drop.

  4. Check it, in WSL:

    sh
    systemctl status eqty-notary
    journalctl -u eqty-notary -b -o cat | grep -E "key-guard|guest SK"
    curl -s http://127.0.0.1:8066/v1/isReady

    Expect BPF LSM key-guard active, guest SK ready (held by the Windows host's TPM) and READY. The Windows log shows WSL guest notary connected … distro=Ubuntu-24.04 and issued WSL guest notary credential (VCompWslV1). The guest’s DID stays the same across wsl --shutdown, although WSL’s VM id changes every time.

  5. Sign from Python inside WSL:

    sh
    sudo apt-get install -y python3-venv
    python3 -m venv ~/sdk && ~/sdk/bin/pip install eqty-sdk
    ~/sdk/bin/python ~/notary/tests/sdk_smoke.py --export /tmp/wsl-smoke-manifest.json

Two limits of the WSL part: keys are scoped by distribution name, not by Windows user, so two Windows users with a distribution of the same name share keys. And everything about the guest except its VM id is guest-reported; the VCompWslV1 says evidenceLevel: guest-reported, and anyone who can run wsl -u root can replace the guest notary.

Logs and files

WindowsWSL
Service logC:\ProgramData\EQTY\Notary\logs\notary.logjournalctl -u eqty-notary
Per-process audit logsC:\ProgramData\EQTY\Notary\logs\/var/log/eqty-notary/
Identity credentialC:\ProgramData\EQTY\Notary\attestation\latest\credential.jsonFrom the host, through /v1/credential
KeysThe Platform Crypto Provider, C:\ProgramData\Microsoft\Crypto\PCPKSP\The host’s, named eqty.notary.wsl.<distro>.*
SettingsThe service’s Environment registry valueThe unit’s Environment= lines and the drop-in

Uninstall

powershell
powershell -ExecutionPolicy Bypass -File .\setup.ps1 -Msi .\eqty-notary-{{VERSION}}-x64.msi -Uninstall

Keys and state are kept, so a reinstall comes back with the same DID. In WSL: sudo systemctl disable --now eqty-notary, then remove the unit, its drop-in and /usr/local/bin/eqty-notary.