Commit Graph

7 Commits (98147489583cf0963a9a860c83bc2736ca4ce3a5)

Author SHA1 Message Date
Leonard Lyubich d109594d75 [#157] util/signature: Revive removed features
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 09:39:21 +03:00
Leonard Lyubich a292150d42 [#157] signature: Change scheme selection
`SignData`: use `ECDSAWithSHA512` by default. `SignWithRFC6979` option
switches the scheme to `RFC6979WithSHA256`.

`VerifyData`: if scheme is not fixed (like by `SignWithRFC6979` option)
then scheme from the message is processed.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 09:39:21 +03:00
Evgenii Stratonikov d716765c1a [#150] util/signature: Simplify public interface
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-25 12:42:38 +03:00
Evgenii Stratonikov 1c7dd03cf5 [#150] signature: Add scheme
Allow `SignOption` to set 2 parameters:
1. Default signature scheme, which is used in case scheme is
   unspecified.
2. Restrict scheme option which also checks that scheme is either
   unspecified or equal to the restricted scheme. This is only used
   for verification and is necessary because some of the signatures
   are used in smart-contracts.

Also provide signature struct to sign/verify functions in helpers.

The constant names differ a bit from those in API because of linter
complaints.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-25 12:42:38 +03:00
Denis Kirillov 2806d90089 [#93] Remove golang.org/x/crypto dependency
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-12-14 15:27:04 +03:00
Evgenii Stratonikov a2d342e928 [#87] go.mod: remove neo-go dependency
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-22 15:40:13 +03:00
Evgenii Stratonikov 1feafcbcbf [#53] util: move signature package from neofs-api-go
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-08 12:39:45 +03:00