diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-12-07 16:43:54 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-12-07 16:43:54 +0100 |
commit | 27ca93e0dbd2552835d7046dd0ee1ab3c2c83f47 (patch) | |
tree | fd1db5e8e4edb517b52490b14d44d2b7cf0bdf5e /src | |
parent | 2f5243101b3cfbdb173357ae7781802191e32f50 (diff) | |
download | gnunet-27ca93e0dbd2552835d7046dd0ee1ab3c2c83f47.tar.gz gnunet-27ca93e0dbd2552835d7046dd0ee1ab3c2c83f47.zip |
style fix
Diffstat (limited to 'src')
-rw-r--r-- | src/util/test_crypto_eddsa.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/util/test_crypto_eddsa.c b/src/util/test_crypto_eddsa.c index ac991cef5..c0ad387e1 100644 --- a/src/util/test_crypto_eddsa.c +++ b/src/util/test_crypto_eddsa.c | |||
@@ -44,7 +44,6 @@ testSignVerify () | |||
44 | struct GNUNET_CRYPTO_EddsaSignature sig; | 44 | struct GNUNET_CRYPTO_EddsaSignature sig; |
45 | struct GNUNET_CRYPTO_EccSignaturePurpose purp; | 45 | struct GNUNET_CRYPTO_EccSignaturePurpose purp; |
46 | struct GNUNET_CRYPTO_EddsaPublicKey pkey; | 46 | struct GNUNET_CRYPTO_EddsaPublicKey pkey; |
47 | int i; | ||
48 | struct GNUNET_TIME_Absolute start; | 47 | struct GNUNET_TIME_Absolute start; |
49 | int ok = GNUNET_OK; | 48 | int ok = GNUNET_OK; |
50 | 49 | ||
@@ -54,7 +53,7 @@ testSignVerify () | |||
54 | purp.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose)); | 53 | purp.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose)); |
55 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); | 54 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); |
56 | 55 | ||
57 | for (i = 0; i < ITER; i++) | 56 | for (unsigned int i = 0; i < ITER; i++) |
58 | { | 57 | { |
59 | fprintf (stderr, "%s", "."); fflush (stderr); | 58 | fprintf (stderr, "%s", "."); fflush (stderr); |
60 | if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_sign (key, &purp, &sig)) | 59 | if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_sign (key, &purp, &sig)) |
@@ -80,6 +79,7 @@ testSignVerify () | |||
80 | continue; | 79 | continue; |
81 | } | 80 | } |
82 | } | 81 | } |
82 | fprintf (stderr, "\n"); | ||
83 | printf ("%d EdDSA sign/verify operations %s\n", ITER, | 83 | printf ("%d EdDSA sign/verify operations %s\n", ITER, |
84 | GNUNET_STRINGS_relative_time_to_string ( | 84 | GNUNET_STRINGS_relative_time_to_string ( |
85 | GNUNET_TIME_absolute_get_duration (start), GNUNET_YES)); | 85 | GNUNET_TIME_absolute_get_duration (start), GNUNET_YES)); |
@@ -94,7 +94,6 @@ testSignPerformance () | |||
94 | struct GNUNET_CRYPTO_EccSignaturePurpose purp; | 94 | struct GNUNET_CRYPTO_EccSignaturePurpose purp; |
95 | struct GNUNET_CRYPTO_EddsaSignature sig; | 95 | struct GNUNET_CRYPTO_EddsaSignature sig; |
96 | struct GNUNET_CRYPTO_EddsaPublicKey pkey; | 96 | struct GNUNET_CRYPTO_EddsaPublicKey pkey; |
97 | int i; | ||
98 | struct GNUNET_TIME_Absolute start; | 97 | struct GNUNET_TIME_Absolute start; |
99 | int ok = GNUNET_OK; | 98 | int ok = GNUNET_OK; |
100 | 99 | ||
@@ -103,7 +102,7 @@ testSignPerformance () | |||
103 | fprintf (stderr, "%s", "W"); | 102 | fprintf (stderr, "%s", "W"); |
104 | GNUNET_CRYPTO_eddsa_key_get_public (key, &pkey); | 103 | GNUNET_CRYPTO_eddsa_key_get_public (key, &pkey); |
105 | start = GNUNET_TIME_absolute_get (); | 104 | start = GNUNET_TIME_absolute_get (); |
106 | for (i = 0; i < ITER; i++) | 105 | for (unsigned int i = 0; i < ITER; i++) |
107 | { | 106 | { |
108 | fprintf (stderr, "%s", "."); fflush (stderr); | 107 | fprintf (stderr, "%s", "."); fflush (stderr); |
109 | if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_sign (key, &purp, &sig)) | 108 | if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_sign (key, &purp, &sig)) |
@@ -113,6 +112,7 @@ testSignPerformance () | |||
113 | continue; | 112 | continue; |
114 | } | 113 | } |
115 | } | 114 | } |
115 | fprintf (stderr, "\n"); | ||
116 | printf ("%d EdDSA sign operations %s\n", ITER, | 116 | printf ("%d EdDSA sign operations %s\n", ITER, |
117 | GNUNET_STRINGS_relative_time_to_string ( | 117 | GNUNET_STRINGS_relative_time_to_string ( |
118 | GNUNET_TIME_absolute_get_duration (start), | 118 | GNUNET_TIME_absolute_get_duration (start), |
@@ -154,19 +154,16 @@ perf_keygen () | |||
154 | { | 154 | { |
155 | struct GNUNET_TIME_Absolute start; | 155 | struct GNUNET_TIME_Absolute start; |
156 | struct GNUNET_CRYPTO_EddsaPrivateKey *pk; | 156 | struct GNUNET_CRYPTO_EddsaPrivateKey *pk; |
157 | int i; | ||
158 | 157 | ||
159 | fprintf (stderr, "%s", "W"); | 158 | fprintf (stderr, "%s", "W"); |
160 | start = GNUNET_TIME_absolute_get (); | 159 | start = GNUNET_TIME_absolute_get (); |
161 | for (i = 0; i < 10; i++) | 160 | for (unsigned int i = 0; i < 10; i++) |
162 | { | 161 | { |
163 | fprintf (stderr, "."); fflush (stderr); | 162 | fprintf (stderr, "."); fflush (stderr); |
164 | pk = GNUNET_CRYPTO_eddsa_key_create (); | 163 | pk = GNUNET_CRYPTO_eddsa_key_create (); |
165 | GNUNET_free (pk); | 164 | GNUNET_free (pk); |
166 | } | 165 | } |
167 | for (; i < 25; i++) | 166 | fprintf (stderr, "\n"); |
168 | fprintf (stderr, "."); | ||
169 | fflush (stderr); | ||
170 | printf ("10 EdDSA keys created in %s\n", | 167 | printf ("10 EdDSA keys created in %s\n", |
171 | GNUNET_STRINGS_relative_time_to_string ( | 168 | GNUNET_STRINGS_relative_time_to_string ( |
172 | GNUNET_TIME_absolute_get_duration (start), GNUNET_YES)); | 169 | GNUNET_TIME_absolute_get_duration (start), GNUNET_YES)); |