Skip to content

Conversation

@mikekelly
Copy link

Fairly self explanatory. Includes a test case from the main cose repo.

@geonnave
Copy link
Owner

Thank you for the PR! Will take a closer look soon.

Copy link
Owner

@geonnave geonnave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left some comments.

| signature: COSE.Keys.ECDSA.sign(:es256, to_be_signed, private_key)
}
end

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the introduced functions duplicate a fair amount of the body, including sign_encode(:es256 ...), sign(:es256, ...), etc. Could it be improved?

end
end

defmodule COSE.Keys.ECDSA do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for not following defining the key struct here, as in the rest of the library?

defstruct [:kty, :kid, :alg, :key_ops, :base_iv, :k]
end

defmodule ECDSASignature do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case we keep this module (see comment below about struct definition), the name should be COSE.Keys. ECDSASignature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants