Skip to content

x/crypto/curve25519: consider removing dependency on "fmt" if worthwhile #48154

Closed
@dmitshur

Description

@dmitshur

The curve25519 package imports fmt and uses it 3 times:

return nil, fmt.Errorf("bad scalar length: %d, expected %d", l, 32)
return nil, fmt.Errorf("bad point length: %d, expected %d", l, 32)
return nil, fmt.Errorf("bad input point: low order point")

If it makes sense to remove fmt, then the golang.org/x/crypto/curve25519 can be moved in go/build.TestDependencies from:

# CRYPTO-MATH is core bignum-based crypto - no cgo, net; fmt now ok.

To:

# CRYPTO is core crypto algorithms - no cgo, fmt, net.

Similarly to how crypto/ed25519/internal/edwards25519 was moved in CL 276272.

@FiloSottile, do you think doing so would be worthwhile?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions