Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Wim Lewis
nettle
Commits
19fa22a4
Commit
19fa22a4
authored
Jan 10, 2019
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: Use %u and corresponding cast, when printing bit sizes.
parent
c10336bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
ChangeLog
ChangeLog
+5
-0
testsuite/rsa-compute-root-test.c
testsuite/rsa-compute-root-test.c
+5
-5
No files found.
ChangeLog
View file @
19fa22a4
2019-01-10 Niels Möller <nisse@lysator.liu.se>
* testsuite/rsa-compute-root-test.c (test_one): Use %u and
corresponding cast, when printing bit sizes.
2019-01-09 Niels Möller <nisse@lysator.liu.se>
* examples/nettle-benchmark.c (GET_CYCLE_COUNTER): Add volatile to
...
...
testsuite/rsa-compute-root-test.c
View file @
19fa22a4
...
...
@@ -37,11 +37,11 @@ test_one (gmp_randstate_t *rands, struct rsa_public_key *pub,
if
(
mpz_cmp
(
plaintext
,
decrypted
))
{
fprintf
(
stderr
,
"rsa_compute_root_tr failed
\n
"
);
fprintf
(
stderr
,
"Public key: size=%
l
u
\n
n:"
,
pub
->
size
);
fprintf
(
stderr
,
"Public key: size=%u
\n
n:"
,
(
unsigned
)
pub
->
size
);
mpz_out_str
(
stderr
,
10
,
pub
->
n
);
fprintf
(
stderr
,
"
\n
e:"
);
mpz_out_str
(
stderr
,
10
,
pub
->
e
);
fprintf
(
stderr
,
"
\n
Private key: size=%
l
u
\n
p:"
,
key
->
size
);
fprintf
(
stderr
,
"
\n
Private key: size=%u
\n
p:"
,
(
unsigned
)
key
->
size
);
mpz_out_str
(
stderr
,
10
,
key
->
p
);
fprintf
(
stderr
,
"
\n
q:"
);
mpz_out_str
(
stderr
,
10
,
key
->
q
);
...
...
@@ -55,13 +55,13 @@ test_one (gmp_randstate_t *rands, struct rsa_public_key *pub,
mpz_out_str
(
stderr
,
10
,
key
->
d
);
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"plaintext(%
l
u) = "
,
mpz_sizeinbase
(
plaintext
,
2
));
fprintf
(
stderr
,
"plaintext(%u) = "
,
(
unsigned
)
mpz_sizeinbase
(
plaintext
,
2
));
mpz_out_str
(
stderr
,
10
,
plaintext
);
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"ciphertext(%
l
u) = "
,
mpz_sizeinbase
(
ciphertext
,
2
));
fprintf
(
stderr
,
"ciphertext(%u) = "
,
(
unsigned
)
mpz_sizeinbase
(
ciphertext
,
2
));
mpz_out_str
(
stderr
,
10
,
ciphertext
);
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"decrypted(%
l
u) = "
,
mpz_sizeinbase
(
decrypted
,
2
));
fprintf
(
stderr
,
"decrypted(%u) = "
,
(
unsigned
)
mpz_sizeinbase
(
decrypted
,
2
));
mpz_out_str
(
stderr
,
10
,
decrypted
);
fprintf
(
stderr
,
"
\n
"
);
abort
();
...
...
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