Skip to content

Commit

Permalink
Clean up readme, dockerfile (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
chunter-cb authored Feb 24, 2025
1 parent 65a5ec1 commit 1c658fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tools/pcr0-verifier/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN amazon-linux-extras enable aws-nitro-enclaves-cli && \
yum clean all

COPY --from=op-enclave /app/bundle/rootfs/build/eif.bin /app/eif.bin
COPY extract-pcr0.sh /extract-pcr0.sh
RUN chmod +x /extract-pcr0.sh
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/extract-pcr0.sh"]
ENTRYPOINT ["/entrypoint.sh"]
10 changes: 5 additions & 5 deletions tools/pcr0-verifier/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PCR0 Extractor
# PCR0 Verifier

This tool extracts the PCR0 measurement from an op-enclave EIF (Enclave Image Format) file. The PCR0 measurement is a cryptographic hash that represents the initial state of the enclave, which is crucial for attestation and verification purposes.

Expand All @@ -9,14 +9,14 @@ This tool extracts the PCR0 measurement from an op-enclave EIF (Enclave Image Fo

## Building and Running

1. Build the PCR0 extractor container:
1. Build the PCR0 verifier container:
```bash
docker build -t pcr0-extractor .
docker build -t pcr0-verifier .
```

2. Run the container to extract the PCR0:
```bash
docker run --rm pcr0-extractor
docker run --rm pcr0-verifier
```

The tool will:
Expand Down Expand Up @@ -48,4 +48,4 @@ The output will include both the raw PCR0 measurement and instructions for verif

## Note

The PCR0 measurement is specific to the version of the op-enclave EIF being examined. The current version being used is specified in the Dockerfile as `TAG=v0.0.1-rc5`.
The PCR0 measurement is specific to the version of the op-enclave EIF being examined. The current version being used is specified in the Dockerfile as `TAG=v0.0.1-rc5`. You can perform the same measurement on other EIF files by modifying the Dockerfile.
2 changes: 1 addition & 1 deletion tools/pcr0-verifier/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ echo -e "\n# Then run these commands to verify:"
echo "# To register a new PCR0 (requires owner access):"
echo "cast send \$SYSTEM_CONFIG_GLOBAL_ADDRESS 'registerPCR0(bytes)' ${PCR0_WITH_PREFIX} --rpc-url \$RPC_URL"
echo -e "\n# To check if a PCR0 is valid:"
echo "cast call \$SYSTEM_CONFIG_GLOBAL_ADDRESS 'validPCR0s(bytes32)' 0x\$(cast keccak \${PCR0}) --rpc-url \$RPC_URL"
echo "cast call \$SYSTEM_CONFIG_GLOBAL_ADDRESS 'validPCR0s(bytes32)' \$(cast keccak ${PCR0_WITH_PREFIX}) --rpc-url \$RPC_URL"

0 comments on commit 1c658fc

Please sign in to comment.