Manuel Pégourié-Gonnard | 2aea141 | 2013-01-26 16:33:44 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Elliptic curve DSA |
| 3 | * |
| 4 | * Copyright (C) 2006-2013, Brainspark B.V. |
| 5 | * |
| 6 | * This file is part of PolarSSL (http://www.polarssl.org) |
| 7 | * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> |
| 8 | * |
| 9 | * All rights reserved. |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by |
| 13 | * the Free Software Foundation; either version 2 of the License, or |
| 14 | * (at your option) any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License along |
| 22 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 24 | */ |
| 25 | |
| 26 | /* |
| 27 | * References: |
| 28 | * |
| 29 | * SEC1 http://www.secg.org/index.php?action=secg,docs_secg |
| 30 | */ |
| 31 | |
| 32 | #include "polarssl/config.h" |
| 33 | |
| 34 | #if defined(POLARSSL_ECDSA_C) |
| 35 | |
| 36 | #include "polarssl/ecdsa.h" |
Manuel Pégourié-Gonnard | b694b48 | 2013-08-08 13:30:57 +0200 | [diff] [blame] | 37 | #include "polarssl/asn1write.h" |
Manuel Pégourié-Gonnard | 2aea141 | 2013-01-26 16:33:44 +0100 | [diff] [blame] | 38 | |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 39 | /* |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 40 | * Derive a suitable integer for group grp from a buffer of length len |
| 41 | * SEC1 4.1.3 step 5 aka SEC1 4.1.4 step 3 |
| 42 | */ |
| 43 | static int derive_mpi( const ecp_group *grp, mpi *x, |
| 44 | const unsigned char *buf, size_t blen ) |
| 45 | { |
| 46 | size_t n_size = (grp->nbits + 7) / 8; |
| 47 | return( mpi_read_binary( x, buf, blen > n_size ? n_size : blen ) ); |
| 48 | } |
| 49 | |
| 50 | /* |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 51 | * Compute ECDSA signature of a hashed message (SEC1 4.1.3) |
| 52 | * Obviously, compared to SEC1 4.1.3, we skip step 4 (hash message) |
| 53 | */ |
Manuel Pégourié-Gonnard | 161ef96 | 2013-09-17 19:13:10 +0200 | [diff] [blame] | 54 | int ecdsa_sign( ecp_group *grp, mpi *r, mpi *s, |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 55 | const mpi *d, const unsigned char *buf, size_t blen, |
| 56 | int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) |
| 57 | { |
| 58 | int ret, key_tries, sign_tries; |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 59 | ecp_point R; |
| 60 | mpi k, e; |
| 61 | |
Manuel Pégourié-Gonnard | 97871ef | 2013-12-04 20:52:04 +0100 | [diff] [blame] | 62 | /* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */ |
| 63 | if( grp->N.p == NULL ) |
| 64 | return( POLARSSL_ERR_ECP_BAD_INPUT_DATA ); |
| 65 | |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 66 | ecp_point_init( &R ); |
| 67 | mpi_init( &k ); |
| 68 | mpi_init( &e ); |
| 69 | |
| 70 | sign_tries = 0; |
| 71 | do |
| 72 | { |
| 73 | /* |
| 74 | * Steps 1-3: generate a suitable ephemeral keypair |
Manuel Pégourié-Gonnard | 178d9ba | 2013-10-29 10:45:28 +0100 | [diff] [blame] | 75 | * and set r = xR mod n |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 76 | */ |
| 77 | key_tries = 0; |
| 78 | do |
| 79 | { |
| 80 | MPI_CHK( ecp_gen_keypair( grp, &k, &R, f_rng, p_rng ) ); |
Manuel Pégourié-Gonnard | 178d9ba | 2013-10-29 10:45:28 +0100 | [diff] [blame] | 81 | MPI_CHK( mpi_mod_mpi( r, &R.X, &grp->N ) ); |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 82 | |
| 83 | if( key_tries++ > 10 ) |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 84 | { |
Manuel Pégourié-Gonnard | 456d3b9 | 2013-09-16 18:04:38 +0200 | [diff] [blame] | 85 | ret = POLARSSL_ERR_ECP_RANDOM_FAILED; |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 86 | goto cleanup; |
| 87 | } |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 88 | } |
| 89 | while( mpi_cmp_int( r, 0 ) == 0 ); |
| 90 | |
| 91 | /* |
| 92 | * Step 5: derive MPI from hashed message |
| 93 | */ |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 94 | MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 95 | |
| 96 | /* |
| 97 | * Step 6: compute s = (e + r * d) / k mod n |
| 98 | */ |
| 99 | MPI_CHK( mpi_mul_mpi( s, r, d ) ); |
| 100 | MPI_CHK( mpi_add_mpi( &e, &e, s ) ); |
| 101 | MPI_CHK( mpi_inv_mod( s, &k, &grp->N ) ); |
| 102 | MPI_CHK( mpi_mul_mpi( s, s, &e ) ); |
| 103 | MPI_CHK( mpi_mod_mpi( s, s, &grp->N ) ); |
| 104 | |
| 105 | if( sign_tries++ > 10 ) |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 106 | { |
Manuel Pégourié-Gonnard | 456d3b9 | 2013-09-16 18:04:38 +0200 | [diff] [blame] | 107 | ret = POLARSSL_ERR_ECP_RANDOM_FAILED; |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 108 | goto cleanup; |
| 109 | } |
Manuel Pégourié-Gonnard | b309ab2 | 2013-01-26 17:24:59 +0100 | [diff] [blame] | 110 | } |
| 111 | while( mpi_cmp_int( s, 0 ) == 0 ); |
| 112 | |
| 113 | cleanup: |
| 114 | ecp_point_free( &R ); |
| 115 | mpi_free( &k ); |
| 116 | mpi_free( &e ); |
| 117 | |
| 118 | return( ret ); |
| 119 | } |
Manuel Pégourié-Gonnard | 2aea141 | 2013-01-26 16:33:44 +0100 | [diff] [blame] | 120 | |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 121 | /* |
| 122 | * Verify ECDSA signature of hashed message (SEC1 4.1.4) |
| 123 | * Obviously, compared to SEC1 4.1.3, we skip step 2 (hash message) |
| 124 | */ |
Manuel Pégourié-Gonnard | 161ef96 | 2013-09-17 19:13:10 +0200 | [diff] [blame] | 125 | int ecdsa_verify( ecp_group *grp, |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 126 | const unsigned char *buf, size_t blen, |
| 127 | const ecp_point *Q, const mpi *r, const mpi *s) |
| 128 | { |
| 129 | int ret; |
| 130 | mpi e, s_inv, u1, u2; |
| 131 | ecp_point R, P; |
| 132 | |
| 133 | ecp_point_init( &R ); ecp_point_init( &P ); |
| 134 | mpi_init( &e ); mpi_init( &s_inv ); mpi_init( &u1 ); mpi_init( &u2 ); |
| 135 | |
Manuel Pégourié-Gonnard | 97871ef | 2013-12-04 20:52:04 +0100 | [diff] [blame] | 136 | /* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */ |
| 137 | if( grp->N.p == NULL ) |
| 138 | return( POLARSSL_ERR_ECP_BAD_INPUT_DATA ); |
| 139 | |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 140 | /* |
| 141 | * Step 1: make sure r and s are in range 1..n-1 |
| 142 | */ |
| 143 | if( mpi_cmp_int( r, 1 ) < 0 || mpi_cmp_mpi( r, &grp->N ) >= 0 || |
| 144 | mpi_cmp_int( s, 1 ) < 0 || mpi_cmp_mpi( s, &grp->N ) >= 0 ) |
| 145 | { |
Manuel Pégourié-Gonnard | db77175 | 2013-08-27 15:11:23 +0200 | [diff] [blame] | 146 | ret = POLARSSL_ERR_ECP_VERIFY_FAILED; |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 147 | goto cleanup; |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 148 | } |
| 149 | |
| 150 | /* |
| 151 | * Additional precaution: make sure Q is valid |
| 152 | */ |
| 153 | MPI_CHK( ecp_check_pubkey( grp, Q ) ); |
| 154 | |
| 155 | /* |
| 156 | * Step 3: derive MPI from hashed message |
| 157 | */ |
| 158 | MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); |
| 159 | |
| 160 | /* |
| 161 | * Step 4: u1 = e / s mod n, u2 = r / s mod n |
| 162 | */ |
| 163 | MPI_CHK( mpi_inv_mod( &s_inv, s, &grp->N ) ); |
| 164 | |
| 165 | MPI_CHK( mpi_mul_mpi( &u1, &e, &s_inv ) ); |
| 166 | MPI_CHK( mpi_mod_mpi( &u1, &u1, &grp->N ) ); |
| 167 | |
| 168 | MPI_CHK( mpi_mul_mpi( &u2, r, &s_inv ) ); |
| 169 | MPI_CHK( mpi_mod_mpi( &u2, &u2, &grp->N ) ); |
| 170 | |
| 171 | /* |
| 172 | * Step 5: R = u1 G + u2 Q |
Manuel Pégourié-Gonnard | e09d2f8 | 2013-09-02 14:29:09 +0200 | [diff] [blame] | 173 | * |
| 174 | * Since we're not using any secret data, no need to pass a RNG to |
| 175 | * ecp_mul() for countermesures. |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 176 | */ |
Manuel Pégourié-Gonnard | e09d2f8 | 2013-09-02 14:29:09 +0200 | [diff] [blame] | 177 | MPI_CHK( ecp_mul( grp, &R, &u1, &grp->G, NULL, NULL ) ); |
| 178 | MPI_CHK( ecp_mul( grp, &P, &u2, Q, NULL, NULL ) ); |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 179 | MPI_CHK( ecp_add( grp, &R, &R, &P ) ); |
| 180 | |
| 181 | if( ecp_is_zero( &R ) ) |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 182 | { |
Manuel Pégourié-Gonnard | db77175 | 2013-08-27 15:11:23 +0200 | [diff] [blame] | 183 | ret = POLARSSL_ERR_ECP_VERIFY_FAILED; |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 184 | goto cleanup; |
| 185 | } |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 186 | |
| 187 | /* |
Manuel Pégourié-Gonnard | 178d9ba | 2013-10-29 10:45:28 +0100 | [diff] [blame] | 188 | * Step 6: convert xR to an integer (no-op) |
| 189 | * Step 7: reduce xR mod n (gives v) |
| 190 | */ |
| 191 | MPI_CHK( mpi_mod_mpi( &R.X, &R.X, &grp->N ) ); |
| 192 | |
| 193 | /* |
| 194 | * Step 8: check if v (that is, R.X) is equal to r |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 195 | */ |
| 196 | if( mpi_cmp_mpi( &R.X, r ) != 0 ) |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 197 | { |
Manuel Pégourié-Gonnard | db77175 | 2013-08-27 15:11:23 +0200 | [diff] [blame] | 198 | ret = POLARSSL_ERR_ECP_VERIFY_FAILED; |
Paul Bakker | cca998a | 2013-07-26 14:20:53 +0200 | [diff] [blame] | 199 | goto cleanup; |
| 200 | } |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 201 | |
| 202 | cleanup: |
| 203 | ecp_point_free( &R ); ecp_point_free( &P ); |
| 204 | mpi_free( &e ); mpi_free( &s_inv ); mpi_free( &u1 ); mpi_free( &u2 ); |
| 205 | |
| 206 | return( ret ); |
| 207 | } |
| 208 | |
Manuel Pégourié-Gonnard | 7c8934e | 2013-06-27 12:54:02 +0200 | [diff] [blame] | 209 | /* |
Manuel Pégourié-Gonnard | b694b48 | 2013-08-08 13:30:57 +0200 | [diff] [blame] | 210 | * RFC 4492 page 20: |
| 211 | * |
| 212 | * Ecdsa-Sig-Value ::= SEQUENCE { |
| 213 | * r INTEGER, |
| 214 | * s INTEGER |
| 215 | * } |
| 216 | * |
| 217 | * Size is at most |
| 218 | * 1 (tag) + 1 (len) + 1 (initial 0) + ECP_MAX_BYTES for each of r and s, |
| 219 | * twice that + 1 (tag) + 2 (len) for the sequence |
| 220 | * (assuming ECP_MAX_BYTES is less than 126 for r and s, |
| 221 | * and less than 124 (total len <= 255) for the sequence) |
| 222 | */ |
| 223 | #if POLARSSL_ECP_MAX_BYTES > 124 |
| 224 | #error "POLARSSL_ECP_MAX_BYTES bigger than expected, please fix MAX_SIG_LEN" |
| 225 | #endif |
| 226 | #define MAX_SIG_LEN ( 3 + 2 * ( 2 + POLARSSL_ECP_MAX_BYTES ) ) |
| 227 | |
| 228 | /* |
| 229 | * Compute and write signature |
| 230 | */ |
| 231 | int ecdsa_write_signature( ecdsa_context *ctx, |
| 232 | const unsigned char *hash, size_t hlen, |
| 233 | unsigned char *sig, size_t *slen, |
| 234 | int (*f_rng)(void *, unsigned char *, size_t), |
| 235 | void *p_rng ) |
| 236 | { |
| 237 | int ret; |
Manuel Pégourié-Gonnard | 4cf0686 | 2013-09-16 12:07:45 +0200 | [diff] [blame] | 238 | unsigned char buf[MAX_SIG_LEN]; |
| 239 | unsigned char *p = buf + sizeof( buf ); |
Manuel Pégourié-Gonnard | b694b48 | 2013-08-08 13:30:57 +0200 | [diff] [blame] | 240 | size_t len = 0; |
| 241 | |
| 242 | if( ( ret = ecdsa_sign( &ctx->grp, &ctx->r, &ctx->s, &ctx->d, |
| 243 | hash, hlen, f_rng, p_rng ) ) != 0 ) |
| 244 | { |
| 245 | return( ret ); |
| 246 | } |
| 247 | |
| 248 | ASN1_CHK_ADD( len, asn1_write_mpi( &p, buf, &ctx->s ) ); |
| 249 | ASN1_CHK_ADD( len, asn1_write_mpi( &p, buf, &ctx->r ) ); |
| 250 | |
| 251 | ASN1_CHK_ADD( len, asn1_write_len( &p, buf, len ) ); |
| 252 | ASN1_CHK_ADD( len, asn1_write_tag( &p, buf, |
| 253 | ASN1_CONSTRUCTED | ASN1_SEQUENCE ) ); |
| 254 | |
| 255 | memcpy( sig, p, len ); |
| 256 | *slen = len; |
| 257 | |
| 258 | return( 0 ); |
| 259 | } |
| 260 | |
| 261 | /* |
| 262 | * Read and check signature |
| 263 | */ |
| 264 | int ecdsa_read_signature( ecdsa_context *ctx, |
| 265 | const unsigned char *hash, size_t hlen, |
| 266 | const unsigned char *sig, size_t slen ) |
| 267 | { |
| 268 | int ret; |
| 269 | unsigned char *p = (unsigned char *) sig; |
| 270 | const unsigned char *end = sig + slen; |
| 271 | size_t len; |
| 272 | |
| 273 | if( ( ret = asn1_get_tag( &p, end, &len, |
| 274 | ASN1_CONSTRUCTED | ASN1_SEQUENCE ) ) != 0 ) |
| 275 | { |
| 276 | return( POLARSSL_ERR_ECP_BAD_INPUT_DATA + ret ); |
| 277 | } |
| 278 | |
| 279 | if( p + len != end ) |
| 280 | return( POLARSSL_ERR_ECP_BAD_INPUT_DATA + |
| 281 | POLARSSL_ERR_ASN1_LENGTH_MISMATCH ); |
| 282 | |
| 283 | if( ( ret = asn1_get_mpi( &p, end, &ctx->r ) ) != 0 || |
| 284 | ( ret = asn1_get_mpi( &p, end, &ctx->s ) ) != 0 ) |
| 285 | return( POLARSSL_ERR_ECP_BAD_INPUT_DATA + ret ); |
| 286 | |
| 287 | if( p != end ) |
| 288 | return( POLARSSL_ERR_ECP_BAD_INPUT_DATA + |
| 289 | POLARSSL_ERR_ASN1_LENGTH_MISMATCH ); |
| 290 | |
| 291 | return( ecdsa_verify( &ctx->grp, hash, hlen, &ctx->Q, &ctx->r, &ctx->s ) ); |
| 292 | } |
| 293 | |
| 294 | /* |
Manuel Pégourié-Gonnard | 8eebd01 | 2013-08-09 16:21:34 +0200 | [diff] [blame] | 295 | * Generate key pair |
| 296 | */ |
| 297 | int ecdsa_genkey( ecdsa_context *ctx, ecp_group_id gid, |
| 298 | int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) |
| 299 | { |
| 300 | return( ecp_use_known_dp( &ctx->grp, gid ) || |
| 301 | ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ); |
| 302 | } |
| 303 | |
Manuel Pégourié-Gonnard | f499993 | 2013-08-12 17:02:59 +0200 | [diff] [blame] | 304 | /* |
| 305 | * Set context from an ecp_keypair |
| 306 | */ |
| 307 | int ecdsa_from_keypair( ecdsa_context *ctx, const ecp_keypair *key ) |
| 308 | { |
Manuel Pégourié-Gonnard | 1001e32 | 2013-10-27 14:53:48 +0100 | [diff] [blame] | 309 | int ret; |
Manuel Pégourié-Gonnard | f499993 | 2013-08-12 17:02:59 +0200 | [diff] [blame] | 310 | |
Manuel Pégourié-Gonnard | 1001e32 | 2013-10-27 14:53:48 +0100 | [diff] [blame] | 311 | if( ( ret = ecp_group_copy( &ctx->grp, &key->grp ) ) != 0 || |
| 312 | ( ret = mpi_copy( &ctx->d, &key->d ) ) != 0 || |
| 313 | ( ret = ecp_copy( &ctx->Q, &key->Q ) ) != 0 ) |
| 314 | { |
Manuel Pégourié-Gonnard | f499993 | 2013-08-12 17:02:59 +0200 | [diff] [blame] | 315 | ecdsa_free( ctx ); |
Manuel Pégourié-Gonnard | 1001e32 | 2013-10-27 14:53:48 +0100 | [diff] [blame] | 316 | } |
Manuel Pégourié-Gonnard | f499993 | 2013-08-12 17:02:59 +0200 | [diff] [blame] | 317 | |
| 318 | return( ret ); |
| 319 | } |
Manuel Pégourié-Gonnard | 8eebd01 | 2013-08-09 16:21:34 +0200 | [diff] [blame] | 320 | |
| 321 | /* |
Manuel Pégourié-Gonnard | 7c8934e | 2013-06-27 12:54:02 +0200 | [diff] [blame] | 322 | * Initialize context |
| 323 | */ |
| 324 | void ecdsa_init( ecdsa_context *ctx ) |
| 325 | { |
| 326 | ecp_group_init( &ctx->grp ); |
| 327 | mpi_init( &ctx->d ); |
| 328 | ecp_point_init( &ctx->Q ); |
| 329 | mpi_init( &ctx->r ); |
| 330 | mpi_init( &ctx->s ); |
Manuel Pégourié-Gonnard | 7c8934e | 2013-06-27 12:54:02 +0200 | [diff] [blame] | 331 | } |
| 332 | |
| 333 | /* |
| 334 | * Free context |
| 335 | */ |
| 336 | void ecdsa_free( ecdsa_context *ctx ) |
| 337 | { |
| 338 | ecp_group_free( &ctx->grp ); |
| 339 | mpi_free( &ctx->d ); |
| 340 | ecp_point_free( &ctx->Q ); |
| 341 | mpi_free( &ctx->r ); |
| 342 | mpi_free( &ctx->s ); |
Manuel Pégourié-Gonnard | 7c8934e | 2013-06-27 12:54:02 +0200 | [diff] [blame] | 343 | } |
Manuel Pégourié-Gonnard | 3aeb5a7 | 2013-01-26 18:05:50 +0100 | [diff] [blame] | 344 | |
Manuel Pégourié-Gonnard | 2aea141 | 2013-01-26 16:33:44 +0100 | [diff] [blame] | 345 | #if defined(POLARSSL_SELF_TEST) |
| 346 | |
| 347 | /* |
| 348 | * Checkup routine |
| 349 | */ |
| 350 | int ecdsa_self_test( int verbose ) |
| 351 | { |
Manuel Pégourié-Gonnard | 7c59363 | 2014-01-20 10:27:13 +0100 | [diff] [blame] | 352 | ((void) verbose ); |
| 353 | return( 0 ); |
Manuel Pégourié-Gonnard | 2aea141 | 2013-01-26 16:33:44 +0100 | [diff] [blame] | 354 | } |
| 355 | |
| 356 | #endif |
| 357 | |
| 358 | #endif /* defined(POLARSSL_ECDSA_C) */ |