Skip to content
This repository was archived by the owner on Nov 29, 2021. It is now read-only.
This repository was archived by the owner on Nov 29, 2021. It is now read-only.

ECKFTag methods are misnamed? #197

@fiadliel

Description

@fiadliel

Some comments on methods in ECKFTag:

buildPrivateKeyFromPoint/unsafeBuildPrivateKeyFromPoint delegate to java.security.spec.ECPrivateKeySpec, and the parameter passed is "the private value S". This is a secret value, not a point, so the method are misnamed.

unsafeBuildPublicKeyFromPoints delegates to java.security.spec.ECPublicKeySpec, and the parameters passed in are the affine x-coordinate and affine y-coordinate of the public point of the curve. Since we are passing in the coordinates of a single point, not multiple points, this method is also misnamed.

One more thing to note: there is a lack of symmetry between buildPublicKey and unsafeBuildPublicKeyFromPoints, since in most other cases, unsafe is appended to another method name without any other changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions