Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
47eae4be
Commit
47eae4be
authored
Apr 26, 2013
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use size_t for ecc functions.
parent
95ce5d75
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
ecc-ecdsa-sign.c
ecc-ecdsa-sign.c
+1
-1
ecc-ecdsa-verify.c
ecc-ecdsa-verify.c
+1
-1
ecc-hash.c
ecc-hash.c
+2
-2
ecc-internal.h
ecc-internal.h
+1
-1
ecdsa-sign.c
ecdsa-sign.c
+1
-1
ecdsa-verify.c
ecdsa-verify.c
+1
-1
ecdsa.h
ecdsa.h
+4
-4
No files found.
ecc-ecdsa-sign.c
View file @
47eae4be
...
...
@@ -48,7 +48,7 @@ ecc_ecdsa_sign (const struct ecc_curve *ecc,
/* Random nonce, must be invertible mod ecc group
order. */
const
mp_limb_t
*
kp
,
unsigned
length
,
const
uint8_t
*
digest
,
size_t
length
,
const
uint8_t
*
digest
,
mp_limb_t
*
rp
,
mp_limb_t
*
sp
,
mp_limb_t
*
scratch
)
{
...
...
ecc-ecdsa-verify.c
View file @
47eae4be
...
...
@@ -62,7 +62,7 @@ ecc_ecdsa_verify_itch (const struct ecc_curve *ecc)
int
ecc_ecdsa_verify
(
const
struct
ecc_curve
*
ecc
,
const
mp_limb_t
*
pp
,
/* Public key */
unsigned
length
,
const
uint8_t
*
digest
,
size_t
length
,
const
uint8_t
*
digest
,
const
mp_limb_t
*
rp
,
const
mp_limb_t
*
sp
,
mp_limb_t
*
scratch
)
{
...
...
ecc-hash.c
View file @
47eae4be
...
...
@@ -41,9 +41,9 @@
void
ecc_hash
(
const
struct
ecc_curve
*
ecc
,
mp_limb_t
*
hp
,
unsigned
length
,
const
uint8_t
*
digest
)
size_t
length
,
const
uint8_t
*
digest
)
{
if
(
length
>
((
unsigned
)
ecc
->
bit_size
+
7
)
/
8
)
if
(
length
>
((
size_t
)
ecc
->
bit_size
+
7
)
/
8
)
length
=
(
ecc
->
bit_size
+
7
)
/
8
;
mpn_set_base256
(
hp
,
ecc
->
size
+
1
,
digest
,
length
);
...
...
ecc-internal.h
View file @
47eae4be
...
...
@@ -202,7 +202,7 @@ ecc_mod (mp_limb_t *rp, mp_size_t rn, mp_size_t mn,
void
ecc_hash
(
const
struct
ecc_curve
*
ecc
,
mp_limb_t
*
hp
,
unsigned
length
,
const
uint8_t
*
digest
);
size_t
length
,
const
uint8_t
*
digest
);
void
cnd_copy
(
int
cnd
,
mp_limb_t
*
rp
,
const
mp_limb_t
*
ap
,
mp_size_t
n
);
...
...
ecdsa-sign.c
View file @
47eae4be
...
...
@@ -36,7 +36,7 @@
void
ecdsa_sign
(
const
struct
ecc_scalar
*
key
,
void
*
random_ctx
,
nettle_random_func
*
random
,
unsigned
digest_length
,
size_t
digest_length
,
const
uint8_t
*
digest
,
struct
dsa_signature
*
signature
)
{
...
...
ecdsa-verify.c
View file @
47eae4be
...
...
@@ -34,7 +34,7 @@
int
ecdsa_verify
(
const
struct
ecc_point
*
pub
,
unsigned
length
,
const
uint8_t
*
digest
,
size_t
length
,
const
uint8_t
*
digest
,
const
struct
dsa_signature
*
signature
)
{
mp_limb_t
size
=
pub
->
ecc
->
size
;
...
...
ecdsa.h
View file @
47eae4be
...
...
@@ -48,13 +48,13 @@ extern "C" {
void
ecdsa_sign
(
const
struct
ecc_scalar
*
key
,
void
*
random_ctx
,
nettle_random_func
*
random
,
unsigned
digest_length
,
size_t
digest_length
,
const
uint8_t
*
digest
,
struct
dsa_signature
*
signature
);
int
ecdsa_verify
(
const
struct
ecc_point
*
pub
,
unsigned
length
,
const
uint8_t
*
digest
,
size_t
length
,
const
uint8_t
*
digest
,
const
struct
dsa_signature
*
signature
);
void
...
...
@@ -72,7 +72,7 @@ ecc_ecdsa_sign (const struct ecc_curve *ecc,
/* Random nonce, must be invertible mod ecc group
order. */
const
mp_limb_t
*
kp
,
unsigned
length
,
const
uint8_t
*
digest
,
size_t
length
,
const
uint8_t
*
digest
,
mp_limb_t
*
rp
,
mp_limb_t
*
sp
,
mp_limb_t
*
scratch
);
...
...
@@ -82,7 +82,7 @@ ecc_ecdsa_verify_itch (const struct ecc_curve *ecc);
int
ecc_ecdsa_verify
(
const
struct
ecc_curve
*
ecc
,
const
mp_limb_t
*
pp
,
/* Public key */
unsigned
length
,
const
uint8_t
*
digest
,
size_t
length
,
const
uint8_t
*
digest
,
const
mp_limb_t
*
rp
,
const
mp_limb_t
*
sp
,
mp_limb_t
*
scratch
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment