make sure RSA blinding works when the PRNG is not properly seeded;
[openssl.git] / crypto / rsa / rsa.h
index 68696f8219f0ccfe8f9405a37f785ccfb651bfe4..604fc26442740a93729275bc0831851acc18b633 100644 (file)
@@ -128,10 +128,8 @@ struct rsa_st
        int pad;
        long version;
        const RSA_METHOD *meth;
-#ifndef OPENSSL_NO_ENGINE
        /* functional reference if 'meth' is ENGINE-provided */
        ENGINE *engine;
-#endif
        BIGNUM *n;
        BIGNUM *e;
        BIGNUM *d;
@@ -164,6 +162,11 @@ struct rsa_st
 #define RSA_FLAG_CACHE_PUBLIC          0x02
 #define RSA_FLAG_CACHE_PRIVATE         0x04
 #define RSA_FLAG_BLINDING              0x08
+#define RSA_FLAG_NO_BLINDING           0x80 /* new with 0.9.6j and 0.9.7b; the built-in
+                                              * RSA implementation now uses blinding by
+                                              * default (ignoring RSA_FLAG_BLINDING),
+                                              * but other engines might not need it
+                                              */
 #define RSA_FLAG_THREAD_SAFE           0x10
 /* This flag means the private key operations will be handled by rsa_mod_exp
  * and that they do not depend on the private key components being present:
@@ -176,6 +179,8 @@ struct rsa_st
  */
 #define RSA_FLAG_SIGN_VER              0x40
 
+#define RSA_FLAG_NO_BLINDING           0x80
+
 #define RSA_PKCS1_PADDING      1
 #define RSA_SSLV23_PADDING     2
 #define RSA_NO_PADDING         3