Skip to content

Commit e6b4168

Browse files
committed
debt: Updated notes to reflect latest signature verification steps
1 parent cb2fa02 commit e6b4168

2 files changed

Lines changed: 33 additions & 13 deletions

File tree

.goreleaser.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,33 +106,34 @@ checksum:
106106
name_template: 'checksums.txt'
107107

108108
# Ref: https://goreleaser.com/customization/sign/
109+
# Ref: https://goreleaser.com/blog/cosign-v3/
109110
signs:
110111
- id: source
111112
cmd: cosign
112113
stdin: '{{ .Env.COSIGN_PASSWORD }}'
113114
output: true
114115
artifacts: source
116+
signature: "${artifact}.sigstore.json"
115117
args:
116118
- sign-blob
117119
- --yes
118120
- --key
119121
- env://COSIGN_PRIVATE_KEY
120-
- '--output-certificate=${certificate}'
121-
- '--output-signature=${signature}'
122+
- "--bundle=${signature}"
122123
- '${artifact}'
123124

124125
- id: checksums
125126
cmd: cosign
126127
stdin: '{{ .Env.COSIGN_PASSWORD }}'
127128
output: true
128129
artifacts: checksum
130+
signature: "${artifact}.sigstore.json"
129131
args:
130132
- sign-blob
131133
- --yes
132134
- --key
133135
- env://COSIGN_PRIVATE_KEY
134-
- '--output-certificate=${certificate}'
135-
- '--output-signature=${signature}'
136+
- "--bundle=${signature}"
136137
- '${artifact}'
137138

138139
# Ref: https://goreleaser.com/customization/source/

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,46 @@ For a detailed mapping between the implementation and NIST SP 800-90A requiremen
109109
To verify the integrity of the release tarball, you can use Cosign to check the signature and checksums. Follow these steps:
110110

111111
```sh
112-
# Fetch the latest release tag from GitHub API (e.g., "v1.9.0")
112+
# Fetch the latest release tag from GitHub API (e.g., "v1.13.0")
113113
TAG=$(curl -s https://api.github.com/repos/sixafter/aes-ctr-drbg/releases/latest | jq -r .tag_name)
114114

115-
# Remove leading "v" for filenames (e.g., "v1.9.0" -> "1.9.0")
115+
# Remove leading "v" for filenames (e.g., "v1.13.0" -> "1.13.0")
116116
VERSION=${TAG#v}
117117

118-
# Verify the release tarball
118+
# ---------------------------------------------------------------------
119+
# Verify the source archive using Sigstore bundles
120+
# ---------------------------------------------------------------------
121+
122+
# Download the release tarball and its corresponding bundle
123+
curl -LO https://github.com/sixafter/aes-ctr-drbg/releases/download/${TAG}/aes-ctr-drbg-${VERSION}.tar.gz
124+
curl -LO https://github.com/sixafter/aes-ctr-drbg/releases/download/${TAG}/aes-ctr-drbg-${VERSION}.tar.gz.bundle.json
125+
126+
# Verify the tarball with Cosign using your published public key
119127
cosign verify-blob \
120128
--key https://raw.githubusercontent.com/sixafter/aes-ctr-drbg/main/cosign.pub \
121-
--signature aes-ctr-drbg-${VERSION}.tar.gz.sig \
122-
aes-ctr-drbg-${VERSION}.tar.gz
129+
--bundle aes-ctr-drbg-${VERSION}.tar.gz.bundle.json \
130+
prng-chacha-${VERSION}.tar.gz
131+
132+
# ---------------------------------------------------------------------
133+
# Verify the checksums manifest using Sigstore bundles
134+
# ---------------------------------------------------------------------
123135

124-
# Download checksums.txt and its signature from the latest release assets
136+
# Download checksums.txt and its bundle
125137
curl -LO https://github.com/sixafter/aes-ctr-drbg/releases/download/${TAG}/checksums.txt
126-
curl -LO https://github.com/sixafter/aes-ctr-drbg/releases/download/${TAG}/checksums.txt.sig
138+
curl -LO https://github.com/sixafter/aes-ctr-drbg/releases/download/${TAG}/checksums.txt.bundle.json
127139

128-
# Verify checksums.txt with cosign
140+
# Verify checksums.txt with Cosign using your public key
129141
cosign verify-blob \
130142
--key https://raw.githubusercontent.com/sixafter/aes-ctr-drbg/main/cosign.pub \
131-
--signature checksums.txt.sig \
143+
--bundle checksums.txt.bundle.json \
132144
checksums.txt
145+
146+
# ---------------------------------------------------------------------
147+
# Confirm local artifact integrity
148+
# ---------------------------------------------------------------------
149+
150+
# Compute and validate checksums locally
151+
shasum -a 256 -c checksums.txt
133152
```
134153

135154
If valid, Cosign will output:

0 commit comments

Comments
 (0)