Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refs: Change support for different signature schemes #203

Merged
merged 2 commits into from
Mar 2, 2022

Conversation

cthulhu-rider
Copy link
Contributor

Remove UNSPECIFIED value from SignatureScheme enum. Make
ECDSA_SHA512 to be default signature scheme (zero value).

Define SignatureRFC6979 type for RFC-6979 signatures. Use it in
Container service.

Signed-off-by: Leonard Lyubich [email protected]

@cthulhu-rider cthulhu-rider self-assigned this Mar 2, 2022
cthulhu-rider pushed a commit to cthulhu-rider/neofs-api that referenced this pull request Mar 2, 2022
Remove `UNSPECIFIED` value from `SignatureScheme` enum. Make
`ECDSA_SHA512` to be default signature scheme (zero value).

Define `SignatureRFC6979` type for RFC-6979 signatures. Use it in
`Container` service.

Signed-off-by: Leonard Lyubich <[email protected]>
Leonard Lyubich added 2 commits March 2, 2022 12:34
Remove `UNSPECIFIED` value from `SignatureScheme` enum. Make
`ECDSA_SHA512` to be default signature scheme (zero value).

Define `SignatureRFC6979` type for RFC-6979 signatures. Use it in
`Container` service.

Signed-off-by: Leonard Lyubich <[email protected]>
Copy link
Contributor

@alexvanin alexvanin left a comment

Choose a reason for hiding this comment

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

Seems good. I will update release after we test that with api-go \ sdk \ http-gw integration.

refs/types.proto Show resolved Hide resolved
@ZhangTao1596
Copy link

May I ask why we need SignatureRFC6979 since we already have ECDSA_RFC6979_SHA256 scheme in Signature?

@alexvanin
Copy link
Contributor

Signature message allows to specify any supported scheme. That implies that message can be signed using ECDSA_RFC6979_SHA256 or ECDSA_SHA512. Both are okay.

It is not true for container creation operation. Container creation operation requires only ECDSA_RFC6979_SHA256 (because signature is verified in smart contract, smart contract can't verify ECDSA_SHA512).

To stress that in protocol, we have separate SignatureRFC6979 message that, by definition, expects ECDSA_RFC6979_SHA256 signature. This message is used in container service.

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.

4 participants