Home | History | Annotate | Download | only in rsa

Lines Matching defs:mdlen

336   unsigned mdlen;
340 mdlen = EVP_MD_size(dgst);
352 if (outlen + mdlen <= len) {
356 outlen += mdlen;
376 unsigned i, emlen, mdlen;
388 mdlen = EVP_MD_size(md);
390 if (tlen < 2 * mdlen + 2) {
397 if (flen > emlen - 2 * mdlen - 1) {
403 if (emlen < 2 * mdlen + 1) {
411 db = to + mdlen + 1;
416 memset(db + mdlen, 0, emlen - flen - 2 * mdlen - 1);
417 db[emlen - flen - mdlen - 1] = 0x01;
418 memcpy(db + emlen - flen - mdlen, from, flen);
419 if (!RAND_bytes(seed, mdlen)) {
423 dbmask = OPENSSL_malloc(emlen - mdlen);
430 if (PKCS1_MGF1(dbmask, emlen - mdlen, seed, mdlen, mgf1md) < 0) {
433 for (i = 0; i < emlen - mdlen; i++) {
437 if (PKCS1_MGF1(seedmask, mdlen, db, emlen - mdlen, mgf1md) < 0) {
440 for (i = 0; i < mdlen; i++) {
454 unsigned i, dblen, mlen = -1, mdlen;
466 mdlen = EVP_MD_size(md);
471 if (flen < 1 + 2*mdlen + 1) {
477 dblen = flen - mdlen - 1;
486 maskeddb = from + 1 + mdlen;
488 if (PKCS1_MGF1(seed, mdlen, maskeddb, dblen, mgf1md)) {
491 for (i = 0; i < mdlen; i++) {
495 if (PKCS1_MGF1(db, dblen, seed, mdlen, mgf1md)) {
506 bad = CRYPTO_memcmp(db, phash, mdlen);
510 for (i = mdlen; i < dblen; i++) {