Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wim Lewis
nettle
Commits
3f76113c
Commit
3f76113c
authored
6 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Use NETTLE_OCTET_SIZE_TO_LIMB_SIZE.
parent
a747934e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+3
-0
3 additions, 0 deletions
ChangeLog
rsa-decrypt-tr.c
+5
-2
5 additions, 2 deletions
rsa-decrypt-tr.c
with
8 additions
and
2 deletions
ChangeLog
+
3
−
0
View file @
3f76113c
2018-11-25 Niels Möller <nisse@lysator.liu.se>
2018-11-25 Niels Möller <nisse@lysator.liu.se>
* rsa-decrypt-tr.c (rsa_decrypt_tr): Use
NETTLE_OCTET_SIZE_TO_LIMB_SIZE.
* testsuite/rsa-sec-decrypt-test.c (rsa_decrypt_for_test): Tweak
* testsuite/rsa-sec-decrypt-test.c (rsa_decrypt_for_test): Tweak
valgrind marking, and document potential leakage of lowest and
valgrind marking, and document potential leakage of lowest and
highest bits of p and q.
highest bits of p and q.
...
...
This diff is collapsed.
Click to expand it.
rsa-decrypt-tr.c
+
5
−
2
View file @
3f76113c
...
@@ -49,16 +49,19 @@ rsa_decrypt_tr(const struct rsa_public_key *pub,
...
@@ -49,16 +49,19 @@ rsa_decrypt_tr(const struct rsa_public_key *pub,
{
{
TMP_GMP_DECL
(
m
,
mp_limb_t
);
TMP_GMP_DECL
(
m
,
mp_limb_t
);
TMP_GMP_DECL
(
em
,
uint8_t
);
TMP_GMP_DECL
(
em
,
uint8_t
);
mp_size_t
key_limb_size
;
int
res
;
int
res
;
TMP_GMP_ALLOC
(
m
,
mpz_size
(
pub
->
n
));
key_limb_size
=
NETTLE_OCTET_SIZE_TO_LIMB_SIZE
(
key
->
size
);
TMP_GMP_ALLOC
(
m
,
key_limb_size
);
TMP_GMP_ALLOC
(
em
,
key
->
size
);
TMP_GMP_ALLOC
(
em
,
key
->
size
);
res
=
rsa_sec_compute_root_tr
(
pub
,
key
,
random_ctx
,
random
,
m
,
res
=
rsa_sec_compute_root_tr
(
pub
,
key
,
random_ctx
,
random
,
m
,
mpz_limbs_read
(
gibberish
),
mpz_limbs_read
(
gibberish
),
mpz_size
(
gibberish
));
mpz_size
(
gibberish
));
mpn_get_base256
(
em
,
key
->
size
,
m
,
mpz_size
(
pub
->
n
)
);
mpn_get_base256
(
em
,
key
->
size
,
m
,
key_limb_size
);
res
&=
_pkcs1_sec_decrypt_variable
(
length
,
message
,
key
->
size
,
em
);
res
&=
_pkcs1_sec_decrypt_variable
(
length
,
message
,
key
->
size
,
em
);
...
...
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