| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:23+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
# #-#-#-#-# archlinux: EVP_PKEY_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-# |
| 20 |
# |
| 21 |
#. #-#-#-#-# archlinux: EVP_PKEY_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-# |
| 22 |
#. Required to disable full justification in groff 1.23.0. |
| 23 |
#. ======================================================================== |
| 24 |
#. type: IX |
| 25 |
#. #-#-#-#-# debian-trixie: EVP_PKEY_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-# |
| 26 |
#. ======================================================================== |
| 27 |
#. type: IX |
| 28 |
#. #-#-#-#-# debian-unstable: EVP_PKEY_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-# |
| 29 |
#. ======================================================================== |
| 30 |
#. type: IX |
| 31 |
#: archlinux debian-trixie debian-unstable |
| 32 |
#, no-wrap |
| 33 |
msgid "Title" |
| 34 |
msgstr "" |
| 35 |
|
| 36 |
# |
| 37 |
#. Required to disable full justification in groff 1.23.0. |
| 38 |
#. ======================================================================== |
| 39 |
#. type: IX |
| 40 |
#: archlinux |
| 41 |
#, no-wrap |
| 42 |
msgid "EVP_PKEY_VERIFY 3ssl" |
| 43 |
msgstr "" |
| 44 |
|
| 45 |
#. type: TH |
| 46 |
#: archlinux debian-trixie debian-unstable |
| 47 |
#, no-wrap |
| 48 |
msgid "EVP_PKEY_VERIFY" |
| 49 |
msgstr "" |
| 50 |
|
| 51 |
#. type: TH |
| 52 |
#: archlinux debian-trixie debian-unstable |
| 53 |
#, no-wrap |
| 54 |
msgid "2026-04-07" |
| 55 |
msgstr "" |
| 56 |
|
| 57 |
#. type: TH |
| 58 |
#: archlinux debian-unstable |
| 59 |
#, no-wrap |
| 60 |
msgid "3.6.2" |
| 61 |
msgstr "" |
| 62 |
|
| 63 |
#. type: TH |
| 64 |
#: archlinux debian-trixie debian-unstable |
| 65 |
#, no-wrap |
| 66 |
msgid "OpenSSL" |
| 67 |
msgstr "" |
| 68 |
|
| 69 |
#. type: SH |
| 70 |
#: archlinux debian-trixie debian-unstable |
| 71 |
#, no-wrap |
| 72 |
msgid "NAME" |
| 73 |
msgstr "" |
| 74 |
|
| 75 |
#. type: Plain text |
| 76 |
#: archlinux debian-trixie debian-unstable |
| 77 |
msgid "" |
| 78 |
"EVP_PKEY_verify_init, EVP_PKEY_verify_init_ex, EVP_PKEY_verify_init_ex2, " |
| 79 |
"EVP_PKEY_verify, EVP_PKEY_verify_message_init, " |
| 80 |
"EVP_PKEY_verify_message_update, EVP_PKEY_verify_message_final, " |
| 81 |
"EVP_PKEY_CTX_set_signature - signature verification using a public key " |
| 82 |
"algorithm" |
| 83 |
msgstr "" |
| 84 |
|
| 85 |
#. type: IX |
| 86 |
#: archlinux debian-trixie debian-unstable |
| 87 |
#, no-wrap |
| 88 |
msgid "SYNOPSIS" |
| 89 |
msgstr "" |
| 90 |
|
| 91 |
#. type: IX |
| 92 |
#: archlinux debian-trixie debian-unstable |
| 93 |
#, no-wrap |
| 94 |
msgid "Header" |
| 95 |
msgstr "" |
| 96 |
|
| 97 |
#. type: Plain text |
| 98 |
#: archlinux debian-trixie debian-unstable |
| 99 |
#, no-wrap |
| 100 |
msgid "" |
| 101 |
"\\& #include E<lt>openssl/evp.hE<gt>\n" |
| 102 |
"\\&\n" |
| 103 |
"\\& int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);\n" |
| 104 |
"\\& int EVP_PKEY_verify_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);\n" |
| 105 |
"\\& int EVP_PKEY_verify_init_ex2(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *algo,\n" |
| 106 |
"\\& const OSSL_PARAM params[]);\n" |
| 107 |
"\\& int EVP_PKEY_verify_message_init(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *algo,\n" |
| 108 |
"\\& const OSSL_PARAM params[]);\n" |
| 109 |
"\\& int EVP_PKEY_CTX_set_signature(EVP_PKEY_CTX *pctx,\n" |
| 110 |
"\\& const unsigned char *sig, size_t siglen);\n" |
| 111 |
"\\& int EVP_PKEY_verify_message_update(EVP_PKEY_CTX *ctx,\n" |
| 112 |
"\\& unsigned char *in, size_t inlen);\n" |
| 113 |
"\\& int EVP_PKEY_verify_message_final(EVP_PKEY_CTX *ctx);\n" |
| 114 |
"\\& int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,\n" |
| 115 |
"\\& const unsigned char *sig, size_t siglen,\n" |
| 116 |
"\\& const unsigned char *tbs, size_t tbslen);\n" |
| 117 |
msgstr "" |
| 118 |
|
| 119 |
#. type: IX |
| 120 |
#: archlinux debian-trixie debian-unstable |
| 121 |
#, no-wrap |
| 122 |
msgid "DESCRIPTION" |
| 123 |
msgstr "" |
| 124 |
|
| 125 |
#. type: Plain text |
| 126 |
#: archlinux debian-trixie debian-unstable |
| 127 |
msgid "" |
| 128 |
"\\&B<EVP_PKEY_verify_init()> initializes a public key algorithm context " |
| 129 |
"I<ctx> for verification using the algorithm given when the context was " |
| 130 |
"created using B<EVP_PKEY_CTX_new>\\|(3) or variants thereof. The algorithm " |
| 131 |
"is used to fetch a B<EVP_SIGNATURE> method implicitly, see \"Implicit " |
| 132 |
"fetch\" in B<provider>\\|(7) for more information about implicit fetches." |
| 133 |
msgstr "" |
| 134 |
|
| 135 |
#. type: Plain text |
| 136 |
#: archlinux debian-trixie debian-unstable |
| 137 |
msgid "" |
| 138 |
"\\&B<EVP_PKEY_verify_init_ex()> is the same as B<EVP_PKEY_verify_init()> but " |
| 139 |
"additionally sets the passed parameters I<params> on the context before " |
| 140 |
"returning." |
| 141 |
msgstr "" |
| 142 |
|
| 143 |
#. type: Plain text |
| 144 |
#: archlinux debian-trixie debian-unstable |
| 145 |
msgid "" |
| 146 |
"\\&B<EVP_PKEY_verify_init_ex2()> is the same as " |
| 147 |
"B<EVP_PKEY_verify_init_ex()>, but works with an explicitly fetched " |
| 148 |
"B<EVP_SIGNATURE> I<algo>. A context I<ctx> without a pre-loaded key cannot " |
| 149 |
"be used with this function. Depending on what algorithm was fetched, " |
| 150 |
"certain details revolving around the treatment of the input to " |
| 151 |
"B<EVP_PKEY_verify()> may be pre-determined, and in that case, those details " |
| 152 |
"may normally not be changed. See \"NOTES\" below for a deeper explanation." |
| 153 |
msgstr "" |
| 154 |
|
| 155 |
#. type: Plain text |
| 156 |
#: archlinux debian-unstable |
| 157 |
msgid "" |
| 158 |
"\\&B<EVP_PKEY_verify_message_init()> initializes a public key algorithm " |
| 159 |
"context \\&I<ctx> for verifying an unlimited size message using the " |
| 160 |
"algorithm given by \\&I<algo> and the key given through " |
| 161 |
"B<EVP_PKEY_CTX_new>\\|(3) or \\&B<EVP_PKEY_CTX_new_from_pkey>\\|(3). " |
| 162 |
"Passing the message is supported both in a one-shot fashion using " |
| 163 |
"\\&B<EVP_PKEY_verify()>, and through the combination of " |
| 164 |
"\\&B<EVP_PKEY_verify_message_update()> and " |
| 165 |
"B<EVP_PKEY_verify_message_final()>. This function enables using algorithms " |
| 166 |
"that can process input of arbitrary length, such as ED25519, RSA-SHA256 and " |
| 167 |
"similar." |
| 168 |
msgstr "" |
| 169 |
|
| 170 |
#. type: Plain text |
| 171 |
#: archlinux debian-unstable |
| 172 |
msgid "" |
| 173 |
"\\&B<EVP_PKEY_CTX_set_signature()> specifies the I<siglen> bytes long " |
| 174 |
"signature \\&I<sig> to be verified against by " |
| 175 |
"B<EVP_PKEY_verify_message_final()>. It I<must> be used together with " |
| 176 |
"B<EVP_PKEY_verify_message_update()> and " |
| 177 |
"\\&B<EVP_PKEY_verify_message_final()>. See \"NOTES\" below for a deeper " |
| 178 |
"explanation." |
| 179 |
msgstr "" |
| 180 |
|
| 181 |
#. type: Plain text |
| 182 |
#: archlinux |
| 183 |
msgid "" |
| 184 |
"\\&B<EVP_PKEY_verify_message_update()> adds I<inlen> bytes from I<in> to the " |
| 185 |
"data to be processed for verification. The signature algorithm " |
| 186 |
"specification and implementation determine how the input bytes are processed " |
| 187 |
"and if there\\*(Aqs a limit on the total size of the input. See \"NOTES\" " |
| 188 |
"below for a deeper explanation." |
| 189 |
msgstr "" |
| 190 |
|
| 191 |
#. type: Plain text |
| 192 |
#: archlinux debian-unstable |
| 193 |
msgid "" |
| 194 |
"\\&B<EVP_PKEY_verify_message_final()> verifies the processed data, given " |
| 195 |
"only I<ctx>. The signature to verify against must have been given with " |
| 196 |
"\\&B<EVP_PKEY_CTX_set_signature()>." |
| 197 |
msgstr "" |
| 198 |
|
| 199 |
#. type: Plain text |
| 200 |
#: archlinux debian-unstable |
| 201 |
msgid "" |
| 202 |
"\\&B<EVP_PKEY_verify()> is a one-shot function that performs the same thing " |
| 203 |
"as \\&B<EVP_PKEY_CTX_set_signature()> call with I<sig> and I<siglen> as " |
| 204 |
"parameters, followed by a single B<EVP_PKEY_verify_message_update()> call " |
| 205 |
"with I<tbs> and \\&I<tbslen>, followed by B<EVP_PKEY_verify_message_final()> " |
| 206 |
"call." |
| 207 |
msgstr "" |
| 208 |
|
| 209 |
#. type: IX |
| 210 |
#: archlinux debian-trixie debian-unstable |
| 211 |
#, no-wrap |
| 212 |
msgid "NOTES" |
| 213 |
msgstr "" |
| 214 |
|
| 215 |
#. type: IX |
| 216 |
#: archlinux debian-trixie debian-unstable |
| 217 |
#, no-wrap |
| 218 |
msgid "General" |
| 219 |
msgstr "" |
| 220 |
|
| 221 |
#. type: IX |
| 222 |
#: archlinux debian-trixie debian-unstable |
| 223 |
#, no-wrap |
| 224 |
msgid "Subsection" |
| 225 |
msgstr "" |
| 226 |
|
| 227 |
#. type: Plain text |
| 228 |
#: archlinux debian-trixie debian-unstable |
| 229 |
msgid "" |
| 230 |
"Some signature implementations only accumulate the input data and do no " |
| 231 |
"further processing before verifying it (they expect the input to be a " |
| 232 |
"digest), while others compress the data, typically by internally producing a " |
| 233 |
"digest, and signing the result, which is then verified against a given " |
| 234 |
"signature. Some of them support both modes of operation at the same time. " |
| 235 |
"The caller is expected to know how the chosen algorithm is supposed to " |
| 236 |
"behave and under what conditions." |
| 237 |
msgstr "" |
| 238 |
|
| 239 |
#. type: Plain text |
| 240 |
#: archlinux debian-trixie debian-unstable |
| 241 |
msgid "" |
| 242 |
"For example, an RSA implementation can be expected to only expect a digest " |
| 243 |
"as input, while ED25519 can be expected to process the input with a hash, " |
| 244 |
"i.e. to produce the digest internally, and while RSA-SHA256 can be expected " |
| 245 |
"to handle either mode of operation, depending on if the operation was " |
| 246 |
"initialized with B<EVP_PKEY_verify_init_ex2()> or with " |
| 247 |
"B<EVP_PKEY_verify_message_init()>." |
| 248 |
msgstr "" |
| 249 |
|
| 250 |
#. type: Plain text |
| 251 |
#: archlinux debian-trixie debian-unstable |
| 252 |
msgid "" |
| 253 |
"Similarly, an RSA implementation usually expects additional details to be " |
| 254 |
"set, like the message digest algorithm that the input is supposed to be " |
| 255 |
"digested with, as well as the padding mode (see " |
| 256 |
"B<EVP_PKEY_CTX_set_signature_md>\\|(3) and " |
| 257 |
"\\&B<EVP_PKEY_CTX_set_rsa_padding>\\|(3) and similar others), while an RSA-" |
| 258 |
"SHA256 implementation usually has these details pre-set and immutable." |
| 259 |
msgstr "" |
| 260 |
|
| 261 |
#. type: Plain text |
| 262 |
#: archlinux |
| 263 |
msgid "" |
| 264 |
"The functions described here can\\*(Aqt be used to combine separate " |
| 265 |
"algorithms. In particular, neither B<EVP_PKEY_CTX_set_signature_md>\\|(3) " |
| 266 |
"nor the B<OSSL_PARAM> parameter \"digest\" (B<OSSL_SIGNATURE_PARAM_DIGEST>) " |
| 267 |
"can be used to combine a signature algorithm with a hash algorithm to " |
| 268 |
"process the input. In other words, it\\*(Aqs not possible to specify a " |
| 269 |
"I<ctx> pre-loaded with an RSA pkey, or an I<algo> that fetched " |
| 270 |
"CW<\\*(C`RSA\\*(C'> and try to specify SHA256 separately to get the " |
| 271 |
"functionality of RSA-SHA256. If combining algorithms in that manner is " |
| 272 |
"desired, please use B<EVP_DigestVerifyInit>\\|(3) and associated functions, " |
| 273 |
"or \\&B<EVP_VerifyInit>\\|(3) and associated functions." |
| 274 |
msgstr "" |
| 275 |
|
| 276 |
#. type: IX |
| 277 |
#: archlinux debian-trixie debian-unstable |
| 278 |
#, no-wrap |
| 279 |
msgid "Performing multiple verifications" |
| 280 |
msgstr "" |
| 281 |
|
| 282 |
#. type: Plain text |
| 283 |
#: archlinux debian-trixie debian-unstable |
| 284 |
msgid "" |
| 285 |
"When initialized using B<EVP_PKEY_verify_init_ex()> or " |
| 286 |
"B<EVP_PKEY_verify_init_ex2()>, \\&B<EVP_PKEY_verify()> can be called more " |
| 287 |
"than once on the same context to have several one-shot operations performed " |
| 288 |
"using the same parameters." |
| 289 |
msgstr "" |
| 290 |
|
| 291 |
#. type: Plain text |
| 292 |
#: archlinux |
| 293 |
msgid "" |
| 294 |
"When initialized using B<EVP_PKEY_verify_message_init()>, it\\*(Aqs not " |
| 295 |
"possible to call B<EVP_PKEY_verify()> multiple times." |
| 296 |
msgstr "" |
| 297 |
|
| 298 |
#. type: IX |
| 299 |
#: archlinux debian-trixie debian-unstable |
| 300 |
#, no-wrap |
| 301 |
msgid "On EVP_PKEY_CTX_set_signature()" |
| 302 |
msgstr "" |
| 303 |
|
| 304 |
#. type: Plain text |
| 305 |
#: archlinux |
| 306 |
msgid "" |
| 307 |
"Some signature algorithms (such as LMS) require the signature verification " |
| 308 |
"data be specified before verifying the message. Other algorithms allow the " |
| 309 |
"signature to be specified late. To allow either way (which may depend on " |
| 310 |
"the application\\*(Aqs flow of input), the signature to be verified against " |
| 311 |
"I<must> be specified using this function when using " |
| 312 |
"B<EVP_PKEY_verify_message_update()> and B<EVP_PKEY_verify_message_final()> " |
| 313 |
"to perform the verification." |
| 314 |
msgstr "" |
| 315 |
|
| 316 |
#. type: IX |
| 317 |
#: archlinux debian-trixie debian-unstable |
| 318 |
#, no-wrap |
| 319 |
msgid "RETURN VALUES" |
| 320 |
msgstr "" |
| 321 |
|
| 322 |
#. type: Plain text |
| 323 |
#: archlinux debian-trixie debian-unstable |
| 324 |
msgid "" |
| 325 |
"All functions return 1 for success and 0 or a negative value for failure. " |
| 326 |
"However, unlike other functions, the return value 0 from " |
| 327 |
"B<EVP_PKEY_verify()>, \\&B<EVP_PKEY_verify_recover()> and " |
| 328 |
"B<EVP_PKEY_verify_message_final()> only indicates that the signature did not " |
| 329 |
"verify successfully (that is tbs did not match the original data or the " |
| 330 |
"signature was of invalid form) it is not an indication of a more serious " |
| 331 |
"error." |
| 332 |
msgstr "" |
| 333 |
|
| 334 |
#. type: Plain text |
| 335 |
#: archlinux debian-trixie debian-unstable |
| 336 |
msgid "" |
| 337 |
"A negative value indicates an error other that signature verification " |
| 338 |
"failure. In particular a return value of -2 indicates the operation is not " |
| 339 |
"supported by the public key algorithm." |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
#. type: IX |
| 343 |
#: archlinux debian-trixie debian-unstable |
| 344 |
#, no-wrap |
| 345 |
msgid "EXAMPLES" |
| 346 |
msgstr "" |
| 347 |
|
| 348 |
#. type: IX |
| 349 |
#: archlinux debian-trixie debian-unstable |
| 350 |
#, no-wrap |
| 351 |
msgid "RSA with PKCS#1 padding for SHA256" |
| 352 |
msgstr "" |
| 353 |
|
| 354 |
#. type: Plain text |
| 355 |
#: archlinux debian-trixie debian-unstable |
| 356 |
msgid "Verify signature using PKCS#1 padding and a SHA256 digest as input:" |
| 357 |
msgstr "" |
| 358 |
|
| 359 |
#. type: Plain text |
| 360 |
#: archlinux debian-trixie debian-unstable |
| 361 |
#, no-wrap |
| 362 |
msgid "" |
| 363 |
"\\& #include E<lt>openssl/evp.hE<gt>\n" |
| 364 |
"\\& #include E<lt>openssl/rsa.hE<gt>\n" |
| 365 |
"\\&\n" |
| 366 |
"\\& EVP_PKEY_CTX *ctx;\n" |
| 367 |
"\\& unsigned char *md, *sig;\n" |
| 368 |
"\\& size_t mdlen, siglen;\n" |
| 369 |
"\\& EVP_PKEY *verify_key;\n" |
| 370 |
"\\&\n" |
| 371 |
"\\& /*\n" |
| 372 |
"\\& * NB: assumes verify_key, sig, siglen md and mdlen are already set up\n" |
| 373 |
"\\& * and that verify_key is an RSA public key\n" |
| 374 |
"\\& */\n" |
| 375 |
"\\& ctx = EVP_PKEY_CTX_new(verify_key, NULL /* no engine */);\n" |
| 376 |
"\\& if (ctx == NULL)\n" |
| 377 |
"\\& /* Error occurred */\n" |
| 378 |
"\\& if (EVP_PKEY_verify_init(ctx) E<lt>= 0)\n" |
| 379 |
"\\& /* Error */\n" |
| 380 |
"\\& if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) E<lt>= 0)\n" |
| 381 |
"\\& /* Error */\n" |
| 382 |
"\\& if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) E<lt>= 0)\n" |
| 383 |
"\\& /* Error */\n" |
| 384 |
"\\&\n" |
| 385 |
"\\& /* Perform operation */\n" |
| 386 |
"\\& ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen);\n" |
| 387 |
"\\&\n" |
| 388 |
"\\& /*\n" |
| 389 |
"\\& * ret == 1 indicates success, 0 verify failure and E<lt> 0 for some\n" |
| 390 |
"\\& * other error.\n" |
| 391 |
"\\& */\n" |
| 392 |
msgstr "" |
| 393 |
|
| 394 |
#. type: IX |
| 395 |
#: archlinux debian-trixie debian-unstable |
| 396 |
#, no-wrap |
| 397 |
msgid "RSA-SHA256 with a pre-computed digest" |
| 398 |
msgstr "" |
| 399 |
|
| 400 |
#. type: Plain text |
| 401 |
#: archlinux debian-trixie debian-unstable |
| 402 |
msgid "" |
| 403 |
"Verify a digest with RSA-SHA256 using one-shot functions. To be noted is " |
| 404 |
"that RSA-SHA256 is assumed to be an implementation of " |
| 405 |
"CW<\\*(C`sha256WithRSAEncryption\\*(C'>, for which the padding is pre-" |
| 406 |
"determined to be B<RSA_PKCS1_PADDING>, and the input digest is assumed to " |
| 407 |
"have been computed using SHA256." |
| 408 |
msgstr "" |
| 409 |
|
| 410 |
#. type: Plain text |
| 411 |
#: archlinux debian-trixie debian-unstable |
| 412 |
#, no-wrap |
| 413 |
msgid "" |
| 414 |
"\\& #include E<lt>openssl/evp.hE<gt>\n" |
| 415 |
"\\& #include E<lt>openssl/rsa.hE<gt>\n" |
| 416 |
"\\&\n" |
| 417 |
"\\& EVP_PKEY_CTX *ctx;\n" |
| 418 |
"\\& /* md is a SHA-256 digest in this example. */\n" |
| 419 |
"\\& unsigned char *md, *sig;\n" |
| 420 |
"\\& size_t mdlen = 32, siglen;\n" |
| 421 |
"\\& EVP_PKEY *signing_key;\n" |
| 422 |
"\\&\n" |
| 423 |
"\\& /*\n" |
| 424 |
"\\& * NB: assumes verify_key, sig, siglen, md and mdlen are already set up\n" |
| 425 |
"\\& * and that verify_key is an RSA public key\n" |
| 426 |
"\\& */\n" |
| 427 |
"\\& ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);\n" |
| 428 |
"\\& alg = EVP_SIGNATURE_fetch(NULL, \"RSA-SHA256\", NULL);\n" |
| 429 |
"\\&\n" |
| 430 |
"\\& if (ctx == NULL)\n" |
| 431 |
"\\& /* Error occurred */\n" |
| 432 |
"\\& if (EVP_PKEY_verify_init_ex2(ctx, alg, NULL) E<lt>= 0)\n" |
| 433 |
"\\& /* Error */\n" |
| 434 |
"\\&\n" |
| 435 |
"\\& /* Determine buffer length */\n" |
| 436 |
"\\& if (EVP_PKEY_verify(ctx, sig, siglen, md, mdlen) E<lt>= 0)\n" |
| 437 |
"\\& /* Error or signature doesn\\*(Aqt verify */\n" |
| 438 |
"\\&\n" |
| 439 |
"\\& /* Perform operation */\n" |
| 440 |
"\\& ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen);\n" |
| 441 |
"\\&\n" |
| 442 |
"\\& /*\n" |
| 443 |
"\\& * ret == 1 indicates success, 0 verify failure and E<lt> 0 for some\n" |
| 444 |
"\\& * other error.\n" |
| 445 |
"\\& */\n" |
| 446 |
msgstr "" |
| 447 |
|
| 448 |
#. type: IX |
| 449 |
#: archlinux debian-trixie debian-unstable |
| 450 |
#, no-wrap |
| 451 |
msgid "RSA-SHA256, one-shot" |
| 452 |
msgstr "" |
| 453 |
|
| 454 |
#. type: Plain text |
| 455 |
#: archlinux debian-trixie debian-unstable |
| 456 |
msgid "" |
| 457 |
"Verify a document with RSA-SHA256 using one-shot functions. To be noted is " |
| 458 |
"that RSA-SHA256 is assumed to be an implementation of " |
| 459 |
"\\&CW<\\*(C`sha256WithRSAEncryption\\*(C'>, for which the padding is pre-" |
| 460 |
"determined to be \\&B<RSA_PKCS1_PADDING>." |
| 461 |
msgstr "" |
| 462 |
|
| 463 |
#. type: Plain text |
| 464 |
#: archlinux debian-trixie debian-unstable |
| 465 |
#, no-wrap |
| 466 |
msgid "" |
| 467 |
"\\& #include E<lt>openssl/evp.hE<gt>\n" |
| 468 |
"\\& #include E<lt>openssl/rsa.hE<gt>\n" |
| 469 |
"\\&\n" |
| 470 |
"\\& EVP_PKEY_CTX *ctx;\n" |
| 471 |
"\\& /* in the input in this example. */\n" |
| 472 |
"\\& unsigned char *in, *sig;\n" |
| 473 |
"\\& /* inlen is the length of the input in this example. */\n" |
| 474 |
"\\& size_t inlen, siglen;\n" |
| 475 |
"\\& EVP_PKEY *signing_key;\n" |
| 476 |
"\\& EVP_SIGNATURE *alg;\n" |
| 477 |
"\\&\n" |
| 478 |
"\\& /*\n" |
| 479 |
"\\& * NB: assumes signing_key, in and inlen are set up before\n" |
| 480 |
"\\& * the next step. signing_key must be an RSA private key,\n" |
| 481 |
"\\& * in must point to data to be digested and signed, and\n" |
| 482 |
"\\& * inlen must be the size of the data in bytes.\n" |
| 483 |
"\\& */\n" |
| 484 |
"\\& ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);\n" |
| 485 |
"\\& alg = EVP_SIGNATURE_fetch(NULL, \"RSA-SHA256\", NULL);\n" |
| 486 |
"\\&\n" |
| 487 |
"\\& if (ctx == NULL || alg == NULL)\n" |
| 488 |
"\\& /* Error occurred */\n" |
| 489 |
"\\& if (EVP_PKEY_verify_message_init(ctx, alg, NULL) E<lt>= 0)\n" |
| 490 |
"\\& /* Error */\n" |
| 491 |
"\\&\n" |
| 492 |
"\\& /* Perform operation */\n" |
| 493 |
"\\& ret = EVP_PKEY_verify(ctx, sig, siglen, in, inlen);\n" |
| 494 |
"\\&\n" |
| 495 |
"\\& /*\n" |
| 496 |
"\\& * ret == 1 indicates success, 0 verify failure and E<lt> 0 for some\n" |
| 497 |
"\\& * other error.\n" |
| 498 |
"\\& */\n" |
| 499 |
msgstr "" |
| 500 |
|
| 501 |
#. type: IX |
| 502 |
#: archlinux debian-trixie debian-unstable |
| 503 |
#, no-wrap |
| 504 |
msgid "RSA-SHA256, using update and final" |
| 505 |
msgstr "" |
| 506 |
|
| 507 |
#. type: Plain text |
| 508 |
#: archlinux debian-trixie debian-unstable |
| 509 |
msgid "" |
| 510 |
"This is the same as the previous example, but allowing stream-like " |
| 511 |
"functionality." |
| 512 |
msgstr "" |
| 513 |
|
| 514 |
#. type: Plain text |
| 515 |
#: archlinux debian-trixie debian-unstable |
| 516 |
#, no-wrap |
| 517 |
msgid "" |
| 518 |
"\\& #include E<lt>openssl/evp.hE<gt>\n" |
| 519 |
"\\& #include E<lt>openssl/rsa.hE<gt>\n" |
| 520 |
"\\&\n" |
| 521 |
"\\& EVP_PKEY_CTX *ctx;\n" |
| 522 |
"\\& /* in is the input in this example. */\n" |
| 523 |
"\\& unsigned char *in, *sig;\n" |
| 524 |
"\\& /* inlen is the length of the input in this example. */\n" |
| 525 |
"\\& size_t inlen, siglen;\n" |
| 526 |
"\\& EVP_PKEY *signing_key;\n" |
| 527 |
"\\& EVP_SIGNATURE *alg;\n" |
| 528 |
"\\&\n" |
| 529 |
"\\& /*\n" |
| 530 |
"\\& * NB: assumes signing_key, in and inlen are set up before\n" |
| 531 |
"\\& * the next step. signing_key must be an RSA private key,\n" |
| 532 |
"\\& * in must point to data to be digested and signed, and\n" |
| 533 |
"\\& * inlen must be the size of the data in bytes.\n" |
| 534 |
"\\& */\n" |
| 535 |
"\\& ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);\n" |
| 536 |
"\\& alg = EVP_SIGNATURE_fetch(NULL, \"RSA-SHA256\", NULL);\n" |
| 537 |
"\\&\n" |
| 538 |
"\\& if (ctx == NULL || alg == NULL)\n" |
| 539 |
"\\& /* Error occurred */\n" |
| 540 |
"\\& if (EVP_PKEY_verify_message_init(ctx, alg, NULL) E<lt>= 0)\n" |
| 541 |
"\\& /* Error */\n" |
| 542 |
"\\&\n" |
| 543 |
"\\& /* We have the signature, specify it early */\n" |
| 544 |
"\\& EVP_PKEY_CTX_set_signature(ctx, sig, siglen);\n" |
| 545 |
"\\&\n" |
| 546 |
"\\& /* Perform operation */\n" |
| 547 |
"\\& while (inlen E<gt> 0) {\n" |
| 548 |
"\\& if (EVP_PKEY_verify_message_update(ctx, in, inlen)) E<lt>= 0)\n" |
| 549 |
"\\& /* Error */\n" |
| 550 |
"\\& if (inlen E<gt> 256) {\n" |
| 551 |
"\\& inlen -= 256;\n" |
| 552 |
"\\& in += 256;\n" |
| 553 |
"\\& } else {\n" |
| 554 |
"\\& inlen = 0;\n" |
| 555 |
"\\& }\n" |
| 556 |
"\\& }\n" |
| 557 |
"\\& ret = EVP_PKEY_verify_message_final(ctx);\n" |
| 558 |
"\\&\n" |
| 559 |
"\\& /*\n" |
| 560 |
"\\& * ret == 1 indicates success, 0 verify failure and E<lt> 0 for some\n" |
| 561 |
"\\& * other error.\n" |
| 562 |
"\\& */\n" |
| 563 |
msgstr "" |
| 564 |
|
| 565 |
#. type: IX |
| 566 |
#: archlinux debian-trixie debian-unstable |
| 567 |
#, no-wrap |
| 568 |
msgid "SEE ALSO" |
| 569 |
msgstr "" |
| 570 |
|
| 571 |
#. type: Plain text |
| 572 |
#: archlinux debian-trixie debian-unstable |
| 573 |
msgid "" |
| 574 |
"\\&B<EVP_PKEY_CTX_new>\\|(3), \\&B<EVP_PKEY_encrypt>\\|(3), " |
| 575 |
"\\&B<EVP_PKEY_decrypt>\\|(3), \\&B<EVP_PKEY_sign>\\|(3), " |
| 576 |
"\\&B<EVP_PKEY_verify_recover>\\|(3), \\&B<EVP_PKEY_derive>\\|(3)" |
| 577 |
msgstr "" |
| 578 |
|
| 579 |
#. type: IX |
| 580 |
#: archlinux debian-trixie debian-unstable |
| 581 |
#, no-wrap |
| 582 |
msgid "HISTORY" |
| 583 |
msgstr "" |
| 584 |
|
| 585 |
#. type: Plain text |
| 586 |
#: archlinux debian-trixie debian-unstable |
| 587 |
msgid "" |
| 588 |
"The B<EVP_PKEY_verify_init()> and B<EVP_PKEY_verify()> functions were added " |
| 589 |
"in OpenSSL 1.0.0." |
| 590 |
msgstr "" |
| 591 |
|
| 592 |
#. type: Plain text |
| 593 |
#: archlinux debian-trixie debian-unstable |
| 594 |
msgid "The B<EVP_PKEY_verify_init_ex()> function was added in OpenSSL 3.0." |
| 595 |
msgstr "" |
| 596 |
|
| 597 |
#. type: Plain text |
| 598 |
#: archlinux debian-trixie debian-unstable |
| 599 |
msgid "" |
| 600 |
"The B<EVP_PKEY_verify_init_ex2()>, B<EVP_PKEY_verify_message_init()>, " |
| 601 |
"\\&B<EVP_PKEY_verify_message_update()>, B<EVP_PKEY_verify_message_final()> " |
| 602 |
"and \\&B<EVP_PKEY_CTX_set_signature()> functions where added in OpenSSL 3.4." |
| 603 |
msgstr "" |
| 604 |
|
| 605 |
#. type: IX |
| 606 |
#: archlinux debian-trixie debian-unstable |
| 607 |
#, no-wrap |
| 608 |
msgid "COPYRIGHT" |
| 609 |
msgstr "" |
| 610 |
|
| 611 |
#. type: Plain text |
| 612 |
#: archlinux debian-unstable |
| 613 |
msgid "Copyright 2006-2025 The OpenSSL Project Authors. All Rights Reserved." |
| 614 |
msgstr "" |
| 615 |
|
| 616 |
#. type: Plain text |
| 617 |
#: archlinux debian-trixie debian-unstable |
| 618 |
msgid "" |
| 619 |
"Licensed under the Apache License 2.0 (the \"License\"). You may not use " |
| 620 |
"this file except in compliance with the License. You can obtain a copy in " |
| 621 |
"the file LICENSE in the source distribution or at E<lt>https://" |
| 622 |
"www.openssl.org/source/license.htmlE<gt>." |
| 623 |
msgstr "" |
| 624 |
|
| 625 |
#. ======================================================================== |
| 626 |
#. type: IX |
| 627 |
#: debian-trixie debian-unstable |
| 628 |
#, no-wrap |
| 629 |
msgid "EVP_PKEY_VERIFY 3SSL" |
| 630 |
msgstr "" |
| 631 |
|
| 632 |
#. type: TH |
| 633 |
#: debian-trixie |
| 634 |
#, no-wrap |
| 635 |
msgid "3.5.6" |
| 636 |
msgstr "" |
| 637 |
|
| 638 |
#. type: Plain text |
| 639 |
#: debian-trixie |
| 640 |
msgid "" |
| 641 |
"\\&B<EVP_PKEY_verify_message_init()> initializes a public key algorithm " |
| 642 |
"context \\&I<ctx> for verifying an unlimited size message using the " |
| 643 |
"algorithm given by \\&I<algo> and the key given through " |
| 644 |
"B<EVP_PKEY_CTX_new>\\|(3) or \\&B<EVP_PKEY_CTX_new_from_pkey>\\|(3). " |
| 645 |
"Passing the message is supported both in a one-shot fashion using " |
| 646 |
"\\&B<EVP_PKEY_verify()>, and through the combination of " |
| 647 |
"B<EVP_PKEY_verify_update()> and \\&B<EVP_PKEY_verify_final()>. This " |
| 648 |
"function enables using algorithms that can process input of arbitrary " |
| 649 |
"length, such as ED25519, RSA-SHA256 and similar." |
| 650 |
msgstr "" |
| 651 |
|
| 652 |
#. type: Plain text |
| 653 |
#: debian-trixie |
| 654 |
msgid "" |
| 655 |
"\\&B<EVP_PKEY_CTX_set_signature()> specifies the I<siglen> bytes long " |
| 656 |
"signature \\&I<sig> to be verified against by B<EVP_PKEY_verify_final()>. " |
| 657 |
"It I<must> be used together with B<EVP_PKEY_verify_update()> and " |
| 658 |
"\\&B<EVP_PKEY_verify_final()>. See \"NOTES\" below for a deeper explanation." |
| 659 |
msgstr "" |
| 660 |
|
| 661 |
#. type: Plain text |
| 662 |
#: debian-trixie |
| 663 |
msgid "" |
| 664 |
"\\&B<EVP_PKEY_verify_update()> adds I<inlen> bytes from I<in> to the data to " |
| 665 |
"be processed for verification. The signature algorithm specification and " |
| 666 |
"implementation determine how the input bytes are processed and if there's a " |
| 667 |
"limit on the total size of the input. See \"NOTES\" below for a deeper " |
| 668 |
"explanation." |
| 669 |
msgstr "" |
| 670 |
|
| 671 |
#. type: Plain text |
| 672 |
#: debian-trixie |
| 673 |
msgid "" |
| 674 |
"\\&B<EVP_PKEY_verify_final()> verifies the processed data, given only " |
| 675 |
"I<ctx>. The signature to verify against must have been given with " |
| 676 |
"\\&B<EVP_PKEY_CTX_set_signature()>." |
| 677 |
msgstr "" |
| 678 |
|
| 679 |
#. type: Plain text |
| 680 |
#: debian-trixie |
| 681 |
msgid "" |
| 682 |
"\\&B<EVP_PKEY_verify()> is a one-shot function that performs the same thing " |
| 683 |
"as \\&B<EVP_PKEY_CTX_set_signature()> call with I<sig> and I<siglen> as " |
| 684 |
"parameters, followed by a single B<EVP_PKEY_verify_update()> call with " |
| 685 |
"I<tbs> and I<tbslen>, followed by B<EVP_PKEY_verify_final()> call." |
| 686 |
msgstr "" |
| 687 |
|
| 688 |
#. type: Plain text |
| 689 |
#: debian-trixie debian-unstable |
| 690 |
msgid "" |
| 691 |
"The functions described here can't be used to combine separate algorithms. " |
| 692 |
"In particular, neither B<EVP_PKEY_CTX_set_signature_md>\\|(3) nor the " |
| 693 |
"B<OSSL_PARAM> parameter \"digest\" (B<OSSL_SIGNATURE_PARAM_DIGEST>) can be " |
| 694 |
"used to combine a signature algorithm with a hash algorithm to process the " |
| 695 |
"input. In other words, it's not possible to specify a I<ctx> pre-loaded " |
| 696 |
"with an RSA pkey, or an I<algo> that fetched CW<\\*(C`RSA\\*(C'> and try to " |
| 697 |
"specify SHA256 separately to get the functionality of RSA-SHA256. If " |
| 698 |
"combining algorithms in that manner is desired, please use " |
| 699 |
"B<EVP_DigestVerifyInit>\\|(3) and associated functions, or " |
| 700 |
"\\&B<EVP_VerifyInit>\\|(3) and associated functions." |
| 701 |
msgstr "" |
| 702 |
|
| 703 |
#. type: Plain text |
| 704 |
#: debian-trixie debian-unstable |
| 705 |
msgid "" |
| 706 |
"When initialized using B<EVP_PKEY_verify_message_init()>, it's not possible " |
| 707 |
"to call B<EVP_PKEY_verify()> multiple times." |
| 708 |
msgstr "" |
| 709 |
|
| 710 |
#. type: Plain text |
| 711 |
#: debian-trixie debian-unstable |
| 712 |
msgid "" |
| 713 |
"Some signature algorithms (such as LMS) require the signature verification " |
| 714 |
"data be specified before verifying the message. Other algorithms allow the " |
| 715 |
"signature to be specified late. To allow either way (which may depend on " |
| 716 |
"the application's flow of input), the signature to be verified against " |
| 717 |
"I<must> be specified using this function when using " |
| 718 |
"B<EVP_PKEY_verify_message_update()> and B<EVP_PKEY_verify_message_final()> " |
| 719 |
"to perform the verification." |
| 720 |
msgstr "" |
| 721 |
|
| 722 |
#. type: Plain text |
| 723 |
#: debian-trixie |
| 724 |
msgid "Copyright 2006-2024 The OpenSSL Project Authors. All Rights Reserved." |
| 725 |
msgstr "" |
| 726 |
|
| 727 |
#. type: Plain text |
| 728 |
#: debian-unstable |
| 729 |
msgid "" |
| 730 |
"\\&B<EVP_PKEY_verify_message_update()> adds I<inlen> bytes from I<in> to the " |
| 731 |
"data to be processed for verification. The signature algorithm " |
| 732 |
"specification and implementation determine how the input bytes are processed " |
| 733 |
"and if there's a limit on the total size of the input. See \"NOTES\" below " |
| 734 |
"for a deeper explanation." |
| 735 |
msgstr "" |