Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

SECG1 Encode/Decode #1513

Merged
merged 5 commits into from
Apr 20, 2020
Merged

SECG1 Encode/Decode #1513

merged 5 commits into from
Apr 20, 2020

Conversation

gdbelvin
Copy link
Contributor

@gdbelvin gdbelvin commented Apr 7, 2020

Encode and Decode elliptic curve points in compressed format.

This will be superceeded by golang/go#34105 in
Go 1.15

Encode and Decode elliptic curve points in compressed format.

This will be superceeded by golang/go#34105 in
Go 1.15
@codecov
Copy link

codecov bot commented Apr 7, 2020

Codecov Report

Merging #1513 into master will increase coverage by 0.13%.
The diff coverage is 80.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1513      +/-   ##
==========================================
+ Coverage   68.46%   68.59%   +0.13%     
==========================================
  Files          54       55       +1     
  Lines        4011     4063      +52     
==========================================
+ Hits         2746     2787      +41     
- Misses        865      870       +5     
- Partials      400      406       +6     
Impacted Files Coverage Δ
core/crypto/draft-irtf-cfrg-vrf-06/conversion.go 80.76% <80.76%> (ø)
core/sequencer/trillian_client.go 57.97% <0.00%> (-2.90%) ⬇️
core/sequencer/server.go 74.50% <0.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edd1ff1...7130a98. Read the comment docs.

core/crypto/draft-irtf-cfrg-vrf-06/conversion.go Outdated Show resolved Hide resolved
core/crypto/draft-irtf-cfrg-vrf-06/conversion.go Outdated Show resolved Hide resolved
func secg1Decode(curve elliptic.Curve, data []byte) (x, y *big.Int) {
byteLen := (curve.Params().BitSize + 7) >> 3
if (data[0] &^ 1) != 2 {
return // unrecognized point encoding

Choose a reason for hiding this comment

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

Would be better for these erroneous returns to be more descriptive, although I see that this function is a duplicate from elsewhere.

* master:
  Bump github.com/spf13/viper from 1.6.2 to 1.6.3
@gdbelvin gdbelvin removed the request for review from thaidn April 20, 2020 08:53
@gdbelvin gdbelvin merged commit 6115a89 into google:master Apr 20, 2020
@gdbelvin gdbelvin deleted the vrf-conv branch April 20, 2020 09:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants