Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jarl
tor
Commits
8c6b528b
Commit
8c6b528b
authored
9 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Disambiguate: Avoid defining two static functions both called gettweak()
parent
381dae43
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ext/ed25519/donna/ed25519_tor.c
+5
-4
5 additions, 4 deletions
src/ext/ed25519/donna/ed25519_tor.c
src/ext/ed25519/ref10/blinding.c
+3
-3
3 additions, 3 deletions
src/ext/ed25519/ref10/blinding.c
with
8 additions
and
7 deletions
src/ext/ed25519/donna/ed25519_tor.c
+
5
−
4
View file @
8c6b528b
...
...
@@ -44,7 +44,8 @@ typedef unsigned char ed25519_signature[64];
typedef
unsigned
char
ed25519_public_key
[
32
];
typedef
unsigned
char
ed25519_secret_key
[
32
];
static
void
gettweak
(
unsigned
char
*
out
,
const
unsigned
char
*
param
);
static
void
ed25519_donna_gettweak
(
unsigned
char
*
out
,
const
unsigned
char
*
param
);
static
int
ED25519_FN
(
ed25519_sign_open
)
(
const
unsigned
char
*
m
,
size_t
mlen
,
const
ed25519_public_key
pk
,
const
ed25519_signature
RS
);
...
...
@@ -242,7 +243,7 @@ ed25519_donna_sign(unsigned char *sig, const unsigned char *m, size_t mlen,
}
static
void
gettweak
(
unsigned
char
*
out
,
const
unsigned
char
*
param
)
ed25519_donna_
gettweak
(
unsigned
char
*
out
,
const
unsigned
char
*
param
)
{
static
const
char
str
[]
=
"Derive temporary signing key"
;
ed25519_hash_context
ctx
;
...
...
@@ -266,7 +267,7 @@ ed25519_donna_blind_secret_key(unsigned char *out, const unsigned char *inp,
ed25519_hash_context
ctx
;
bignum256modm
ALIGN
(
16
)
sk
,
t
;
gettweak
(
tweak
,
param
);
ed25519_donna_
gettweak
(
tweak
,
param
);
expand256_modm
(
t
,
tweak
,
32
);
expand256_modm
(
sk
,
inp
,
32
);
...
...
@@ -297,7 +298,7 @@ ed25519_donna_blind_public_key(unsigned char *out, const unsigned char *inp,
ge25519
ALIGN
(
16
)
A
,
Aprime
;
bignum256modm
ALIGN
(
16
)
t
;
gettweak
(
tweak
,
param
);
ed25519_donna_
gettweak
(
tweak
,
param
);
expand256_modm
(
t
,
tweak
,
32
);
/* No "ge25519_unpack", negate the public key. */
...
...
This diff is collapsed.
Click to expand it.
src/ext/ed25519/ref10/blinding.c
+
3
−
3
View file @
8c6b528b
...
...
@@ -10,7 +10,7 @@
#include
"crypto.h"
static
void
gettweak
(
unsigned
char
*
out
,
const
unsigned
char
*
param
)
ed25519_ref10_
gettweak
(
unsigned
char
*
out
,
const
unsigned
char
*
param
)
{
const
char
str
[]
=
"Derive temporary signing key"
;
crypto_hash_sha512_2
(
out
,
(
const
unsigned
char
*
)
str
,
strlen
(
str
),
param
,
32
);
...
...
@@ -26,7 +26,7 @@ int ed25519_ref10_blind_secret_key(unsigned char *out,
const
char
str
[]
=
"Derive temporary signing key hash input"
;
unsigned
char
tweak
[
64
];
unsigned
char
zero
[
32
];
gettweak
(
tweak
,
param
);
ed25519_ref10_
gettweak
(
tweak
,
param
);
memset
(
zero
,
0
,
32
);
sc_muladd
(
out
,
inp
,
tweak
,
zero
);
...
...
@@ -50,7 +50,7 @@ int ed25519_ref10_blind_public_key(unsigned char *out,
ge_p3
A
;
ge_p2
Aprime
;
gettweak
(
tweak
,
param
);
ed25519_ref10_
gettweak
(
tweak
,
param
);
memset
(
zero
,
0
,
sizeof
(
zero
));
/* Not the greatest implementation of all of this. I wish I had
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment