rename the package to ucan-wg/go-dit-it

This commit is contained in:
Michael Muré
2025-07-10 15:56:45 +02:00
parent 0b255ea35b
commit b44cf50620
57 changed files with 159 additions and 177 deletions

View File

@@ -3,15 +3,15 @@ package allkeys
import (
"fmt"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/ed25519"
helpers "github.com/INFURA/go-did/crypto/internal"
"github.com/INFURA/go-did/crypto/p256"
"github.com/INFURA/go-did/crypto/p384"
"github.com/INFURA/go-did/crypto/p521"
"github.com/INFURA/go-did/crypto/rsa"
"github.com/INFURA/go-did/crypto/secp256k1"
"github.com/INFURA/go-did/crypto/x25519"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/ed25519"
helpers "github.com/ucan-wg/go-did-it/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto/p256"
"github.com/ucan-wg/go-did-it/crypto/p384"
"github.com/ucan-wg/go-did-it/crypto/p521"
"github.com/ucan-wg/go-did-it/crypto/rsa"
"github.com/ucan-wg/go-did-it/crypto/secp256k1"
"github.com/ucan-wg/go-did-it/crypto/x25519"
)
var decoders = map[uint64]func(b []byte) (crypto.PublicKey, error){

View File

@@ -10,7 +10,7 @@ import (
"github.com/multiformats/go-varint"
"github.com/stretchr/testify/require"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
type TestHarness[PubT crypto.PublicKey, PrivT crypto.PrivateKey] struct {

View File

@@ -3,8 +3,8 @@ package ed25519
import (
"testing"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/_testsuite"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
)
var harness = testsuite.TestHarness[PublicKey, PrivateKey]{

View File

@@ -8,7 +8,7 @@ import (
"golang.org/x/crypto/cryptobyte"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
var _ crypto.PrivateKeySigningBytes = &PrivateKey{}

View File

@@ -9,8 +9,8 @@ import (
"golang.org/x/crypto/cryptobyte"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/internal"
)
var _ crypto.PublicKeySigningBytes = PublicKey{}

View File

@@ -5,14 +5,14 @@ import (
"encoding/json"
"fmt"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/ed25519"
"github.com/INFURA/go-did/crypto/p256"
"github.com/INFURA/go-did/crypto/p384"
"github.com/INFURA/go-did/crypto/p521"
"github.com/INFURA/go-did/crypto/rsa"
"github.com/INFURA/go-did/crypto/secp256k1"
"github.com/INFURA/go-did/crypto/x25519"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/ed25519"
"github.com/ucan-wg/go-did-it/crypto/p256"
"github.com/ucan-wg/go-did-it/crypto/p384"
"github.com/ucan-wg/go-did-it/crypto/p521"
"github.com/ucan-wg/go-did-it/crypto/rsa"
"github.com/ucan-wg/go-did-it/crypto/secp256k1"
"github.com/ucan-wg/go-did-it/crypto/x25519"
)
type PrivateJwk struct {

View File

@@ -5,14 +5,14 @@ import (
"encoding/json"
"fmt"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/ed25519"
"github.com/INFURA/go-did/crypto/p256"
"github.com/INFURA/go-did/crypto/p384"
"github.com/INFURA/go-did/crypto/p521"
"github.com/INFURA/go-did/crypto/rsa"
"github.com/INFURA/go-did/crypto/secp256k1"
"github.com/INFURA/go-did/crypto/x25519"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/ed25519"
"github.com/ucan-wg/go-did-it/crypto/p256"
"github.com/ucan-wg/go-did-it/crypto/p384"
"github.com/ucan-wg/go-did-it/crypto/p521"
"github.com/ucan-wg/go-did-it/crypto/rsa"
"github.com/ucan-wg/go-did-it/crypto/secp256k1"
"github.com/ucan-wg/go-did-it/crypto/x25519"
)
// Specification:

View File

@@ -6,8 +6,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/_testsuite"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
)
var harness = testsuite.TestHarness[*PublicKey, *PrivateKey]{

View File

@@ -9,7 +9,7 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
var _ crypto.PrivateKeySigningBytes = &PrivateKey{}

View File

@@ -8,8 +8,8 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
helpers "github.com/INFURA/go-did/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto"
helpers "github.com/ucan-wg/go-did-it/crypto/internal"
)
var _ crypto.PublicKeySigningBytes = &PublicKey{}

View File

@@ -3,8 +3,8 @@ package p384
import (
"testing"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/_testsuite"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
)
var harness = testsuite.TestHarness[*PublicKey, *PrivateKey]{

View File

@@ -9,7 +9,7 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
var _ crypto.PrivateKeySigningBytes = &PrivateKey{}

View File

@@ -8,8 +8,8 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
helpers "github.com/INFURA/go-did/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto"
helpers "github.com/ucan-wg/go-did-it/crypto/internal"
)
var _ crypto.PublicKeySigningBytes = &PublicKey{}

View File

@@ -3,8 +3,8 @@ package p521
import (
"testing"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/_testsuite"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
)
var harness = testsuite.TestHarness[*PublicKey, *PrivateKey]{

View File

@@ -9,7 +9,7 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
var _ crypto.PrivateKeySigningBytes = &PrivateKey{}

View File

@@ -8,8 +8,8 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
helpers "github.com/INFURA/go-did/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto"
helpers "github.com/ucan-wg/go-did-it/crypto/internal"
)
var _ crypto.PublicKeySigningBytes = &PublicKey{}

View File

@@ -5,7 +5,7 @@ import (
"crypto/rsa"
"fmt"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
const (

View File

@@ -6,8 +6,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/_testsuite"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
)
var harness2048 = testsuite.TestHarness[*PublicKey, *PrivateKey]{

View File

@@ -9,7 +9,7 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
var _ crypto.PrivateKeySigningASN1 = &PrivateKey{}

View File

@@ -8,8 +8,8 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
helpers "github.com/INFURA/go-did/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto"
helpers "github.com/ucan-wg/go-did-it/crypto/internal"
)
var _ crypto.PublicKeySigningASN1 = &PublicKey{}

View File

@@ -6,8 +6,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/_testsuite"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
)
var harness = testsuite.TestHarness[*PublicKey, *PrivateKey]{

View File

@@ -9,7 +9,7 @@ import (
"github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
"github.com/INFURA/go-did/crypto"
"github.com/ucan-wg/go-did-it/crypto"
)
var _ crypto.PrivateKeySigningBytes = &PrivateKey{}

View File

@@ -9,8 +9,8 @@ import (
"github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
"github.com/INFURA/go-did/crypto"
helpers "github.com/INFURA/go-did/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto"
helpers "github.com/ucan-wg/go-did-it/crypto/internal"
)
var _ crypto.PublicKeySigningBytes = &PublicKey{}

View File

@@ -5,8 +5,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/INFURA/go-did/crypto/_testsuite"
"github.com/INFURA/go-did/crypto/ed25519"
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
"github.com/ucan-wg/go-did-it/crypto/ed25519"
)
var harness = testsuite.TestHarness[*PublicKey, *PrivateKey]{

View File

@@ -7,8 +7,8 @@ import (
"encoding/pem"
"fmt"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/ed25519"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/ed25519"
)
var _ crypto.PrivateKeyKeyExchange = (*PrivateKey)(nil)

View File

@@ -7,9 +7,9 @@ import (
"fmt"
"math/big"
"github.com/INFURA/go-did/crypto"
"github.com/INFURA/go-did/crypto/ed25519"
helpers "github.com/INFURA/go-did/crypto/internal"
"github.com/ucan-wg/go-did-it/crypto"
"github.com/ucan-wg/go-did-it/crypto/ed25519"
helpers "github.com/ucan-wg/go-did-it/crypto/internal"
)
var _ crypto.PublicKey = (*PublicKey)(nil)