| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | /* crypto/rsa/rsa_oaep.c */ | 
					
						
							|  |  |  | /* Written by Ulf Moeller. This software is distributed on an "AS IS"
 | 
					
						
							|  |  |  |    basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-12-05 18:30:21 +08:00
										 |  |  | /* EME-OAEP as defined in RFC 2437 (PKCS #1 v2.0) */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* See Victor Shoup, "OAEP reconsidered," Nov. 2000,
 | 
					
						
							|  |  |  |  * <URL: http://www.shoup.net/papers/oaep.ps.Z>
 | 
					
						
							|  |  |  |  * for problems with the security proof for the | 
					
						
							|  |  |  |  * original OAEP scheme, which EME-OAEP is based on. | 
					
						
							| 
									
										
										
										
											2001-01-24 22:59:25 +08:00
										 |  |  |  *  | 
					
						
							|  |  |  |  * A new proof can be found in E. Fujisaki, T. Okamoto, | 
					
						
							|  |  |  |  * D. Pointcheval, J. Stern, "RSA-OEAP is Still Alive!", | 
					
						
							|  |  |  |  * Dec. 2000, <URL: http://eprint.iacr.org/2000/061/>.
 | 
					
						
							|  |  |  |  * The new proof has stronger requirements for the | 
					
						
							|  |  |  |  * underlying permutation: "partial-one-wayness" instead | 
					
						
							|  |  |  |  * of one-wayness.  For the RSA function, this is | 
					
						
							|  |  |  |  * an equivalent notion. | 
					
						
							| 
									
										
										
										
											2000-12-05 18:30:21 +08:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-02-20 00:06:34 +08:00
										 |  |  | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
 | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | #include <stdio.h>
 | 
					
						
							|  |  |  | #include "cryptlib.h"
 | 
					
						
							| 
									
										
										
										
											1999-04-24 06:13:45 +08:00
										 |  |  | #include <openssl/bn.h>
 | 
					
						
							|  |  |  | #include <openssl/rsa.h>
 | 
					
						
							| 
									
										
										
										
											2001-06-20 06:30:40 +08:00
										 |  |  | #include <openssl/evp.h>
 | 
					
						
							| 
									
										
										
										
											1999-04-24 06:13:45 +08:00
										 |  |  | #include <openssl/rand.h>
 | 
					
						
							| 
									
										
										
										
											2001-07-31 07:57:25 +08:00
										 |  |  | #include <openssl/sha.h>
 | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-30 00:11:58 +08:00
										 |  |  | static int MGF1(unsigned char *mask, long len, | 
					
						
							| 
									
										
										
										
											2000-11-07 06:34:17 +08:00
										 |  |  | 	const unsigned char *seed, long seedlen); | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1999-04-20 05:31:43 +08:00
										 |  |  | int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, | 
					
						
							| 
									
										
										
										
											2000-11-07 06:34:17 +08:00
										 |  |  | 	const unsigned char *from, int flen, | 
					
						
							|  |  |  | 	const unsigned char *param, int plen) | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	int i, emlen = tlen - 1; | 
					
						
							|  |  |  | 	unsigned char *db, *seed; | 
					
						
							|  |  |  | 	unsigned char *dbmask, seedmask[SHA_DIGEST_LENGTH]; | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	if (flen > emlen - 2 * SHA_DIGEST_LENGTH - 1) | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 		RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, | 
					
						
							|  |  |  | 		   RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		return 0; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	if (emlen < 2 * SHA_DIGEST_LENGTH + 1) | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 		RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, RSA_R_KEY_SIZE_TOO_SMALL); | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		return 0; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	dbmask = OPENSSL_malloc(emlen - SHA_DIGEST_LENGTH); | 
					
						
							|  |  |  | 	if (dbmask == NULL) | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 		RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE); | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		return 0; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	to[0] = 0; | 
					
						
							|  |  |  | 	seed = to + 1; | 
					
						
							|  |  |  | 	db = to + SHA_DIGEST_LENGTH + 1; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-10-16 09:24:29 +08:00
										 |  |  | 	EVP_Digest((void *)param, plen, db, NULL, EVP_sha1(), NULL); | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	memset(db + SHA_DIGEST_LENGTH, 0, | 
					
						
							|  |  |  | 		emlen - flen - 2 * SHA_DIGEST_LENGTH - 1); | 
					
						
							|  |  |  | 	db[emlen - flen - SHA_DIGEST_LENGTH - 1] = 0x01; | 
					
						
							|  |  |  | 	memcpy(db + emlen - flen - SHA_DIGEST_LENGTH, from, (unsigned int) flen); | 
					
						
							|  |  |  | 	if (RAND_bytes(seed, SHA_DIGEST_LENGTH) <= 0) | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		return 0; | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | #ifdef PKCS_TESTVECT
 | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	memcpy(seed, | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 	   "\xaa\xfd\x12\xf6\x59\xca\xe6\x34\x89\xb4\x79\xe5\x07\x6d\xde\xc2\xf0\x6c\xb5\x8f", | 
					
						
							|  |  |  | 	   20); | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-30 00:11:58 +08:00
										 |  |  | 	if (MGF1(dbmask, emlen - SHA_DIGEST_LENGTH, seed, SHA_DIGEST_LENGTH) < 0) | 
					
						
							|  |  |  | 		return 0; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	for (i = 0; i < emlen - SHA_DIGEST_LENGTH; i++) | 
					
						
							|  |  |  | 		db[i] ^= dbmask[i]; | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-30 00:11:58 +08:00
										 |  |  | 	if (MGF1(seedmask, SHA_DIGEST_LENGTH, db, emlen - SHA_DIGEST_LENGTH) < 0) | 
					
						
							|  |  |  | 		return 0; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	for (i = 0; i < SHA_DIGEST_LENGTH; i++) | 
					
						
							|  |  |  | 		seed[i] ^= seedmask[i]; | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	OPENSSL_free(dbmask); | 
					
						
							|  |  |  | 	return 1; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1999-04-20 05:31:43 +08:00
										 |  |  | int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, | 
					
						
							| 
									
										
										
										
											2000-11-07 06:34:17 +08:00
										 |  |  | 	const unsigned char *from, int flen, int num, | 
					
						
							|  |  |  | 	const unsigned char *param, int plen) | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	int i, dblen, mlen = -1; | 
					
						
							|  |  |  | 	const unsigned char *maskeddb; | 
					
						
							|  |  |  | 	int lzero; | 
					
						
							|  |  |  | 	unsigned char *db = NULL, seed[SHA_DIGEST_LENGTH], phash[SHA_DIGEST_LENGTH]; | 
					
						
							| 
									
										
										
										
											2008-05-20 05:33:55 +08:00
										 |  |  | 	unsigned char *padded_from; | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 	int bad = 0; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	if (--num < 2 * SHA_DIGEST_LENGTH + 1) | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		/* 'num' is the length of the modulus, i.e. does not depend on the
 | 
					
						
							|  |  |  | 		 * particular ciphertext. */ | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		goto decoding_err; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	lzero = num - flen; | 
					
						
							|  |  |  | 	if (lzero < 0) | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 		/* signalling this error immediately after detection might allow
 | 
					
						
							|  |  |  | 		 * for side-channel attacks (e.g. timing if 'plen' is huge | 
					
						
							|  |  |  | 		 * -- cf. James H. Manger, "A Chosen Ciphertext Attack on RSA Optimal | 
					
						
							|  |  |  | 		 * Asymmetric Encryption Padding (OAEP) [...]", CRYPTO 2001), | 
					
						
							|  |  |  | 		 * so we use a 'bad' flag */ | 
					
						
							|  |  |  | 		bad = 1; | 
					
						
							|  |  |  | 		lzero = 0; | 
					
						
							| 
									
										
										
										
											2008-05-20 05:33:55 +08:00
										 |  |  | 		flen = num; /* don't overflow the memcpy to padded_from */ | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	dblen = num - SHA_DIGEST_LENGTH; | 
					
						
							| 
									
										
										
										
											2008-05-20 05:33:55 +08:00
										 |  |  | 	db = OPENSSL_malloc(dblen + num); | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	if (db == NULL) | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2005-05-11 11:45:39 +08:00
										 |  |  | 		RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, ERR_R_MALLOC_FAILURE); | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 		return -1; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-05-20 05:33:55 +08:00
										 |  |  | 	/* Always do this zero-padding copy (even when lzero == 0)
 | 
					
						
							|  |  |  | 	 * to avoid leaking timing info about the value of lzero. */ | 
					
						
							|  |  |  | 	padded_from = db + dblen; | 
					
						
							|  |  |  | 	memset(padded_from, 0, lzero); | 
					
						
							|  |  |  | 	memcpy(padded_from + lzero, from, flen); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	maskeddb = padded_from + SHA_DIGEST_LENGTH; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-30 00:11:58 +08:00
										 |  |  | 	if (MGF1(seed, SHA_DIGEST_LENGTH, maskeddb, dblen)) | 
					
						
							|  |  |  | 		return -1; | 
					
						
							| 
									
										
										
										
											2008-05-20 05:33:55 +08:00
										 |  |  | 	for (i = 0; i < SHA_DIGEST_LENGTH; i++) | 
					
						
							|  |  |  | 		seed[i] ^= padded_from[i]; | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  |    | 
					
						
							| 
									
										
										
										
											2008-12-30 00:11:58 +08:00
										 |  |  | 	if (MGF1(db, dblen, seed, SHA_DIGEST_LENGTH)) | 
					
						
							|  |  |  | 		return -1; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	for (i = 0; i < dblen; i++) | 
					
						
							|  |  |  | 		db[i] ^= maskeddb[i]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-10-16 09:24:29 +08:00
										 |  |  | 	EVP_Digest((void *)param, plen, phash, NULL, EVP_sha1(), NULL); | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	if (memcmp(db, phash, SHA_DIGEST_LENGTH) != 0 || bad) | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		goto decoding_err; | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 	else | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		for (i = SHA_DIGEST_LENGTH; i < dblen; i++) | 
					
						
							|  |  |  | 			if (db[i] != 0x00) | 
					
						
							|  |  |  | 				break; | 
					
						
							| 
									
										
										
										
											2008-05-20 05:33:55 +08:00
										 |  |  | 		if (i == dblen || db[i] != 0x01) | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 			goto decoding_err; | 
					
						
							|  |  |  | 		else | 
					
						
							|  |  |  | 			{ | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 			/* everything looks OK */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-05-20 05:33:55 +08:00
										 |  |  | 			mlen = dblen - ++i; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 			if (tlen < mlen) | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 				RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_DATA_TOO_LARGE); | 
					
						
							|  |  |  | 				mlen = -1; | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			else | 
					
						
							|  |  |  | 				memcpy(to, db + i, mlen); | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	OPENSSL_free(db); | 
					
						
							|  |  |  | 	return mlen; | 
					
						
							| 
									
										
										
										
											2001-09-06 18:42:56 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-06-07 02:48:49 +08:00
										 |  |  | decoding_err: | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	/* to avoid chosen ciphertext attacks, the error message should not reveal
 | 
					
						
							|  |  |  | 	 * which kind of decoding error happened */ | 
					
						
							|  |  |  | 	RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); | 
					
						
							|  |  |  | 	if (db != NULL) OPENSSL_free(db); | 
					
						
							|  |  |  | 	return -1; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | int PKCS1_MGF1(unsigned char *mask, long len, | 
					
						
							|  |  |  | 	const unsigned char *seed, long seedlen, const EVP_MD *dgst) | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	long i, outlen = 0; | 
					
						
							|  |  |  | 	unsigned char cnt[4]; | 
					
						
							|  |  |  | 	EVP_MD_CTX c; | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | 	unsigned char md[EVP_MAX_MD_SIZE]; | 
					
						
							|  |  |  | 	int mdlen; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	EVP_MD_CTX_init(&c); | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | 	mdlen = EVP_MD_size(dgst); | 
					
						
							| 
									
										
										
										
											2008-12-30 00:11:58 +08:00
										 |  |  | 	if (mdlen < 0) | 
					
						
							|  |  |  | 		return -1; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 	for (i = 0; outlen < len; i++) | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 		cnt[0] = (unsigned char)((i >> 24) & 255); | 
					
						
							|  |  |  | 		cnt[1] = (unsigned char)((i >> 16) & 255); | 
					
						
							|  |  |  | 		cnt[2] = (unsigned char)((i >> 8)) & 255; | 
					
						
							|  |  |  | 		cnt[3] = (unsigned char)(i & 255); | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | 		EVP_DigestInit_ex(&c,dgst, NULL); | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 		EVP_DigestUpdate(&c, seed, seedlen); | 
					
						
							|  |  |  | 		EVP_DigestUpdate(&c, cnt, 4); | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | 		if (outlen + mdlen <= len) | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 			{ | 
					
						
							| 
									
										
										
										
											2001-10-16 09:24:29 +08:00
										 |  |  | 			EVP_DigestFinal_ex(&c, mask + outlen, NULL); | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | 			outlen += mdlen; | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		else | 
					
						
							|  |  |  | 			{ | 
					
						
							| 
									
										
										
										
											2001-10-16 09:24:29 +08:00
										 |  |  | 			EVP_DigestFinal_ex(&c, md, NULL); | 
					
						
							| 
									
										
										
										
											2001-09-06 17:30:16 +08:00
										 |  |  | 			memcpy(mask + outlen, md, len - outlen); | 
					
						
							|  |  |  | 			outlen = len; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	EVP_MD_CTX_cleanup(&c); | 
					
						
							|  |  |  | 	return 0; | 
					
						
							| 
									
										
										
										
											1999-02-18 05:11:08 +08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-30 00:11:58 +08:00
										 |  |  | static int MGF1(unsigned char *mask, long len, const unsigned char *seed, | 
					
						
							|  |  |  | 		 long seedlen) | 
					
						
							| 
									
										
										
										
											2005-05-29 04:44:02 +08:00
										 |  |  | 	{ | 
					
						
							|  |  |  | 	return PKCS1_MGF1(mask, len, seed, seedlen, EVP_sha1()); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											1999-04-27 11:19:12 +08:00
										 |  |  | #endif
 |