Skip to content

Commit 47f38de

Browse files
authored
Merge pull request #1 from fil-forge/claude/ucantone-pr-rollout-hdbgac
feat: Attested Signatures + UCAN Principal Clarification
2 parents a7267e4 + 848573a commit 47f38de

4 files changed

Lines changed: 36 additions & 23 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bench-http-header-ucan-size

go.mod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ go 1.25.3
44

55
require (
66
github.com/dustin/go-humanize v1.0.1
7-
github.com/fil-forge/libforge v0.0.0-20260527182359-ebb22552c348
8-
github.com/fil-forge/ucantone v0.0.0-20260617091613-2a31cf8a668a
7+
github.com/fil-forge/libforge v0.0.0-20260701162346-f0706e1641a3
8+
github.com/fil-forge/ucantone v0.0.0-20260702175651-12732483947f
99
github.com/ipfs/go-cid v0.6.1
1010
github.com/multiformats/go-multihash v0.2.3
1111
)
1212

1313
require (
1414
filippo.io/mldsa v0.0.0-20260215214346-43d0283efc3e // indirect
15-
github.com/alanshaw/dag-json-gen v0.0.5 // indirect
15+
github.com/alanshaw/dag-json-gen v0.0.8 // indirect
1616
github.com/gobwas/glob v0.2.3 // indirect
1717
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
1818
github.com/minio/sha256-simd v1.0.1 // indirect
1919
github.com/mr-tron/base58 v1.3.0 // indirect
2020
github.com/multiformats/go-base32 v0.1.0 // indirect
2121
github.com/multiformats/go-base36 v0.2.0 // indirect
2222
github.com/multiformats/go-multibase v0.3.0 // indirect
23+
github.com/multiformats/go-multicodec v0.10.0 // indirect
2324
github.com/multiformats/go-varint v0.1.0 // indirect
2425
github.com/spaolacci/murmur3 v1.1.0 // indirect
2526
github.com/whyrusleeping/cbor-gen v0.3.1 // indirect
@@ -29,5 +30,5 @@ require (
2930
golang.org/x/sys v0.43.0 // indirect
3031
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
3132
lukechampine.com/blake3 v1.4.1 // indirect
32-
pitr.ca/jsontokenizer v0.3.0 // indirect
33+
pitr.ca/jsontokenizer v0.3.2 // indirect
3334
)

go.sum

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
filippo.io/mldsa v0.0.0-20260215214346-43d0283efc3e h1:VsUbObBMxXlc23Eb9VeeJYE4jvTs87qa5RqSN2U5FJU=
22
filippo.io/mldsa v0.0.0-20260215214346-43d0283efc3e/go.mod h1:32qQ5yj3R24Eu03iWFWchdC3OB653wPvoepWejkefbY=
3-
github.com/alanshaw/dag-json-gen v0.0.5 h1:jUOqsTrfZ7ddkBqAsx/xbCeJtpe70jrFL2Z+i4qQB1U=
4-
github.com/alanshaw/dag-json-gen v0.0.5/go.mod h1:rXxWw0SItP9QjxpRMpkju66h0KumF7TPCtvHdOKS5lY=
5-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
6-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/alanshaw/dag-json-gen v0.0.8 h1:Y0SfO2bp9ECDvcNbw6aQ91jmnfLC7UgRDshCeASDfT8=
4+
github.com/alanshaw/dag-json-gen v0.0.8/go.mod h1:v1YBZcS4B355MqxtyQr+fGNbEhm0CzHd+gOqOO/MZ+I=
5+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
6+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
77
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
88
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
9-
github.com/fil-forge/libforge v0.0.0-20260527182359-ebb22552c348 h1:roYe4llNv0fpQnvXMontrdt/hy9kH5K/cnNsXmhqId4=
10-
github.com/fil-forge/libforge v0.0.0-20260527182359-ebb22552c348/go.mod h1:1ytnrneNEeJcskEbsRDtNZY/Jvgo2Yw5szIUI/9EWPk=
11-
github.com/fil-forge/ucantone v0.0.0-20260617091613-2a31cf8a668a h1:YseKVffr1pb4ywV4r/7WWJYuUegrdfT8KAo4CyH/+YM=
12-
github.com/fil-forge/ucantone v0.0.0-20260617091613-2a31cf8a668a/go.mod h1:KrnXLXUFxSUqXGbTrlOvPeiILnbVQl5Un3TA8q9uiAQ=
9+
github.com/fil-forge/libforge v0.0.0-20260701162346-f0706e1641a3 h1:/EDxpbuVeSXH3FLF7MK4G4wrDUFmCO9fLQHL23RZ2uU=
10+
github.com/fil-forge/libforge v0.0.0-20260701162346-f0706e1641a3/go.mod h1:0kXihIQ4L2uZ00nR5XrZ/Y8Db7Ht/qQNuiWslwMJ95M=
11+
github.com/fil-forge/ucantone v0.0.0-20260702175651-12732483947f h1:nDqQIz28mYWEe0ITH9TLf1JTIcY37MxwrSNm4Ey5PlY=
12+
github.com/fil-forge/ucantone v0.0.0-20260702175651-12732483947f/go.mod h1:mPfEboTQwtNIChdbPbLnbWA38fVdD0PfQ3kgc46vYY0=
1313
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
1414
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
1515
github.com/ipfs/go-cid v0.6.1 h1:T5TnNb08+ueovG76Z5gx1L4Y7QOaGTXHg1F6raWFxIc=
@@ -28,12 +28,14 @@ github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9
2828
github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4=
2929
github.com/multiformats/go-multibase v0.3.0 h1:8helZD2+4Db7NNWFiktk2NePbF0boolBe6bDQvM4r68=
3030
github.com/multiformats/go-multibase v0.3.0/go.mod h1:MoBLQPCkRTOL3eveIPO81860j2AQY8JwcnNlRkGRUfI=
31+
github.com/multiformats/go-multicodec v0.10.0 h1:UpP223cig/Cx8J76jWt91njpK3GTAO1w02sdcjZDSuc=
32+
github.com/multiformats/go-multicodec v0.10.0/go.mod h1:wg88pM+s2kZJEQfRCKBNU+g32F5aWBEjyFHXvZLTcLI=
3133
github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=
3234
github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM=
3335
github.com/multiformats/go-varint v0.1.0 h1:i2wqFp4sdl3IcIxfAonHQV9qU5OsZ4Ts9IOoETFs5dI=
3436
github.com/multiformats/go-varint v0.1.0/go.mod h1:5KVAVXegtfmNQQm/lCY+ATvDzvJJhSkUlGQV9wgObdI=
35-
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
36-
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
37+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
38+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3739
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
3840
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
3941
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
@@ -54,5 +56,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
5456
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5557
lukechampine.com/blake3 v1.4.1 h1:I3Smz7gso8w4/TunLKec6K2fn+kyKtDxr/xcQEN84Wg=
5658
lukechampine.com/blake3 v1.4.1/go.mod h1:QFosUxmjB8mnrWFSNwKmvxHpfY72bmD2tQ0kBMM3kwo=
57-
pitr.ca/jsontokenizer v0.3.0 h1:Qr70hk4/wcpFEgu/6aJ+nvYQ6x/xS0WOkC627ceiI/M=
58-
pitr.ca/jsontokenizer v0.3.0/go.mod h1:3DJdA2QNOU6cI0XkH6pRKZ4Oe8G5SDRUQ6PFAwaQ3YY=
59+
pitr.ca/jsontokenizer v0.3.2 h1:kzsKwfkWPV5XCmAF//hznh3L9IXbiL8aHbI0FswRkCs=
60+
pitr.ca/jsontokenizer v0.3.2/go.mod h1:3DJdA2QNOU6cI0XkH6pRKZ4Oe8G5SDRUQ6PFAwaQ3YY=

main.go

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,33 @@ import (
77
"github.com/dustin/go-humanize"
88
contentcmds "github.com/fil-forge/libforge/commands/content"
99
"github.com/fil-forge/ucantone/did"
10-
"github.com/fil-forge/ucantone/principal/ed25519"
11-
"github.com/fil-forge/ucantone/principal/mldsa44"
12-
"github.com/fil-forge/ucantone/principal/secp256k1"
10+
"github.com/fil-forge/ucantone/multikey/ed25519"
11+
"github.com/fil-forge/ucantone/multikey/mldsa44"
12+
"github.com/fil-forge/ucantone/multikey/secp256k1"
1313
"github.com/fil-forge/ucantone/ucan"
1414
"github.com/fil-forge/ucantone/ucan/container"
1515
"github.com/fil-forge/ucantone/ucan/invocation"
1616
"github.com/ipfs/go-cid"
1717
mh "github.com/multiformats/go-multihash"
1818
)
1919

20-
func generateSigner(name string) (ucan.Signer, error) {
20+
// generateSigner produces a UCAN Issuer (a signer bound to a Principal) for the
21+
// named key type. Under the post-PR#30 API a bare ucan.Signer is no longer a
22+
// Principal and has no DID; the identities this benchmark delegates and invokes
23+
// with must be ucan.Issuers, so we construct one via each multikey package's
24+
// GenerateIssuer helper (which pairs a freshly generated signer with its
25+
// did:key). Defaults to ed25519.
26+
//
27+
// mldsa44 (post-quantum ML-DSA-44) comes from ucantone's new multikey/mldsa44
28+
// package, reinstated on the post-#30 layout in fil-forge/ucantone#37.
29+
func generateSigner(name string) (ucan.Issuer, error) {
2130
switch name {
2231
case "mldsa44":
23-
return mldsa44.Generate()
32+
return mldsa44.GenerateIssuer()
2433
case "secp256k1":
25-
return secp256k1.Generate()
34+
return secp256k1.GenerateIssuer()
2635
}
27-
return ed25519.Generate()
36+
return ed25519.GenerateIssuer()
2837
}
2938

3039
func main() {

0 commit comments

Comments
 (0)