Lines Matching refs:flen
33 const unsigned char *from, int flen) in RSA_padding_add_PKCS1_type_1() argument
38 if (flen > (tlen - RSA_PKCS1_PADDING_SIZE)) { in RSA_padding_add_PKCS1_type_1()
49 j = tlen - 3 - flen; in RSA_padding_add_PKCS1_type_1()
53 memcpy(p, from, (unsigned int)flen); in RSA_padding_add_PKCS1_type_1()
58 const unsigned char *from, int flen, in RSA_padding_check_PKCS1_type_1() argument
77 if (num == flen) { in RSA_padding_check_PKCS1_type_1()
82 flen--; in RSA_padding_check_PKCS1_type_1()
85 if ((num != (flen + 1)) || (*(p++) != 0x01)) { in RSA_padding_check_PKCS1_type_1()
91 j = flen - 1; /* one for type. */ in RSA_padding_check_PKCS1_type_1()
127 int flen) in ossl_rsa_padding_add_PKCS1_type_2_ex() argument
132 if (flen > (tlen - RSA_PKCS1_PADDING_SIZE)) { in ossl_rsa_padding_add_PKCS1_type_2_ex()
135 } else if (flen < 0) { in ossl_rsa_padding_add_PKCS1_type_2_ex()
146 j = tlen - 3 - flen; in ossl_rsa_padding_add_PKCS1_type_2_ex()
161 memcpy(p, from, (unsigned int)flen); in ossl_rsa_padding_add_PKCS1_type_2_ex()
166 const unsigned char *from, int flen) in RSA_padding_add_PKCS1_type_2() argument
168 return ossl_rsa_padding_add_PKCS1_type_2_ex(NULL, to, tlen, from, flen); in RSA_padding_add_PKCS1_type_2()
172 const unsigned char *from, int flen, in RSA_padding_check_PKCS1_type_2() argument
181 if (tlen <= 0 || flen <= 0) in RSA_padding_check_PKCS1_type_2()
189 if (flen > num || num < RSA_PKCS1_PADDING_SIZE) { in RSA_padding_check_PKCS1_type_2()
203 for (from += flen, em += num, i = 0; i < num; i++) { in RSA_padding_check_PKCS1_type_2()
204 mask = ~constant_time_is_zero(flen); in RSA_padding_check_PKCS1_type_2()
205 flen -= 1 & mask; in RSA_padding_check_PKCS1_type_2()
391 const unsigned char *from, int flen, in ossl_rsa_padding_check_PKCS1_type_2() argument
420 if (num != flen || tlen <= 0 || flen <= 0) { in ossl_rsa_padding_check_PKCS1_type_2()
426 synthetic = OPENSSL_malloc(flen); in ossl_rsa_padding_check_PKCS1_type_2()
432 if (ossl_rsa_prf(ctx, synthetic, flen, "message", 7, kdk, flen * 8) < 0) in ossl_rsa_padding_check_PKCS1_type_2()
445 len_mask = max_sep_offset = flen - 2 - 8; in ossl_rsa_padding_check_PKCS1_type_2()
466 synth_msg_index = flen - synthetic_length; in ossl_rsa_padding_check_PKCS1_type_2()
474 for (i = 2; i < flen; i++) { in ossl_rsa_padding_check_PKCS1_type_2()
510 for (i = msg_index, j = 0; i < flen && j < tlen; i++, j++) in ossl_rsa_padding_check_PKCS1_type_2()
550 size_t flen, int client_version, in ossl_rsa_padding_check_PKCS1_type_2_TLS() argument
560 if (flen < RSA_PKCS1_PADDING_SIZE + SSL_MAX_MASTER_KEY_LENGTH in ossl_rsa_padding_check_PKCS1_type_2_TLS()
580 for (i = 2; i < flen - SSL_MAX_MASTER_KEY_LENGTH - 1; i++) in ossl_rsa_padding_check_PKCS1_type_2_TLS()
582 good &= constant_time_is_zero_8(from[flen - SSL_MAX_MASTER_KEY_LENGTH - 1]); in ossl_rsa_padding_check_PKCS1_type_2_TLS()
594 constant_time_eq(from[flen - SSL_MAX_MASTER_KEY_LENGTH], in ossl_rsa_padding_check_PKCS1_type_2_TLS()
597 constant_time_eq(from[flen - SSL_MAX_MASTER_KEY_LENGTH + 1], in ossl_rsa_padding_check_PKCS1_type_2_TLS()
614 constant_time_eq(from[flen - SSL_MAX_MASTER_KEY_LENGTH], in ossl_rsa_padding_check_PKCS1_type_2_TLS()
617 constant_time_eq(from[flen - SSL_MAX_MASTER_KEY_LENGTH + 1], in ossl_rsa_padding_check_PKCS1_type_2_TLS()
632 from[flen - SSL_MAX_MASTER_KEY_LENGTH + i], in ossl_rsa_padding_check_PKCS1_type_2_TLS()