rsa.h

Go to the documentation of this file.
00001 /* crypto/rsa/rsa.h */
00002 /* Copyright (C) 1995-1998 Eric Young ([email protected])
00003  * All rights reserved.
00004  *
00005  * This package is an SSL implementation written
00006  * by Eric Young ([email protected]).
00007  * The implementation was written so as to conform with Netscapes SSL.
00008  * 
00009  * This library is free for commercial and non-commercial use as long as
00010  * the following conditions are aheared to.  The following conditions
00011  * apply to all code found in this distribution, be it the RC4, RSA,
00012  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
00013  * included with this distribution is covered by the same copyright terms
00014  * except that the holder is Tim Hudson ([email protected]).
00015  * 
00016  * Copyright remains Eric Young's, and as such any Copyright notices in
00017  * the code are not to be removed.
00018  * If this package is used in a product, Eric Young should be given attribution
00019  * as the author of the parts of the library used.
00020  * This can be in the form of a textual message at program startup or
00021  * in documentation (online or textual) provided with the package.
00022  * 
00023  * Redistribution and use in source and binary forms, with or without
00024  * modification, are permitted provided that the following conditions
00025  * are met:
00026  * 1. Redistributions of source code must retain the copyright
00027  *    notice, this list of conditions and the following disclaimer.
00028  * 2. Redistributions in binary form must reproduce the above copyright
00029  *    notice, this list of conditions and the following disclaimer in the
00030  *    documentation and/or other materials provided with the distribution.
00031  * 3. All advertising materials mentioning features or use of this software
00032  *    must display the following acknowledgement:
00033  *    "This product includes cryptographic software written by
00034  *     Eric Young ([email protected])"
00035  *    The word 'cryptographic' can be left out if the rouines from the library
00036  *    being used are not cryptographic related :-).
00037  * 4. If you include any Windows specific code (or a derivative thereof) from 
00038  *    the apps directory (application code) you must include an acknowledgement:
00039  *    "This product includes software written by Tim Hudson ([email protected])"
00040  * 
00041  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
00042  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00043  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00044  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
00045  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00046  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00047  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00048  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00049  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00050  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00051  * SUCH DAMAGE.
00052  * 
00053  * The licence and distribution terms for any publically available version or
00054  * derivative of this code cannot be changed.  i.e. this code cannot simply be
00055  * copied and put under another distribution licence
00056  * [including the GNU Public Licence.]
00057  */
00058 /*
00059  © Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
00060  */
00061 
00062 #ifndef HEADER_RSA_H
00063 #define HEADER_RSA_H
00064 
00065 #if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
00066 #define SYMBIAN
00067 #endif
00068 
00069 #ifdef SYMBIAN
00070 #include <e32def.h>
00071 #endif
00072 #include <openssl/asn1.h>
00073 
00074 #ifndef OPENSSL_NO_BIO
00075 #include <openssl/bio.h>
00076 #endif
00077 #include <openssl/crypto.h>
00078 #include <openssl/ossl_typ.h>
00079 #ifndef OPENSSL_NO_DEPRECATED
00080 #include <openssl/bn.h>
00081 #endif
00082 
00083 #ifdef OPENSSL_NO_RSA
00084 #error RSA is disabled.
00085 #endif
00086 
00087 #ifdef  __cplusplus
00088 extern "C" {
00089 #endif
00090 
00091 /* Declared already in ossl_typ.h */
00092 /* typedef struct rsa_st RSA; */
00093 /* typedef struct rsa_meth_st RSA_METHOD; */
00094 
00095 struct rsa_meth_st
00096         {
00097         const char *name;
00098         int (*rsa_pub_enc)(int flen,const unsigned char *from,
00099                            unsigned char *to,
00100                            RSA *rsa,int padding);
00101         int (*rsa_pub_dec)(int flen,const unsigned char *from,
00102                            unsigned char *to,
00103                            RSA *rsa,int padding);
00104         int (*rsa_priv_enc)(int flen,const unsigned char *from,
00105                             unsigned char *to,
00106                             RSA *rsa,int padding);
00107         int (*rsa_priv_dec)(int flen,const unsigned char *from,
00108                             unsigned char *to,
00109                             RSA *rsa,int padding);
00110         int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); /* Can be null */
00111         int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
00112                           const BIGNUM *m, BN_CTX *ctx,
00113                           BN_MONT_CTX *m_ctx); /* Can be null */
00114         int (*init)(RSA *rsa);          /* called at new */
00115         int (*finish)(RSA *rsa);        /* called at free */
00116         int flags;                      /* RSA_METHOD_FLAG_* things */
00117         char *app_data;                 /* may be needed! */
00118 /* New sign and verify functions: some libraries don't allow arbitrary data
00119  * to be signed/verified: this allows them to be used. Note: for this to work
00120  * the RSA_public_decrypt() and RSA_private_encrypt() should *NOT* be used
00121  * RSA_sign(), RSA_verify() should be used instead. Note: for backwards
00122  * compatibility this functionality is only enabled if the RSA_FLAG_SIGN_VER
00123  * option is set in 'flags'.
00124  */
00125         int (*rsa_sign)(int type,
00126                 const unsigned char *m, unsigned int m_length,
00127                 unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
00128         int (*rsa_verify)(int dtype,
00129                 const unsigned char *m, unsigned int m_length,
00130                 unsigned char *sigbuf, unsigned int siglen, const RSA *rsa);
00131 /* If this callback is NULL, the builtin software RSA key-gen will be used. This
00132  * is for behavioural compatibility whilst the code gets rewired, but one day
00133  * it would be nice to assume there are no such things as "builtin software"
00134  * implementations. */
00135         int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
00136         };
00137 
00138 struct rsa_st
00139         {
00140         /* The first parameter is used to pickup errors where
00141          * this is passed instead of aEVP_PKEY, it is set to 0 */
00142         int pad;
00143         long version;
00144         const RSA_METHOD *meth;
00145         /* functional reference if 'meth' is ENGINE-provided */
00146         ENGINE *engine;
00147         BIGNUM *n;
00148         BIGNUM *e;
00149         BIGNUM *d;
00150         BIGNUM *p;
00151         BIGNUM *q;
00152         BIGNUM *dmp1;
00153         BIGNUM *dmq1;
00154         BIGNUM *iqmp;
00155         /* be careful using this if the RSA structure is shared */
00156         CRYPTO_EX_DATA ex_data;
00157         int references;
00158         int flags;
00159 
00160         /* Used to cache montgomery values */
00161         BN_MONT_CTX *_method_mod_n;
00162         BN_MONT_CTX *_method_mod_p;
00163         BN_MONT_CTX *_method_mod_q;
00164 
00165         /* all BIGNUM values are actually in the following data, if it is not
00166          * NULL */
00167         char *bignum_data;
00168         BN_BLINDING *blinding;
00169         BN_BLINDING *mt_blinding;
00170         };
00171 #ifndef OPENSSL_RSA_MAX_MODULUS_BITS
00172 # define OPENSSL_RSA_MAX_MODULUS_BITS   16384
00173 #endif
00174 
00175 #ifndef OPENSSL_RSA_SMALL_MODULUS_BITS
00176 # define OPENSSL_RSA_SMALL_MODULUS_BITS 3072
00177 #endif
00178 #ifndef OPENSSL_RSA_MAX_PUBEXP_BITS
00179 # define OPENSSL_RSA_MAX_PUBEXP_BITS    64 /* exponent limit enforced for "large" modulus only */
00180 #endif
00181 
00182 
00183 #define RSA_3   0x3L
00184 #define RSA_F4  0x10001L
00185 
00186 #define RSA_METHOD_FLAG_NO_CHECK        0x0001 /* don't check pub/private match */
00187 
00188 #define RSA_FLAG_CACHE_PUBLIC           0x0002
00189 #define RSA_FLAG_CACHE_PRIVATE          0x0004
00190 #define RSA_FLAG_BLINDING               0x0008
00191 #define RSA_FLAG_THREAD_SAFE            0x0010
00192 /* This flag means the private key operations will be handled by rsa_mod_exp
00193  * and that they do not depend on the private key components being present:
00194  * for example a key stored in external hardware. Without this flag bn_mod_exp
00195  * gets called when private key components are absent.
00196  */
00197 #define RSA_FLAG_EXT_PKEY               0x0020
00198 
00199 /* This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify functions.
00200  */
00201 #define RSA_FLAG_SIGN_VER               0x0040
00202 
00203 #define RSA_FLAG_NO_BLINDING            0x0080 /* new with 0.9.6j and 0.9.7b; the built-in
00204                                                 * RSA implementation now uses blinding by
00205                                                 * default (ignoring RSA_FLAG_BLINDING),
00206                                                 * but other engines might not need it
00207                                                 */
00208 #define RSA_FLAG_NO_EXP_CONSTTIME       0x0100 /* new with 0.9.7h; the built-in RSA
00209                                                 * implementation now uses constant time
00210                                                 * modular exponentiation for secret exponents
00211                                                 * by default. This flag causes the
00212                                                 * faster variable sliding window method to
00213                                                 * be used for all exponents.
00214                                                 */
00215 
00216 #define RSA_PKCS1_PADDING       1
00217 #define RSA_SSLV23_PADDING      2
00218 #define RSA_NO_PADDING          3
00219 #define RSA_PKCS1_OAEP_PADDING  4
00220 #define RSA_X931_PADDING        5
00221 
00222 #define RSA_PKCS1_PADDING_SIZE  11
00223 
00224 #define RSA_set_app_data(s,arg)         RSA_set_ex_data(s,0,arg)
00225 #define RSA_get_app_data(s)             RSA_get_ex_data(s,0)
00226 
00227 RSA *   RSA_new(void);
00228 RSA *   RSA_new_method(ENGINE *engine);
00229 int     RSA_size(const RSA *);
00230 
00231 
00232 /* New version */
00233 IMPORT_C int    RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
00234 
00235 IMPORT_C int    RSA_check_key(const RSA *);
00236         /* next 4 return -1 on error */
00237 IMPORT_C int    RSA_public_encrypt(int flen, const unsigned char *from,
00238                 unsigned char *to, RSA *rsa,int padding);
00239 IMPORT_C int    RSA_private_encrypt(int flen, const unsigned char *from,
00240                 unsigned char *to, RSA *rsa,int padding);
00241 IMPORT_C int    RSA_public_decrypt(int flen, const unsigned char *from, 
00242                 unsigned char *to, RSA *rsa,int padding);
00243 IMPORT_C int    RSA_private_decrypt(int flen, const unsigned char *from, 
00244                 unsigned char *to, RSA *rsa,int padding);
00245 IMPORT_C void   RSA_free (RSA *r);
00246 /* "up" the RSA object's reference count */
00247 IMPORT_C int    RSA_up_ref(RSA *r);
00248 
00249 IMPORT_C int    RSA_flags(const RSA *r);
00250 
00251 IMPORT_C void RSA_set_default_method(const RSA_METHOD *meth);
00252 IMPORT_C const RSA_METHOD *RSA_get_default_method(void);
00253 IMPORT_C const RSA_METHOD *RSA_get_method(const RSA *rsa);
00254 IMPORT_C int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
00255 
00256 /* This function needs the memory locking malloc callbacks to be installed */
00257 IMPORT_C int RSA_memory_lock(RSA *r);
00258 
00259 /* these are the actual SSLeay RSA functions */
00260 IMPORT_C const RSA_METHOD *RSA_PKCS1_SSLeay(void);
00261 
00262 IMPORT_C const RSA_METHOD *RSA_null_method(void);
00263 
00264 DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey)
00265 DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey)
00266 
00267 #ifndef OPENSSL_NO_FP_API
00268 IMPORT_C int    RSA_print_fp(FILE *fp, const RSA *r,int offset);
00269 #endif
00270 
00271 #ifndef OPENSSL_NO_BIO
00272 IMPORT_C int    RSA_print(BIO *bp, const RSA *r,int offset);
00273 #endif
00274 
00275 IMPORT_C int i2d_RSA_NET(const RSA *a, unsigned char **pp,
00276                 int (*cb)(char *buf, int len, const char *prompt, int verify),
00277                 int sgckey);
00278 IMPORT_C RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
00279                  int (*cb)(char *buf, int len, const char *prompt, int verify),
00280                  int sgckey);
00281 
00282 IMPORT_C int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
00283                      int (*cb)(char *buf, int len, const char *prompt,
00284                                int verify));
00285 IMPORT_C RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
00286                       int (*cb)(char *buf, int len, const char *prompt,
00287                                 int verify));
00288 
00289 /* The following 2 functions sign and verify a X509_SIG ASN1 object
00290  * inside PKCS#1 padded RSA encryption */
00291 IMPORT_C int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
00292         unsigned char *sigret, unsigned int *siglen, RSA *rsa);
00293 IMPORT_C int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
00294         unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
00295 
00296 /* The following 2 function sign and verify a ASN1_OCTET_STRING
00297  * object inside PKCS#1 padded RSA encryption */
00298 IMPORT_C int RSA_sign_ASN1_OCTET_STRING(int type,
00299         const unsigned char *m, unsigned int m_length,
00300         unsigned char *sigret, unsigned int *siglen, RSA *rsa);
00301 IMPORT_C int RSA_verify_ASN1_OCTET_STRING(int type,
00302         const unsigned char *m, unsigned int m_length,
00303         unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
00304 
00305 IMPORT_C int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
00306 IMPORT_C void RSA_blinding_off(RSA *rsa);
00307 IMPORT_C BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
00308 
00309 IMPORT_C int RSA_padding_add_PKCS1_type_1(unsigned char *to,int tlen,
00310         const unsigned char *f,int fl);
00311 IMPORT_C int RSA_padding_check_PKCS1_type_1(unsigned char *to,int tlen,
00312         const unsigned char *f,int fl,int rsa_len);
00313 IMPORT_C int RSA_padding_add_PKCS1_type_2(unsigned char *to,int tlen,
00314         const unsigned char *f,int fl);
00315 IMPORT_C int RSA_padding_check_PKCS1_type_2(unsigned char *to,int tlen,
00316         const unsigned char *f,int fl,int rsa_len);
00317 IMPORT_C int PKCS1_MGF1(unsigned char *mask, long len,
00318         const unsigned char *seed, long seedlen, const EVP_MD *dgst);
00319 IMPORT_C int RSA_padding_add_PKCS1_OAEP(unsigned char *to,int tlen,
00320         const unsigned char *f,int fl,
00321         const unsigned char *p,int pl);
00322 IMPORT_C int RSA_padding_check_PKCS1_OAEP(unsigned char *to,int tlen,
00323         const unsigned char *f,int fl,int rsa_len,
00324         const unsigned char *p,int pl);
00325 IMPORT_C int RSA_padding_add_SSLv23(unsigned char *to,int tlen,
00326         const unsigned char *f,int fl);
00327 IMPORT_C int RSA_padding_check_SSLv23(unsigned char *to,int tlen,
00328         const unsigned char *f,int fl,int rsa_len);
00329 IMPORT_C int RSA_padding_add_none(unsigned char *to,int tlen,
00330         const unsigned char *f,int fl);
00331 IMPORT_C int RSA_padding_check_none(unsigned char *to,int tlen,
00332         const unsigned char *f,int fl,int rsa_len);
00333 IMPORT_C int RSA_padding_add_X931(unsigned char *to,int tlen,
00334         const unsigned char *f,int fl);
00335 IMPORT_C int RSA_padding_check_X931(unsigned char *to,int tlen,
00336         const unsigned char *f,int fl,int rsa_len);
00337 IMPORT_C int RSA_X931_hash_id(int nid);
00338 
00339 IMPORT_C int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
00340                         const EVP_MD *Hash, const unsigned char *EM, int sLen);
00341 IMPORT_C int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
00342                         const unsigned char *mHash,
00343                         const EVP_MD *Hash, int sLen);
00344 
00345 IMPORT_C int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
00346         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
00347 IMPORT_C int RSA_set_ex_data(RSA *r,int idx,void *arg);
00348 IMPORT_C void *RSA_get_ex_data(const RSA *r, int idx);
00349 
00350 IMPORT_C RSA *RSAPublicKey_dup(RSA *rsa);
00351 IMPORT_C RSA *RSAPrivateKey_dup(RSA *rsa);
00352 
00353 /* BEGIN ERROR CODES */
00354 /* The following lines are auto generated by the script mkerr.pl. Any changes
00355  * made after this point may be overwritten when the script is next run.
00356  */
00357 IMPORT_C void ERR_load_RSA_strings(void);
00358 
00359 /* Error codes for the RSA functions. */
00360 
00361 /* Function codes. */
00362 #define RSA_F_MEMORY_LOCK                                100
00363 #define RSA_F_RSA_BUILTIN_KEYGEN                         129
00364 #define RSA_F_RSA_CHECK_KEY                              123
00365 #define RSA_F_RSA_EAY_PRIVATE_DECRYPT                    101
00366 #define RSA_F_RSA_EAY_PRIVATE_ENCRYPT                    102
00367 #define RSA_F_RSA_EAY_PUBLIC_DECRYPT                     103
00368 #define RSA_F_RSA_EAY_PUBLIC_ENCRYPT                     104
00369 #define RSA_F_RSA_GENERATE_KEY                           105
00370 #define RSA_F_RSA_MEMORY_LOCK                            130
00371 #define RSA_F_RSA_NEW_METHOD                             106
00372 #define RSA_F_RSA_NULL                                   124
00373 #define RSA_F_RSA_NULL_MOD_EXP                           131
00374 #define RSA_F_RSA_NULL_PRIVATE_DECRYPT                   132
00375 #define RSA_F_RSA_NULL_PRIVATE_ENCRYPT                   133
00376 #define RSA_F_RSA_NULL_PUBLIC_DECRYPT                    134
00377 #define RSA_F_RSA_NULL_PUBLIC_ENCRYPT                    135
00378 #define RSA_F_RSA_PADDING_ADD_NONE                       107
00379 #define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP                 121
00380 #define RSA_F_RSA_PADDING_ADD_PKCS1_PSS                  125
00381 #define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1               108
00382 #define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2               109
00383 #define RSA_F_RSA_PADDING_ADD_SSLV23                     110
00384 #define RSA_F_RSA_PADDING_ADD_X931                       127
00385 #define RSA_F_RSA_PADDING_CHECK_NONE                     111
00386 #define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP               122
00387 #define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1             112
00388 #define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2             113
00389 #define RSA_F_RSA_PADDING_CHECK_SSLV23                   114
00390 #define RSA_F_RSA_PADDING_CHECK_X931                     128
00391 #define RSA_F_RSA_PRINT                                  115
00392 #define RSA_F_RSA_PRINT_FP                               116
00393 #define RSA_F_RSA_SETUP_BLINDING                         136
00394 #define RSA_F_RSA_SIGN                                   117
00395 #define RSA_F_RSA_SIGN_ASN1_OCTET_STRING                 118
00396 #define RSA_F_RSA_VERIFY                                 119
00397 #define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING               120
00398 #define RSA_F_RSA_VERIFY_PKCS1_PSS                       126
00399 
00400 /* Reason codes. */
00401 #define RSA_R_ALGORITHM_MISMATCH                         100
00402 #define RSA_R_BAD_E_VALUE                                101
00403 #define RSA_R_BAD_FIXED_HEADER_DECRYPT                   102
00404 #define RSA_R_BAD_PAD_BYTE_COUNT                         103
00405 #define RSA_R_BAD_SIGNATURE                              104
00406 #define RSA_R_BLOCK_TYPE_IS_NOT_01                       106
00407 #define RSA_R_BLOCK_TYPE_IS_NOT_02                       107
00408 #define RSA_R_DATA_GREATER_THAN_MOD_LEN                  108
00409 #define RSA_R_DATA_TOO_LARGE                             109
00410 #define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE                110
00411 #define RSA_R_DATA_TOO_LARGE_FOR_MODULUS                 132
00412 #define RSA_R_DATA_TOO_SMALL                             111
00413 #define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE                122
00414 #define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY                 112
00415 #define RSA_R_DMP1_NOT_CONGRUENT_TO_D                    124
00416 #define RSA_R_DMQ1_NOT_CONGRUENT_TO_D                    125
00417 #define RSA_R_D_E_NOT_CONGRUENT_TO_1                     123
00418 #define RSA_R_FIRST_OCTET_INVALID                        133
00419 #define RSA_R_INVALID_HEADER                             137
00420 #define RSA_R_INVALID_MESSAGE_LENGTH                     131
00421 #define RSA_R_INVALID_PADDING                            138
00422 #define RSA_R_INVALID_TRAILER                            139
00423 #define RSA_R_IQMP_NOT_INVERSE_OF_Q                      126
00424 #define RSA_R_KEY_SIZE_TOO_SMALL                         120
00425 #define RSA_R_LAST_OCTET_INVALID                         134
00426 #define RSA_R_MODULUS_TOO_LARGE                          105
00427 #define RSA_R_NO_PUBLIC_EXPONENT                         140
00428 #define RSA_R_NULL_BEFORE_BLOCK_MISSING                  113
00429 #define RSA_R_N_DOES_NOT_EQUAL_P_Q                       127
00430 #define RSA_R_OAEP_DECODING_ERROR                        121
00431 #define RSA_R_SLEN_RECOVERY_FAILED                       135
00432 #define RSA_R_PADDING_CHECK_FAILED                       114
00433 #define RSA_R_P_NOT_PRIME                                128
00434 #define RSA_R_Q_NOT_PRIME                                129
00435 #define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED               130
00436 #define RSA_R_SSLV3_ROLLBACK_ATTACK                      115
00437 #define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116
00438 #define RSA_R_UNKNOWN_ALGORITHM_TYPE                     117
00439 #define RSA_R_UNKNOWN_PADDING_TYPE                       118
00440 #define RSA_R_WRONG_SIGNATURE_LENGTH                     119
00441 #define RSA_R_SLEN_CHECK_FAILED                          136
00442 
00443 #ifdef  __cplusplus
00444 }
00445 #endif
00446 #endif

Copyright © Nokia Corporation 2001-2008
Back to top