VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_mp_names.c@ 97878

Last change on this file since 97878 was 94320, checked in by vboxsync, 3 years ago

libs/openssl-3.0.1: Export to OSE and fix copyright headers in Makefiles, bugref:10128

File size: 2.2 KB
Line 
1/*
2 * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#include <openssl/core_names.h>
11#include "crypto/rsa.h"
12
13/*
14 * The following tables are constants used during RSA parameter building
15 * operations. It is easier to point to one of these fixed strings than have
16 * to dynamically add and generate the names on the fly.
17 */
18
19/*
20 * A fixed table of names for the RSA prime factors starting with
21 * P,Q and up to 8 additional primes.
22 */
23const char *ossl_rsa_mp_factor_names[] = {
24 OSSL_PKEY_PARAM_RSA_FACTOR1,
25 OSSL_PKEY_PARAM_RSA_FACTOR2,
26#ifndef FIPS_MODULE
27 OSSL_PKEY_PARAM_RSA_FACTOR3,
28 OSSL_PKEY_PARAM_RSA_FACTOR4,
29 OSSL_PKEY_PARAM_RSA_FACTOR5,
30 OSSL_PKEY_PARAM_RSA_FACTOR6,
31 OSSL_PKEY_PARAM_RSA_FACTOR7,
32 OSSL_PKEY_PARAM_RSA_FACTOR8,
33 OSSL_PKEY_PARAM_RSA_FACTOR9,
34 OSSL_PKEY_PARAM_RSA_FACTOR10,
35#endif
36 NULL
37};
38
39/*
40 * A fixed table of names for the RSA exponents starting with
41 * DP,DQ and up to 8 additional exponents.
42 */
43const char *ossl_rsa_mp_exp_names[] = {
44 OSSL_PKEY_PARAM_RSA_EXPONENT1,
45 OSSL_PKEY_PARAM_RSA_EXPONENT2,
46#ifndef FIPS_MODULE
47 OSSL_PKEY_PARAM_RSA_EXPONENT3,
48 OSSL_PKEY_PARAM_RSA_EXPONENT4,
49 OSSL_PKEY_PARAM_RSA_EXPONENT5,
50 OSSL_PKEY_PARAM_RSA_EXPONENT6,
51 OSSL_PKEY_PARAM_RSA_EXPONENT7,
52 OSSL_PKEY_PARAM_RSA_EXPONENT8,
53 OSSL_PKEY_PARAM_RSA_EXPONENT9,
54 OSSL_PKEY_PARAM_RSA_EXPONENT10,
55#endif
56 NULL
57};
58
59/*
60 * A fixed table of names for the RSA coefficients starting with
61 * QINV and up to 8 additional exponents.
62 */
63const char *ossl_rsa_mp_coeff_names[] = {
64 OSSL_PKEY_PARAM_RSA_COEFFICIENT1,
65#ifndef FIPS_MODULE
66 OSSL_PKEY_PARAM_RSA_COEFFICIENT2,
67 OSSL_PKEY_PARAM_RSA_COEFFICIENT3,
68 OSSL_PKEY_PARAM_RSA_COEFFICIENT4,
69 OSSL_PKEY_PARAM_RSA_COEFFICIENT5,
70 OSSL_PKEY_PARAM_RSA_COEFFICIENT6,
71 OSSL_PKEY_PARAM_RSA_COEFFICIENT7,
72 OSSL_PKEY_PARAM_RSA_COEFFICIENT8,
73 OSSL_PKEY_PARAM_RSA_COEFFICIENT9,
74#endif
75 NULL
76};
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette