[#190] Refactor cryptographic functionality

Remove `signature` and `util/signature` packages. Re-implement their
functionality in new `crypto` package. Generalize the approach of
digital signature computation and verification by adding `Signer` and
`PublicKey` primitives similar to standard `crypto` package. Support
already exising in protocol signature schemes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-04-05 14:13:34 +03:00 committed by LeL
parent 2deaaeef05
commit ea043f4ca3
33 changed files with 728 additions and 627 deletions

11
crypto/ecdsa/doc.go Normal file
View file

@ -0,0 +1,11 @@
/*
Package neofsecdsa collects ECDSA primitives for NeoFS cryptography.
Signer and PublicKey provide corresponding interfaces from neofscrypto package.
Package import causes registration of next signature schemes via neofscrypto.RegisterScheme:
- neofscrypto.ECDSA_SHA512
- neofscrypto.ECDSA_DETERMINISTIC_SHA256
*/
package neofsecdsa