[#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

View file

@ -185,7 +185,7 @@ func TestNewToken(t *testing.T) {
token := session.NewToken()
// check initial values
require.Nil(t, token.Signature())
require.False(t, token.VerifySignature())
require.Nil(t, token.OwnerID())
require.Nil(t, token.SessionKey())
require.Nil(t, token.ID())