From 6e5c88d194d1e155f2770e027c1186a739af452d Mon Sep 17 00:00:00 2001 From: Dmitriy Kinoshenko Date: Wed, 21 Oct 2020 18:41:42 +0300 Subject: [PATCH] feat: BbsBlsSignature2020 LDP suite for VC closes #2221 Signed-off-by: Dmitriy Kinoshenko --- cmd/aries-agent-mobile/go.mod | 6 +- cmd/aries-agent-mobile/go.sum | 18 +--- cmd/aries-agent-rest/go.mod | 2 + cmd/aries-agent-rest/go.sum | 6 ++ cmd/aries-js-worker/go.mod | 5 +- .../public_key_verifier.go | 18 ++++ .../public_key_verifier_test.go | 59 +++++++++++ .../signature/verifier/public_key_verifier.go | 36 +++++++ .../verifier/public_key_verifier_test.go | 48 +++++++++ pkg/doc/verifiable/credential_ldp_test.go | 65 +++++++++++++ pkg/doc/verifiable/embedded_proof.go | 7 +- pkg/doc/verifiable/embedded_proof_test.go | 19 ++++ .../verifiable/example_presentation_test.go | 3 +- pkg/doc/verifiable/support_test.go | 7 ++ .../testdata/context/bss2020.jsonld | 97 +++++++++++++++++++ .../testdata/context/citizenship.jsonld | 54 +++++++++++ test/bdd/go.mod | 2 + test/bdd/go.sum | 6 +- 18 files changed, 437 insertions(+), 21 deletions(-) create mode 100644 pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier.go create mode 100644 pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier_test.go create mode 100644 pkg/doc/verifiable/testdata/context/bss2020.jsonld create mode 100644 pkg/doc/verifiable/testdata/context/citizenship.jsonld diff --git a/cmd/aries-agent-mobile/go.mod b/cmd/aries-agent-mobile/go.mod index 0f7f7a3ed..9d34d8b0f 100644 --- a/cmd/aries-agent-mobile/go.mod +++ b/cmd/aries-agent-mobile/go.mod @@ -14,4 +14,8 @@ require ( nhooyr.io/websocket v1.8.3 ) -replace github.com/hyperledger/aries-framework-go => ../../ +replace ( + github.com/hyperledger/aries-framework-go => ../../ + github.com/kilic/bls12-381 => github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef + github.com/phoreproject/bls => github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc +) diff --git a/cmd/aries-agent-mobile/go.sum b/cmd/aries-agent-mobile/go.sum index 967da0d04..010bfa5c6 100644 --- a/cmd/aries-agent-mobile/go.sum +++ b/cmd/aries-agent-mobile/go.sum @@ -52,7 +52,6 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -86,7 +85,6 @@ github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8 github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.10.0 h1:92XGj1AcYzA6UrVdd4qIIBrT8OroryvRvdmg/IfmC7Y= github.com/klauspost/compress v1.10.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -120,7 +118,6 @@ github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= github.com/piprate/json-gold v0.3.0 h1:a1vHx7Q1jOO1pjCtKwTI/WCzwaQwRt9VM7apK2uy200= github.com/piprate/json-gold v0.3.0/go.mod h1:OK1z7UgtBZk06n2cDE2OSq1kffmjFFp5/2yhLLCz9UM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -141,10 +138,12 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/teserakt-io/golang-ed25519 v0.0.0-20200315192543-8255be791ce4 h1:Sq/68UWgBzKT+pLTUTkSf0jS2IUwwXLFlZmeh+nAzQM= github.com/teserakt-io/golang-ed25519 v0.0.0-20200315192543-8255be791ce4/go.mod h1:9PdLyPiZIiW3UopXyRnPYyjUXSpiQNHRLu8fOsR3o8M= +github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc h1:312UsgPy3LxPl3dM+OrjQ6M2ymLcVTXIp+6wdDWkSY8= +github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= +github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef h1:nZF/RNtWszq+WD8+p7blxWsWJjiTgdGQ1rv2IEffLj8= +github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -180,7 +179,6 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de h1:OVJ6QQUBAesB8CZijKDSsXX7xYVtUhrkY0gwMfbi4p4= golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -195,8 +193,6 @@ golang.org/x/net v0.0.0-20190326090315-15845e8f865b/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201009032441-dbdefad45b89 h1:1GKfLldebiSdhTlt3nalwrb7L40Tixr/0IH+kSbRgmk= -golang.org/x/net v0.0.0-20201009032441-dbdefad45b89/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -213,7 +209,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025090151-53bf42e6b339/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 h1:bNEHhJCnrwMKNMmOx3yAynp5vs5/gRy+XWFtZFu7NBM= golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -221,8 +216,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -237,7 +230,6 @@ golang.org/x/tools v0.0.0-20190325223049-1d95b17f1b04/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69 h1:yBHHx+XZqXJBm6Exke3N7V9gnlsyXxoCPEb1yVenjfk= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -263,8 +255,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/cmd/aries-agent-rest/go.mod b/cmd/aries-agent-rest/go.mod index 71b802ce5..8b9505e61 100644 --- a/cmd/aries-agent-rest/go.mod +++ b/cmd/aries-agent-rest/go.mod @@ -7,6 +7,8 @@ module github.com/hyperledger/aries-framework-go/cmd/aries-agent-rest replace ( github.com/hyperledger/aries-framework-go => ../.. github.com/hyperledger/aries-framework-go/component/storage/leveldb => ../../component/storage/leveldb + github.com/kilic/bls12-381 => github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef + github.com/phoreproject/bls => github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc ) require ( diff --git a/cmd/aries-agent-rest/go.sum b/cmd/aries-agent-rest/go.sum index 79cb8ce37..cc52aae78 100644 --- a/cmd/aries-agent-rest/go.sum +++ b/cmd/aries-agent-rest/go.sum @@ -125,6 +125,7 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22 github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391 h1:51kHw7l/dUDdOdW06AlUGT5jnpj6nqQSILebcsikSjA= github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -169,6 +170,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844 h1:Yflyn+XFLEu7RPzxovgEVLP6Es8JLJrHqdXunpm2ak4= github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= github.com/piprate/json-gold v0.3.0 h1:a1vHx7Q1jOO1pjCtKwTI/WCzwaQwRt9VM7apK2uy200= github.com/piprate/json-gold v0.3.0/go.mod h1:OK1z7UgtBZk06n2cDE2OSq1kffmjFFp5/2yhLLCz9UM= @@ -224,6 +226,10 @@ github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpP github.com/teserakt-io/golang-ed25519 v0.0.0-20200315192543-8255be791ce4 h1:Sq/68UWgBzKT+pLTUTkSf0jS2IUwwXLFlZmeh+nAzQM= github.com/teserakt-io/golang-ed25519 v0.0.0-20200315192543-8255be791ce4/go.mod h1:9PdLyPiZIiW3UopXyRnPYyjUXSpiQNHRLu8fOsR3o8M= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc h1:312UsgPy3LxPl3dM+OrjQ6M2ymLcVTXIp+6wdDWkSY8= +github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= +github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef h1:nZF/RNtWszq+WD8+p7blxWsWJjiTgdGQ1rv2IEffLj8= +github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= diff --git a/cmd/aries-js-worker/go.mod b/cmd/aries-js-worker/go.mod index 7b87291bc..067cd801d 100644 --- a/cmd/aries-js-worker/go.mod +++ b/cmd/aries-js-worker/go.mod @@ -14,9 +14,10 @@ require ( github.com/stretchr/testify v1.6.1 ) -replace github.com/hyperledger/aries-framework-go => ../../ - replace ( + github.com/hyperledger/aries-framework-go => ../../ github.com/hyperledger/aries-framework-go/component/storage/jsindexeddb => ../../component/storage/jsindexeddb github.com/piprate/json-gold => github.com/trustbloc/json-gold v0.3.1-0.20200414173446-30d742ee949e + github.com/kilic/bls12-381 => github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef + github.com/phoreproject/bls => github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc ) diff --git a/pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier.go b/pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier.go new file mode 100644 index 000000000..74de49047 --- /dev/null +++ b/pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier.go @@ -0,0 +1,18 @@ +/* +Copyright SecureKey Technologies Inc. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 +*/ + +package bbsblssignature2020 + +import "github.com/hyperledger/aries-framework-go/pkg/doc/signature/verifier" + +const g2PubKeyType = "Bls12381G2Key2020" + +// NewG2PublicKeyVerifier creates a signature verifier that verifies a BbsBlsSignature2020 signature +// taking Bls12381G2Key2020 public key bytes as input. +func NewG2PublicKeyVerifier() *verifier.PublicKeyVerifier { + return verifier.NewPublicKeyVerifier(verifier.NewBBSG2SignatureVerifier(), + verifier.WithExactPublicKeyType(g2PubKeyType)) +} diff --git a/pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier_test.go b/pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier_test.go new file mode 100644 index 000000000..a72836e42 --- /dev/null +++ b/pkg/doc/signature/suite/bbsblssignature2020/public_key_verifier_test.go @@ -0,0 +1,59 @@ +/* +Copyright SecureKey Technologies Inc. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 +*/ + +package bbsblssignature2020 + +import ( + "encoding/base64" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/hyperledger/aries-framework-go/pkg/doc/jose" + sigverifier "github.com/hyperledger/aries-framework-go/pkg/doc/signature/verifier" +) + +//nolint:lll +func TestNewG2PublicKeyVerifier(t *testing.T) { + verifier := NewG2PublicKeyVerifier() + + pkBase64 := "lOpN7uGZWivVIjs0325N/V0dAhoPomrgfXVpg7pZNdRWwFwJDVxoE7TvRyOx/Qr7GMtShNuS2Px/oScD+SMf08t8eAO78QRNErPzwNpfkP4ppcSTShStFDfFbsv9L9yb" + pkBytes, err := base64.RawStdEncoding.DecodeString(pkBase64) + require.NoError(t, err) + + sigBase64 := "hPbLkeMZZ6KKzkjWoTVHeMeuLJfYWjmdAU1Vg5fZ/VZnIXxxeXBB+q0/EL8XQmWkOMMwEGA/D2dCb4MDuntKZpvHEHlvaFR6l1A4bYj0t2Jd6bYwGwCwirNbmSeIoEmJeRzJ1cSvsL+jxvLixdDPnw==" + sigBytes, err := base64.StdEncoding.DecodeString(sigBase64) + require.NoError(t, err) + + msg := ` +message1 +message2 +` + + err = verifier.Verify(&sigverifier.PublicKey{ + Type: "Bls12381G2Key2020", + Value: pkBytes, + }, []byte(msg), sigBytes) + require.NoError(t, err) + + err = verifier.Verify(&sigverifier.PublicKey{ + Type: "NotBls12381G2Key2020", + Value: pkBytes, + }, []byte(msg), sigBytes) + require.Error(t, err) + require.EqualError(t, err, "a type of public key is not 'Bls12381G2Key2020'") + + // Failed as we do not support JWK for Bls12381G2Key2020. + err = verifier.Verify(&sigverifier.PublicKey{ + Type: "Bls12381G2Key2020", + JWK: &jose.JWK{ + Kty: "EC", + Crv: "BLS12381_G2", + }, + }, []byte(msg), sigBytes) + require.Error(t, err) + require.EqualError(t, err, "verifier does not match JSON Web Key") +} diff --git a/pkg/doc/signature/verifier/public_key_verifier.go b/pkg/doc/signature/verifier/public_key_verifier.go index 923eba3d0..41c968293 100644 --- a/pkg/doc/signature/verifier/public_key_verifier.go +++ b/pkg/doc/signature/verifier/public_key_verifier.go @@ -16,10 +16,12 @@ import ( "errors" "fmt" "math/big" + "strings" "github.com/btcsuite/btcd/btcec" gojose "github.com/square/go-jose/v3" + "github.com/hyperledger/aries-framework-go/pkg/doc/bbs/bbs12381g2pub" "github.com/hyperledger/aries-framework-go/pkg/doc/jose" ) @@ -370,6 +372,40 @@ func NewECDSAES521SignatureVerifier() *ECDSASignatureVerifier { } } +// NewBBSG2SignatureVerifier creates a new BBSG2SignatureVerifier. +func NewBBSG2SignatureVerifier() *BBSG2SignatureVerifier { + return &BBSG2SignatureVerifier{} +} + +// BBSG2SignatureVerifier is a signature verifier that verifies a BBS+ Signature +// taking Bls12381G2Key2020 public key bytes as input. +// The reference implementation https://github.com/mattrglobal/bls12381-key-pair supports public key bytes only, +// JWK is not supported. +type BBSG2SignatureVerifier struct { + baseSignatureVerifier +} + +// Verify verifies the signature. +func (v *BBSG2SignatureVerifier) Verify(pubKeyValue *PublicKey, doc, signature []byte) error { + bbs := bbs12381g2pub.New() + + return bbs.Verify(v.splitMessageIntoLines(string(doc)), signature, pubKeyValue.Value) +} + +func (v *BBSG2SignatureVerifier) splitMessageIntoLines(msg string) [][]byte { + rows := strings.Split(msg, "\n") + + msgs := make([][]byte, 0, len(rows)) + + for i := range rows { + if strings.TrimSpace(rows[i]) != "" { + msgs = append(msgs, []byte(rows[i])) + } + } + + return msgs +} + type ellipticCurve struct { curve elliptic.Curve keySize int diff --git a/pkg/doc/signature/verifier/public_key_verifier_test.go b/pkg/doc/signature/verifier/public_key_verifier_test.go index 839abe42a..157539cbc 100644 --- a/pkg/doc/signature/verifier/public_key_verifier_test.go +++ b/pkg/doc/signature/verifier/public_key_verifier_test.go @@ -10,6 +10,7 @@ import ( "crypto" "crypto/ed25519" "crypto/elliptic" + "encoding/base64" "errors" "testing" @@ -368,6 +369,53 @@ func TestNewECDSAES256SignatureVerifier(t *testing.T) { }) } +//nolint:lll +func TestNewBBSG2SignatureVerifier(t *testing.T) { + pkBase64 := "h/rkcTKXXzRbOPr9UxSfegCbid2U/cVNXQUaKeGF7UhwrMJFP70uMH0VQ9+3+/2zDPAAjflsdeLkOXW3+ShktLxuPy8UlXSNgKNmkfb+rrj+FRwbs13pv/WsIf+eV66+" + pkBytes, err := base64.RawStdEncoding.DecodeString(pkBase64) + require.NoError(t, err) + + sigBase64 := `o/79UazZRsf3y35mZ8kT6hx2M2R1fGgj2puotSqeLiha5MGRmqHLx1JAQsG3JlJeW5n56Gg+xUKaDPfzyimi0V9ECloPIBJY+dIMjQE15PFAk+/wtnde9QY8cZOmTIiI56HuN6DwADIzo3BLwkL2RQ==` + sigBytes, err := base64.StdEncoding.DecodeString(sigBase64) + require.NoError(t, err) + + msg := ` +_:c14n0 "2020-10-07T16:38:09Z"^^ . +_:c14n0 . +_:c14n0 . +_:c14n0 . + "1958-07-17"^^ . + "SMITH" . + "Male" . + "JOHN" . + . + . + . + "Bahamas" . + "C1" . + "C09" . + "999-999-999" . + "2015-01-01"^^ . + "Government of Example Permanent Resident Card." . + "83627465" . + "Permanent Resident Card" . + . + . + . + "2029-12-03T12:19:52Z"^^ . + "2019-12-03T12:19:52Z"^^ . + . +` + + verifier := NewBBSG2SignatureVerifier() + err = verifier.Verify(&PublicKey{ + Type: "Bls12381G2Key2020", + Value: pkBytes, + }, []byte(msg), sigBytes) + + require.NoError(t, err) +} + type testSignatureVerifier struct { baseSignatureVerifier diff --git a/pkg/doc/verifiable/credential_ldp_test.go b/pkg/doc/verifiable/credential_ldp_test.go index dbf8157c5..7eaf06502 100644 --- a/pkg/doc/verifiable/credential_ldp_test.go +++ b/pkg/doc/verifiable/credential_ldp_test.go @@ -23,6 +23,7 @@ import ( "github.com/hyperledger/aries-framework-go/pkg/doc/jose" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/jsonld" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite" + "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/bbsblssignature2020" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/ecdsasecp256k1signature2019" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/ed25519signature2018" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/jsonwebsignature2020" @@ -444,6 +445,70 @@ func TestExtraContextWithLDP(t *testing.T) { r.NotNil(vcWithLdp) } +//nolint:lll +func TestParseCredentialFromLinkedDataProof_BbsBlsSignature2020(t *testing.T) { + r := require.New(t) + + vcJSON := ` +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/citizenship/v1", + "https://w3c-ccg.github.io/ldp-bbs2020/context/v1" + ], + "id": "https://issuer.oidp.uscis.gov/credentials/83627465", + "type": [ + "VerifiableCredential", + "PermanentResidentCard" + ], + "issuer": "did:example:489398593", + "identifier": "83627465", + "name": "Permanent Resident Card", + "description": "Government of Example Permanent Resident Card.", + "issuanceDate": "2019-12-03T12:19:52Z", + "expirationDate": "2029-12-03T12:19:52Z", + "credentialSubject": { + "id": "did:example:b34ca6cd37bbf23", + "type": [ + "PermanentResident", + "Person" + ], + "givenName": "JOHN", + "familyName": "SMITH", + "gender": "Male", + "image": "data:image/png;base64,iVBORw0KGgokJggg==", + "residentSince": "2015-01-01", + "lprCategory": "C09", + "lprNumber": "999-999-999", + "commuterClassification": "C1", + "birthCountry": "Bahamas", + "birthDate": "1958-07-17" + }, + "proof": { + "type": "BbsBlsSignature2020", + "created": "2020-10-07T16:38:09Z", + "proofPurpose": "assertionMethod", + "proofValue": "o/79UazZRsf3y35mZ8kT6hx2M2R1fGgj2puotSqeLiha5MGRmqHLx1JAQsG3JlJeW5n56Gg+xUKaDPfzyimi0V9ECloPIBJY+dIMjQE15PFAk+/wtnde9QY8cZOmTIiI56HuN6DwADIzo3BLwkL2RQ==", + "verificationMethod": "did:example:489398593#test" + } +} +` + + sigSuite := bbsblssignature2020.New( + suite.WithVerifier(bbsblssignature2020.NewG2PublicKeyVerifier())) + pkBase64 := "h/rkcTKXXzRbOPr9UxSfegCbid2U/cVNXQUaKeGF7UhwrMJFP70uMH0VQ9+3+/2zDPAAjflsdeLkOXW3+ShktLxuPy8UlXSNgKNmkfb+rrj+FRwbs13pv/WsIf+eV66+" + pkBytes, err := base64.RawStdEncoding.DecodeString(pkBase64) + r.NoError(err) + + vc, err := parseTestCredential([]byte(vcJSON), + WithEmbeddedSignatureSuites(sigSuite), + WithPublicKeyFetcher(SingleKey(pkBytes, "Bls12381G2Key2020")), + ) + + r.NoError(err) + r.NotNil(vc) +} + func TestParseCredentialFromLinkedDataProof_JsonWebSignature2020_Ed25519(t *testing.T) { r := require.New(t) diff --git a/pkg/doc/verifiable/embedded_proof.go b/pkg/doc/verifiable/embedded_proof.go index e1b4982be..aa7ddea56 100644 --- a/pkg/doc/verifiable/embedded_proof.go +++ b/pkg/doc/verifiable/embedded_proof.go @@ -12,6 +12,7 @@ import ( "github.com/hyperledger/aries-framework-go/pkg/doc/signature/jsonld" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite" + "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/bbsblssignature2020" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/ecdsasecp256k1signature2019" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/ed25519signature2018" "github.com/hyperledger/aries-framework-go/pkg/doc/signature/suite/jsonwebsignature2020" @@ -22,6 +23,7 @@ const ( ed25519Signature2018 = "Ed25519Signature2018" jsonWebSignature2020 = "JsonWebSignature2020" ecdsaSecp256k1Signature2019 = "EcdsaSecp256k1Signature2019" + bbsBlsSignature2020 = "BbsBlsSignature2020" ) func getProofType(proofMap map[string]interface{}) (string, error) { @@ -32,7 +34,7 @@ func getProofType(proofMap map[string]interface{}) (string, error) { proofTypeStr := safeStringValue(proofType) switch proofTypeStr { - case ed25519Signature2018, jsonWebSignature2020, ecdsaSecp256k1Signature2019: + case ed25519Signature2018, jsonWebSignature2020, ecdsaSecp256k1Signature2019, bbsBlsSignature2020: return proofTypeStr, nil default: return "", fmt.Errorf("unsupported proof type: %s", proofType) @@ -115,6 +117,9 @@ func getSuites(proofs []map[string]interface{}, opts *embeddedProofCheckOpts) ([ case ecdsaSecp256k1Signature2019: ldpSuites = append(ldpSuites, ecdsasecp256k1signature2019.New( suite.WithVerifier(ecdsasecp256k1signature2019.NewPublicKeyVerifier()))) + case bbsBlsSignature2020: + ldpSuites = append(ldpSuites, bbsblssignature2020.New( + suite.WithVerifier(bbsblssignature2020.NewG2PublicKeyVerifier()))) } } } diff --git a/pkg/doc/verifiable/embedded_proof_test.go b/pkg/doc/verifiable/embedded_proof_test.go index 8833f6041..aafba9a44 100644 --- a/pkg/doc/verifiable/embedded_proof_test.go +++ b/pkg/doc/verifiable/embedded_proof_test.go @@ -200,3 +200,22 @@ func Test_checkEmbeddedProof(t *testing.T) { r.Nil(docBytes) }) } + +func Test_getSuites(t *testing.T) { + createProofOfTypeFunc := func(suiteType string) map[string]interface{} { + return map[string]interface{}{ + "type": suiteType, + } + } + + proofs := []map[string]interface{}{ + createProofOfTypeFunc(ed25519Signature2018), + createProofOfTypeFunc(jsonWebSignature2020), + createProofOfTypeFunc(ecdsaSecp256k1Signature2019), + createProofOfTypeFunc(bbsBlsSignature2020), + } + + suites, err := getSuites(proofs, &embeddedProofCheckOpts{}) + require.NoError(t, err) + require.Len(t, suites, 4) +} diff --git a/pkg/doc/verifiable/example_presentation_test.go b/pkg/doc/verifiable/example_presentation_test.go index 4cc0fb5ce..7d71c29ef 100644 --- a/pkg/doc/verifiable/example_presentation_test.go +++ b/pkg/doc/verifiable/example_presentation_test.go @@ -687,7 +687,8 @@ func ExamplePresentation_AddLinkedDataProof() { return nil, errors.New("unsupported issuer") }), - verifiable.WithPresEmbeddedSignatureSuites(ed25519Suite)) + verifiable.WithPresEmbeddedSignatureSuites(ed25519Suite), + verifiable.WithPresJSONLDDocumentLoader(getJSONLDDocumentLoader())) if err != nil { panic(fmt.Errorf("failed to decode VP JWS: %w", err)) } diff --git a/pkg/doc/verifiable/support_test.go b/pkg/doc/verifiable/support_test.go index bfe570b35..7a98fb452 100644 --- a/pkg/doc/verifiable/support_test.go +++ b/pkg/doc/verifiable/support_test.go @@ -264,6 +264,13 @@ func createTestJSONLDDocumentLoader() *ld.CachingDocumentLoader { "https://trustbloc.github.io/context/vc/presentation-exchange-submission-v1.jsonld", "presentation_submission_v1.jsonld") + addJSONLDCachedContextFromFile(loader, + "https://w3c-ccg.github.io/ldp-bbs2020/context/v1", + "bss2020.jsonld") + addJSONLDCachedContextFromFile(loader, + "https://w3id.org/citizenship/v1", + "citizenship.jsonld") + return loader } diff --git a/pkg/doc/verifiable/testdata/context/bss2020.jsonld b/pkg/doc/verifiable/testdata/context/bss2020.jsonld new file mode 100644 index 000000000..18c676437 --- /dev/null +++ b/pkg/doc/verifiable/testdata/context/bss2020.jsonld @@ -0,0 +1,97 @@ +{ + "@context": { + "@version": 1.1, + "id": "@id", + "type": "@type", + "ldssk": "https://w3c-ccg.github.io/ldp-bbs2020/context/v1#", + "BbsBlsSignature2020": { + "@id": "https://w3c-ccg.github.io/ldp-bbs2020/context/v1#BbsBlsSignature2020", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "sec": "https://w3id.org/security#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "challenge": "sec:challenge", + "created": { + "@id": "http://purl.org/dc/terms/created", + "@type": "xsd:dateTime" + }, + "domain": "sec:domain", + "proofValue": "sec:proofValue", + "nonce": "sec:nonce", + "proofPurpose": { + "@id": "sec:proofPurpose", + "@type": "@vocab", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "sec": "https://w3id.org/security#", + "assertionMethod": { + "@id": "sec:assertionMethod", + "@type": "@id", + "@container": "@set" + }, + "authentication": { + "@id": "sec:authenticationMethod", + "@type": "@id", + "@container": "@set" + } + } + }, + "verificationMethod": { + "@id": "sec:verificationMethod", + "@type": "@id" + } + } + }, + "BbsBlsSignatureProof2020": { + "@id": "https://w3c-ccg.github.io/ldp-bbs2020/context/v1#BbsBlsSignatureProof2020", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "sec": "https://w3id.org/security#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "challenge": "sec:challenge", + "created": { + "@id": "http://purl.org/dc/terms/created", + "@type": "xsd:dateTime" + }, + "domain": "sec:domain", + "nonce": "sec:nonce", + "proofPurpose": { + "@id": "sec:proofPurpose", + "@type": "@vocab", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "sec": "https://w3id.org/security#", + "assertionMethod": { + "@id": "sec:assertionMethod", + "@type": "@id", + "@container": "@set" + }, + "authentication": { + "@id": "sec:authenticationMethod", + "@type": "@id", + "@container": "@set" + } + } + }, + "proofValue": "sec:proofValue", + "verificationMethod": { + "@id": "sec:verificationMethod", + "@type": "@id" + } + } + }, + "Bls12381G2Key2020": "ldssk:Bls12381G2Key2020" + } +} \ No newline at end of file diff --git a/pkg/doc/verifiable/testdata/context/citizenship.jsonld b/pkg/doc/verifiable/testdata/context/citizenship.jsonld new file mode 100644 index 000000000..4c8e0aefe --- /dev/null +++ b/pkg/doc/verifiable/testdata/context/citizenship.jsonld @@ -0,0 +1,54 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + + "name": "http://schema.org/name", + "description": "http://schema.org/description", + "identifier": "http://schema.org/identifier", + "image": {"@id": "http://schema.org/image", "@type": "@id"}, + + "PermanentResidentCard": { + "@id": "https://w3id.org/citizenship#PermanentResidentCard", + "@context": { + "@version": 1.1, + "@protected": true, + + "id": "@id", + "type": "@type", + + "description": "http://schema.org/description", + "name": "http://schema.org/name", + "identifier": "http://schema.org/identifier", + "image": {"@id": "http://schema.org/image", "@type": "@id"} + } + }, + + "PermanentResident": { + "@id": "https://w3id.org/citizenship#PermanentResident", + "@context": { + "@version": 1.1, + "@protected": true, + + "id": "@id", + "type": "@type", + + "ctzn": "https://w3id.org/citizenship#", + "schema": "http://schema.org/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + + "birthCountry": "ctzn:birthCountry", + "birthDate": {"@id": "schema:birthDate", "@type": "xsd:dateTime"}, + "commuterClassification": "ctzn:commuterClassification", + "familyName": "schema:familyName", + "gender": "schema:gender", + "givenName": "schema:givenName", + "lprCategory": "ctzn:lprCategory", + "lprNumber": "ctzn:lprNumber", + "residentSince": {"@id": "ctzn:residentSince", "@type": "xsd:dateTime"} + } + }, + + "Person": "http://schema.org/Person" + } +} diff --git a/test/bdd/go.mod b/test/bdd/go.mod index 4e9ec84d1..4ca1ea6e3 100644 --- a/test/bdd/go.mod +++ b/test/bdd/go.mod @@ -32,5 +32,7 @@ require ( replace ( github.com/hyperledger/aries-framework-go => ../.. github.com/hyperledger/aries-framework-go/component/storage/leveldb => ../../component/storage/leveldb + github.com/kilic/bls12-381 => github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef + github.com/phoreproject/bls => github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc golang.org/x/sys => golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 ) diff --git a/test/bdd/go.sum b/test/bdd/go.sum index aa763855e..e7060ded0 100644 --- a/test/bdd/go.sum +++ b/test/bdd/go.sum @@ -180,7 +180,6 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22 github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -252,7 +251,6 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ github.com/otiai10/mint v1.3.0 h1:Ady6MKVezQwHBkGzLFbrsywyp09Ah7rkmfjV3Bcr5uc= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= github.com/piprate/json-gold v0.3.0 h1:a1vHx7Q1jOO1pjCtKwTI/WCzwaQwRt9VM7apK2uy200= github.com/piprate/json-gold v0.3.0/go.mod h1:OK1z7UgtBZk06n2cDE2OSq1kffmjFFp5/2yhLLCz9UM= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -314,6 +312,10 @@ github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpP github.com/teserakt-io/golang-ed25519 v0.0.0-20200315192543-8255be791ce4 h1:Sq/68UWgBzKT+pLTUTkSf0jS2IUwwXLFlZmeh+nAzQM= github.com/teserakt-io/golang-ed25519 v0.0.0-20200315192543-8255be791ce4/go.mod h1:9PdLyPiZIiW3UopXyRnPYyjUXSpiQNHRLu8fOsR3o8M= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc h1:312UsgPy3LxPl3dM+OrjQ6M2ymLcVTXIp+6wdDWkSY8= +github.com/trustbloc/bls v0.0.0-20201008085849-81064514c3cc/go.mod h1:xHJKf2TLXUA39Dhv8k5QmQOxLsbrb1KeTS/3ERfLeqc= +github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef h1:nZF/RNtWszq+WD8+p7blxWsWJjiTgdGQ1rv2IEffLj8= +github.com/trustbloc/bls12-381 v0.0.0-20201008080608-ba2e87ef05ef/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/trustbloc/edge-core v0.1.4-0.20200709143857-e104bb29f6c6 h1:GlzMPygeehW/W8tq2vBiN6DLsTFY5xtvQysu1aqqGoQ= github.com/trustbloc/edge-core v0.1.4-0.20200709143857-e104bb29f6c6/go.mod h1:SZg7nAIc9FONS+G7MwEyGkCWCJR3R02bePwTpWxqH5w= github.com/trustbloc/sidetree-core-go v0.1.5-0.20201006193409-11b061380f5b h1:2iCsl09MuOAnpphBNHI/wgHeSK38Jt0A8n1yWYrVF2I=