Commit graph

8 commits

Author SHA1 Message Date
0630205f67 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 12:57:09 +03:00
cd99838ed8 Move from nspcc-dev to TrueCloudLab
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-12 12:27:52 +03:00
d29d7f9c3e
Fix tests on go1.19 (#16)
* [#15] ecdsa: Fix signature marshaling with go1.19

Signed-off-by: Evgenii Stratonikov <stratonikov@runbox.com>

* [#15] go.mod: Update go version to 1.16

Signed-off-by: Evgenii Stratonikov <stratonikov@runbox.com>

* [#15] go.mod: Drop `pkg/errors` dependency

Signed-off-by: Evgenii Stratonikov <stratonikov@runbox.com>

* [#15] *: Perform `goimports -w`

Signed-off-by: Evgenii Stratonikov <stratonikov@runbox.com>

Signed-off-by: Evgenii Stratonikov <stratonikov@runbox.com>
Co-authored-by: Evgenii Stratonikov <stratonikov@runbox.com>
2022-08-15 14:49:39 +03:00
Evgenii Stratonikov
225b24f7f4 Allow to use hash in Sign*/Verify*
Sometimes having a whole buffer in memory isn't desired.
New interface allows us to provide hashes instead.
2021-03-23 13:11:42 +03:00
Evgeniy Kulikov
e9d1b1884c Refactoring for go1.15+
- use elliptic.MarshalCompressed
- use elliptic.UnmarshalCompressed
- for older go versions use old methods
- update dependencies
  - github.com/mr-tron/base58 v1.2.0
  - github.com/pkg/errors v0.9.1
  - github.com/stretchr/testify v1.7.0

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2021-02-12 15:29:16 +03:00
alexvanin
f5ad619450 Fix point encoding for short X coordinate
Public keys can have X coordinate value shorter than 32 byte.
In this case `encodePoint()` should return 32 byte value with
leading zeros.

This commit also adds unit test for public key with 31 byte
X coordinate value.
2019-11-17 21:08:58 +03:00
Evgeniy Kulikov
fc6fd40f5e
Change func Verify signature
- Before `func Verify*(pub *ecdsa.PublicKey, sig, msg []byte) error`
- After `func Verify*(pub *ecdsa.PublicKey, msg, sig []byte) error`
- Update tests and replace `hash` with `sign` for signatures

Fix issue #5
2019-11-12 15:52:13 +03:00
Evgeniy Kulikov
c21ef9ef81
initial 2019-10-22 17:40:05 +03:00