Skip to content

Commit 1c658fc

Browse files
authored
Clean up readme, dockerfile (#77)
1 parent 65a5ec1 commit 1c658fc

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

tools/pcr0-verifier/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ RUN amazon-linux-extras enable aws-nitro-enclaves-cli && \
4141
yum clean all
4242

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

47-
ENTRYPOINT ["/extract-pcr0.sh"]
47+
ENTRYPOINT ["/entrypoint.sh"]

tools/pcr0-verifier/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PCR0 Extractor
1+
# PCR0 Verifier
22

33
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.
44

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

1010
## Building and Running
1111

12-
1. Build the PCR0 extractor container:
12+
1. Build the PCR0 verifier container:
1313
```bash
14-
docker build -t pcr0-extractor .
14+
docker build -t pcr0-verifier .
1515
```
1616

1717
2. Run the container to extract the PCR0:
1818
```bash
19-
docker run --rm pcr0-extractor
19+
docker run --rm pcr0-verifier
2020
```
2121

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

4949
## Note
5050

51-
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`.
51+
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.

tools/pcr0-verifier/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ echo -e "\n# Then run these commands to verify:"
1717
echo "# To register a new PCR0 (requires owner access):"
1818
echo "cast send \$SYSTEM_CONFIG_GLOBAL_ADDRESS 'registerPCR0(bytes)' ${PCR0_WITH_PREFIX} --rpc-url \$RPC_URL"
1919
echo -e "\n# To check if a PCR0 is valid:"
20-
echo "cast call \$SYSTEM_CONFIG_GLOBAL_ADDRESS 'validPCR0s(bytes32)' 0x\$(cast keccak \${PCR0}) --rpc-url \$RPC_URL"
20+
echo "cast call \$SYSTEM_CONFIG_GLOBAL_ADDRESS 'validPCR0s(bytes32)' \$(cast keccak ${PCR0_WITH_PREFIX}) --rpc-url \$RPC_URL"

0 commit comments

Comments
 (0)