Skip to content

Migration from gopkg.in dedis crypto.v0

Jeff R. Allen edited this page Dec 18, 2017 · 3 revisions

Migration from v0

The repository was renamed from github.com/dedis/crypto to github.com/dedis/kyber.

The current master is essentially a large clean up of the v0 version, with significant API changes but not semantic changes. Thus significant changes are required, but generally code that worked before still works the same way once it compiles again.

  • All references to abstract.XXX are now moved up to the top level kyber.XXX. For example, v1 uses now kyber.Group instead of abstract.Group.

  • kyber.Suite does not exist anymore. Now each package should declare its own top level package Suite interface declaring the functionalities needed by the package. One example is the share/vss package:

        // Suite defines the capabilities required by the vss package.
        type Suite interface {
            kyber.Group
            kyber.HashFactory
        }
  • Hash() hash.Hash is now kyber.HashFactory.

  • The order of arguments for Point.Mul() has changed. It now follows the mathematical additive notation with the scalar in front: Mul(kyber.Scalar, kyber.Point) kyber.Point

  • The Cipher interface and implementations have been replaced by the XOF interface and implementations.

  • Some packages, structs and methods have been renamed:

    • ed25519 to group/edwards25519
    • config/KeyPair to util/key/Pair
    • proof/DLEQProof -> proof/dleq/Proof
  • Many utility functions have been moved to util/, and some have been removed entirely.

Change Log

Here is a detailed list of things that changed:

- moved:
    - all examples from top level to examples/
    - all abstract/*go to top level
    - ed25519/, edwards/ and nist/ to group/
    - former nist/int.go to group/mod/int.go
    - eddsa to sign/eddsa
    - anon to sign/anon
    - cosi to sign/cosi
    - sign/schnorr.go to sign/schnorr/schnorr.go
    - math/{jacobi,sqrt} to group/mod/
    - config/key.go - the KeyPair struct + methods - to /util/key/
    - hash/ to util/hash
    - ints/ints.go to util/ints/ints.go
    - util/{reverse,grow,replace} to util/bytes/
    - group/encoding.go to util/encoding/encoding.go
    - subtle/ to util/subtle
    - random to util/random
    - test/ inside util/test
    - clique/clique.go to proof/clique.go 
    - proof/dleq.go -> proof/dleq/dleq.go
    - anon/keypair() hiding -> util/key/GenHiding() 

- removed:
    - abstract
    - base64
    - clique
    - pbc
    - openssl
    - sodium
    - nego
    - poly
    - suites
    - config/file,
    - gofmt.sh
    - GO-WISHLIST

- Changed order of arguments for `Point.Mul()`. It now follows the
  mathematical additive notation with the scalar in front:
    -> `Mul(kyber.Scalar, kyber.Point) kyber.Point`. 
- Added `AllowVerTime` method to `Scalar` and `Point` that may use a variable time
  implementation if available. Added kyber.AllowsVarTime interface to let you detect when variable time implementations are available at runtime.
- commented out the dh_test.go which is not up-to-date anymore
- taken onet/crypto/key{_test}.go to kyber/util/encoding
    + Removed abstract.Suite, only taking kyber.Group now
- new package group/internal/marshalling for `{Read,Write}{Scalar,Point}` used by all
  suite implementations.
- changed ed25519 new curve function so there's no fullGroup boolean anymore.
Clone this wiki locally