-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constant-time scalars in ed25519, and variable-time option flag #173
Changes from all commits
9f4aa73
bb3867e
bce2b89
6eaf519
a1133fc
51b50f6
6bb64f7
bad1135
31a5cbb
c6cdb80
9e83790
7d5f0fd
a76faaf
3c81136
f36ae2e
0e78656
59a897f
2d953ff
6b77576
b3da6d2
294eef9
f5608af
f5f7ebb
e72ba4d
20e3545
3baf54d
1946b38
0bcf70c
0d09f3c
28a0871
bc5f664
ebd2462
644dc22
7b0afeb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// This package exists runs comparative benchmarks | ||
// Package bench runs comparative benchmarks | ||
// across several alternative Cipher implementations. | ||
package bench |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ import ( | |
"fmt" | ||
|
||
"gopkg.in/dedis/kyber.v1" | ||
"gopkg.in/dedis/kyber.v1/group/nist" | ||
"gopkg.in/dedis/kyber.v1/group/edwards25519" | ||
) | ||
|
||
type Suite interface { | ||
|
@@ -54,7 +54,7 @@ func SchnorrSign(suite Suite, random cipher.Stream, message []byte, | |
// And check that hashElgamal for T and the message == c | ||
buf := bytes.Buffer{} | ||
sig := basicSig{c, r} | ||
suite.Write(&buf, &sig) | ||
_ = suite.Write(&buf, &sig) | ||
return buf.Bytes() | ||
} | ||
|
||
|
@@ -87,9 +87,9 @@ func SchnorrVerify(suite Suite, message []byte, publicKey kyber.Point, | |
} | ||
|
||
// Example of using Schnorr | ||
func ExampleSchnorr() { | ||
func Example_schnorr() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please follow https://golang.org/pkg/testing/#pkg-examples There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Golint do not pass with that so I choose golint. |
||
// Crypto setup | ||
group := nist.NewAES128SHA256P256() | ||
group := edwards25519.NewAES128SHA256Ed25519(false) | ||
rand := group.Cipher([]byte("example")) | ||
|
||
// Create a public/private keypair (X,x) | ||
|
@@ -110,9 +110,9 @@ func ExampleSchnorr() { | |
|
||
// Output: | ||
// Signature: | ||
// 00000000 c1 7a 91 74 06 48 5d 53 d4 92 27 71 58 07 eb d5 |.z.t.H]S..'qX...| | ||
// 00000010 75 a5 89 92 78 67 fc b1 eb 36 55 63 d1 32 12 20 |u...xg...6Uc.2. | | ||
// 00000020 2c 78 84 81 04 0d 2a a8 fa 80 d0 e8 c3 14 65 e3 |,x....*.......e.| | ||
// 00000030 7f f2 7c 55 c5 d2 c6 70 51 89 40 cd 63 50 bf c6 |..|U...[email protected]..| | ||
// 00000000 d4 64 bd ac 8a 06 d9 71 f4 ae a1 da e1 c5 55 d5 |.d.....q......U.| | ||
// 00000010 f7 89 50 10 a5 d9 99 52 b0 c4 f2 ba f9 37 67 02 |..P....R.....7g.| | ||
// 00000020 35 3e 9b ac e6 dd d1 98 f6 19 88 37 4d e3 4f 5c |5>.........7M.O\| | ||
// 00000030 36 de a7 bf b9 f0 06 2b 72 6f 81 b7 59 19 c6 00 |6......+ro..Y...| | ||
// Signature verified against correct message. | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again error-checking: either remove
_ =
or do some error-checking.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Golint.