aboutsummaryrefslogtreecommitdiff
path: root/ecdsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'ecdsa.c')
-rw-r--r--ecdsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ecdsa.c b/ecdsa.c
index ca3b1b5..933cb5f 100644
--- a/ecdsa.c
+++ b/ecdsa.c
@@ -79,7 +79,7 @@
*/
#ifndef HAL_ECDSA_DEBUG_ONLY_STATIC_TEST_VECTOR_RANDOM
-#define HAL_ECDSA_DEBUG_ONLY_STATIC_TEST_VECTOR_RANDOM 1
+#define HAL_ECDSA_DEBUG_ONLY_STATIC_TEST_VECTOR_RANDOM 0
#endif
/*
@@ -1122,7 +1122,7 @@ hal_error_t hal_ecdsa_sign(const hal_ecdsa_key_t * const key,
hal_error_t err;
- fp_read_unsigned_bin(e, unconst_uint8_t(hash), sizeof(hash_len));
+ fp_read_unsigned_bin(e, unconst_uint8_t(hash), hash_len);
do {
@@ -1246,7 +1246,7 @@ hal_error_t hal_ecdsa_verify(const hal_ecdsa_key_t * const key,
fp_cmp_d(s, 1) == FP_LT || fp_cmp(s, n) != FP_LT)
return HAL_ERROR_INVALID_SIGNATURE;
- fp_read_unsigned_bin(e, unconst_uint8_t(hash), sizeof(hash_len));
+ fp_read_unsigned_bin(e, unconst_uint8_t(hash), hash_len);
if (fp_invmod(s, n, w) != FP_OKAY ||
fp_mulmod(e, w, n, u1) != FP_OKAY ||
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223