diff options
author | jsing <> | 2014-07-09 20:05:54 +0000 |
---|---|---|
committer | jsing <> | 2014-07-09 20:05:54 +0000 |
commit | 04e53fcb1ccaab0710a1f0e68919e8aa48c0891c (patch) | |
tree | 4fcae5b1ec3b571d60b7fa8ff5afdd1b4e593dfe | |
parent | 912aa7ccdb6d6bc2bd2f8d06dccbb387e2e136cd (diff) | |
download | openbsd-04e53fcb1ccaab0710a1f0e68919e8aa48c0891c.tar.gz openbsd-04e53fcb1ccaab0710a1f0e68919e8aa48c0891c.tar.bz2 openbsd-04e53fcb1ccaab0710a1f0e68919e8aa48c0891c.zip |
Make comments readable.
-rw-r--r-- | src/lib/libcrypto/rsa/rsa.h | 60 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rsa/rsa.h | 60 |
2 files changed, 66 insertions, 54 deletions
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h index f51a807c3c..0cd51a7e29 100644 --- a/src/lib/libcrypto/rsa/rsa.h +++ b/src/lib/libcrypto/rsa/rsa.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa.h,v 1.21 2014/07/09 19:51:31 jsing Exp $ */ | 1 | /* $OpenBSD: rsa.h,v 1.22 2014/07/09 20:05:54 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -165,47 +165,53 @@ struct rsa_st { | |||
165 | #define RSA_3 0x3L | 165 | #define RSA_3 0x3L |
166 | #define RSA_F4 0x10001L | 166 | #define RSA_F4 0x10001L |
167 | 167 | ||
168 | #define RSA_METHOD_FLAG_NO_CHECK 0x0001 /* don't check pub/private match */ | 168 | /* Don't check pub/private match. */ |
169 | #define RSA_METHOD_FLAG_NO_CHECK 0x0001 | ||
169 | 170 | ||
170 | #define RSA_FLAG_CACHE_PUBLIC 0x0002 | 171 | #define RSA_FLAG_CACHE_PUBLIC 0x0002 |
171 | #define RSA_FLAG_CACHE_PRIVATE 0x0004 | 172 | #define RSA_FLAG_CACHE_PRIVATE 0x0004 |
172 | #define RSA_FLAG_BLINDING 0x0008 | 173 | #define RSA_FLAG_BLINDING 0x0008 |
173 | #define RSA_FLAG_THREAD_SAFE 0x0010 | 174 | #define RSA_FLAG_THREAD_SAFE 0x0010 |
174 | /* This flag means the private key operations will be handled by rsa_mod_exp | 175 | |
176 | /* | ||
177 | * This flag means the private key operations will be handled by rsa_mod_exp | ||
175 | * and that they do not depend on the private key components being present: | 178 | * and that they do not depend on the private key components being present: |
176 | * for example a key stored in external hardware. Without this flag bn_mod_exp | 179 | * for example a key stored in external hardware. Without this flag bn_mod_exp |
177 | * gets called when private key components are absent. | 180 | * gets called when private key components are absent. |
178 | */ | 181 | */ |
179 | #define RSA_FLAG_EXT_PKEY 0x0020 | 182 | #define RSA_FLAG_EXT_PKEY 0x0020 |
180 | 183 | ||
181 | /* This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify functions. | 184 | /* |
185 | * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify functions. | ||
182 | */ | 186 | */ |
183 | #define RSA_FLAG_SIGN_VER 0x0040 | 187 | #define RSA_FLAG_SIGN_VER 0x0040 |
184 | 188 | ||
185 | #define RSA_FLAG_NO_BLINDING 0x0080 /* new with 0.9.6j and 0.9.7b; the built-in | 189 | /* |
186 | * RSA implementation now uses blinding by | 190 | * New with 0.9.6j and 0.9.7b; the built-in RSA implementation now uses |
187 | * default (ignoring RSA_FLAG_BLINDING), | 191 | * blinding by default (ignoring RSA_FLAG_BLINDING), but other engines might |
188 | * but other engines might not need it | 192 | * not need it. |
189 | */ | 193 | */ |
190 | #define RSA_FLAG_NO_CONSTTIME 0x0100 /* new with 0.9.8f; the built-in RSA | 194 | #define RSA_FLAG_NO_BLINDING 0x0080 |
191 | * implementation now uses constant time | 195 | |
192 | * operations by default in private key operations, | 196 | /* |
193 | * e.g., constant time modular exponentiation, | 197 | * New with 0.9.8f; the built-in RSA implementation now uses constant time |
194 | * modular inverse without leaking branches, | 198 | * operations by default in private key operations, e.g., constant time modular |
195 | * division without leaking branches. This | 199 | * exponentiation, modular inverse without leaking branches, division without |
196 | * flag disables these constant time | 200 | * leaking branches. This flag disables these constant time operations and |
197 | * operations and results in faster RSA | 201 | * results in faster RSA private key operations. |
198 | * private key operations. | 202 | */ |
199 | */ | 203 | #define RSA_FLAG_NO_CONSTTIME 0x0100 |
204 | |||
200 | #ifndef OPENSSL_NO_DEPRECATED | 205 | #ifndef OPENSSL_NO_DEPRECATED |
201 | #define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME /* deprecated name for the flag*/ | 206 | |
202 | /* new with 0.9.7h; the built-in RSA | 207 | /* Deprecated name for the flag. */ |
203 | * implementation now uses constant time | 208 | /* |
204 | * modular exponentiation for secret exponents | 209 | * New with 0.9.7h; the built-in RSA implementation now uses constant time |
205 | * by default. This flag causes the | 210 | * modular exponentiation for secret exponents by default. This flag causes |
206 | * faster variable sliding window method to | 211 | * the faster variable sliding window method to be used for all exponents. |
207 | * be used for all exponents. | 212 | */ |
208 | */ | 213 | #define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME |
214 | |||
209 | #endif | 215 | #endif |
210 | 216 | ||
211 | 217 | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa.h b/src/lib/libssl/src/crypto/rsa/rsa.h index f51a807c3c..0cd51a7e29 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa.h +++ b/src/lib/libssl/src/crypto/rsa/rsa.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa.h,v 1.21 2014/07/09 19:51:31 jsing Exp $ */ | 1 | /* $OpenBSD: rsa.h,v 1.22 2014/07/09 20:05:54 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -165,47 +165,53 @@ struct rsa_st { | |||
165 | #define RSA_3 0x3L | 165 | #define RSA_3 0x3L |
166 | #define RSA_F4 0x10001L | 166 | #define RSA_F4 0x10001L |
167 | 167 | ||
168 | #define RSA_METHOD_FLAG_NO_CHECK 0x0001 /* don't check pub/private match */ | 168 | /* Don't check pub/private match. */ |
169 | #define RSA_METHOD_FLAG_NO_CHECK 0x0001 | ||
169 | 170 | ||
170 | #define RSA_FLAG_CACHE_PUBLIC 0x0002 | 171 | #define RSA_FLAG_CACHE_PUBLIC 0x0002 |
171 | #define RSA_FLAG_CACHE_PRIVATE 0x0004 | 172 | #define RSA_FLAG_CACHE_PRIVATE 0x0004 |
172 | #define RSA_FLAG_BLINDING 0x0008 | 173 | #define RSA_FLAG_BLINDING 0x0008 |
173 | #define RSA_FLAG_THREAD_SAFE 0x0010 | 174 | #define RSA_FLAG_THREAD_SAFE 0x0010 |
174 | /* This flag means the private key operations will be handled by rsa_mod_exp | 175 | |
176 | /* | ||
177 | * This flag means the private key operations will be handled by rsa_mod_exp | ||
175 | * and that they do not depend on the private key components being present: | 178 | * and that they do not depend on the private key components being present: |
176 | * for example a key stored in external hardware. Without this flag bn_mod_exp | 179 | * for example a key stored in external hardware. Without this flag bn_mod_exp |
177 | * gets called when private key components are absent. | 180 | * gets called when private key components are absent. |
178 | */ | 181 | */ |
179 | #define RSA_FLAG_EXT_PKEY 0x0020 | 182 | #define RSA_FLAG_EXT_PKEY 0x0020 |
180 | 183 | ||
181 | /* This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify functions. | 184 | /* |
185 | * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify functions. | ||
182 | */ | 186 | */ |
183 | #define RSA_FLAG_SIGN_VER 0x0040 | 187 | #define RSA_FLAG_SIGN_VER 0x0040 |
184 | 188 | ||
185 | #define RSA_FLAG_NO_BLINDING 0x0080 /* new with 0.9.6j and 0.9.7b; the built-in | 189 | /* |
186 | * RSA implementation now uses blinding by | 190 | * New with 0.9.6j and 0.9.7b; the built-in RSA implementation now uses |
187 | * default (ignoring RSA_FLAG_BLINDING), | 191 | * blinding by default (ignoring RSA_FLAG_BLINDING), but other engines might |
188 | * but other engines might not need it | 192 | * not need it. |
189 | */ | 193 | */ |
190 | #define RSA_FLAG_NO_CONSTTIME 0x0100 /* new with 0.9.8f; the built-in RSA | 194 | #define RSA_FLAG_NO_BLINDING 0x0080 |
191 | * implementation now uses constant time | 195 | |
192 | * operations by default in private key operations, | 196 | /* |
193 | * e.g., constant time modular exponentiation, | 197 | * New with 0.9.8f; the built-in RSA implementation now uses constant time |
194 | * modular inverse without leaking branches, | 198 | * operations by default in private key operations, e.g., constant time modular |
195 | * division without leaking branches. This | 199 | * exponentiation, modular inverse without leaking branches, division without |
196 | * flag disables these constant time | 200 | * leaking branches. This flag disables these constant time operations and |
197 | * operations and results in faster RSA | 201 | * results in faster RSA private key operations. |
198 | * private key operations. | 202 | */ |
199 | */ | 203 | #define RSA_FLAG_NO_CONSTTIME 0x0100 |
204 | |||
200 | #ifndef OPENSSL_NO_DEPRECATED | 205 | #ifndef OPENSSL_NO_DEPRECATED |
201 | #define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME /* deprecated name for the flag*/ | 206 | |
202 | /* new with 0.9.7h; the built-in RSA | 207 | /* Deprecated name for the flag. */ |
203 | * implementation now uses constant time | 208 | /* |
204 | * modular exponentiation for secret exponents | 209 | * New with 0.9.7h; the built-in RSA implementation now uses constant time |
205 | * by default. This flag causes the | 210 | * modular exponentiation for secret exponents by default. This flag causes |
206 | * faster variable sliding window method to | 211 | * the faster variable sliding window method to be used for all exponents. |
207 | * be used for all exponents. | 212 | */ |
208 | */ | 213 | #define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME |
214 | |||
209 | #endif | 215 | #endif |
210 | 216 | ||
211 | 217 | ||