reference/openssl/functions/openssl-pkey-get-details.xml
0e80601cabf499c7db372149916b5cb3e2740f1b
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.openssl-pkey-get-details">
3
+
<refentry xml:id="function.openssl-pkey-get-details" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>openssl_pkey_get_details</refname>
6
6
<refpurpose>Returns an array with the key details</refpurpose>
...
...
@@ -9,8 +9,8 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>openssl_pkey_get_details</methodname>
13
-
<methodparam><type>resource</type><parameter>key</parameter></methodparam>
12
+
<type class="union"><type>array</type><type>false</type></type><methodname>openssl_pkey_get_details</methodname>
13
+
<methodparam><type>OpenSSLAsymmetricKey</type><parameter>key</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
This function returns the key details (bits, key, type).
...
...
@@ -36,7 +36,7 @@
36
36
<refsect1 role="returnvalues">
37
37
&reftitle.returnvalues;
38
38
<para>
39
-
Returns an array with the key details in success or &false; in failure.
39
+
Returns an array with the key details on success or &false; on failure.
40
40
Returned array has indexes <literal>bits</literal> (number of bits),
41
41
<literal>key</literal> (string representation of the public key) and
42
42
<literal>type</literal> (type of the key which is one of
...
...
@@ -66,35 +66,35 @@
66
66
<tbody>
67
67
<row>
68
68
<entry><literal>"n"</literal></entry>
69
-
<entry></entry>
69
+
<entry>modulus</entry>
70
70
</row>
71
71
<row>
72
72
<entry><literal>"e"</literal></entry>
73
-
<entry></entry>
73
+
<entry>public exponent</entry>
74
74
</row>
75
75
<row>
76
76
<entry><literal>"d"</literal></entry>
77
-
<entry></entry>
77
+
<entry>private exponent</entry>
78
78
</row>
79
79
<row>
80
80
<entry><literal>"p"</literal></entry>
81
-
<entry></entry>
81
+
<entry>prime 1</entry>
82
82
</row>
83
83
<row>
84
84
<entry><literal>"q"</literal></entry>
85
-
<entry></entry>
85
+
<entry>prime 2</entry>
86
86
</row>
87
87
<row>
88
88
<entry><literal>"dmp1"</literal></entry>
89
-
<entry></entry>
89
+
<entry>exponent1, d mod (p-1)</entry>
90
90
</row>
91
91
<row>
92
92
<entry><literal>"dmq1"</literal></entry>
93
-
<entry></entry>
93
+
<entry>exponent2, d mod (q-1)</entry>
94
94
</row>
95
95
<row>
96
96
<entry><literal>"iqmp"</literal></entry>
97
-
<entry></entry>
97
+
<entry>coefficient, (inverse of q) mod p</entry>
98
98
</row>
99
99
</tbody>
100
100
</tgroup>
...
...
@@ -116,23 +116,23 @@
116
116
<tbody>
117
117
<row>
118
118
<entry><literal>"p"</literal></entry>
119
-
<entry></entry>
119
+
<entry>prime number (public)</entry>
120
120
</row>
121
121
<row>
122
122
<entry><literal>"q"</literal></entry>
123
-
<entry></entry>
123
+
<entry>160-bit subprime, q | p-1 (public)</entry>
124
124
</row>
125
125
<row>
126
126
<entry><literal>"g"</literal></entry>
127
-
<entry></entry>
127
+
<entry>generator of subgroup (public)</entry>
128
128
</row>
129
129
<row>
130
130
<entry><literal>"priv_key"</literal></entry>
131
-
<entry></entry>
131
+
<entry>private key x</entry>
132
132
</row>
133
133
<row>
134
134
<entry><literal>"pub_key"</literal></entry>
135
-
<entry></entry>
135
+
<entry>public key y = g^x</entry>
136
136
</row>
137
137
</tbody>
138
138
</tgroup>
...
...
@@ -154,19 +154,57 @@
154
154
<tbody>
155
155
<row>
156
156
<entry><literal>"p"</literal></entry>
157
-
<entry></entry>
157
+
<entry>prime number (shared)</entry>
158
158
</row>
159
159
<row>
160
160
<entry><literal>"g"</literal></entry>
161
-
<entry></entry>
161
+
<entry>generator of Z_p (shared)</entry>
162
162
</row>
163
163
<row>
164
164
<entry><literal>"priv_key"</literal></entry>
165
-
<entry></entry>
165
+
<entry>private DH value x</entry>
166
166
</row>
167
167
<row>
168
168
<entry><literal>"pub_key"</literal></entry>
169
-
<entry></entry>
169
+
<entry>public DH value g^x</entry>
170
+
</row>
171
+
</tbody>
172
+
</tgroup>
173
+
</informaltable>
174
+
</listitem>
175
+
<listitem>
176
+
<simpara>
177
+
<constant>OPENSSL_KEYTYPE_EC</constant>, an additional array key named <literal>"ec"</literal>,
178
+
containing the key data is returned.
179
+
</simpara>
180
+
<informaltable>
181
+
<tgroup cols="2">
182
+
<thead>
183
+
<row>
184
+
<entry>Key</entry>
185
+
<entry>&Description;</entry>
186
+
</row>
187
+
</thead>
188
+
<tbody>
189
+
<row>
190
+
<entry><literal>"curve_name"</literal></entry>
191
+
<entry>name of curve, see <function>openssl_get_curve_names</function></entry>
192
+
</row>
193
+
<row>
194
+
<entry><literal>"curve_oid"</literal></entry>
195
+
<entry>ASN1 Object identifier (OID) for EC curve.</entry>
196
+
</row>
197
+
<row>
198
+
<entry><literal>"x"</literal></entry>
199
+
<entry>x coordinate (public)</entry>
200
+
</row>
201
+
<row>
202
+
<entry><literal>"y"</literal></entry>
203
+
<entry>y coordinate (public)</entry>
204
+
</row>
205
+
<row>
206
+
<entry><literal>"d"</literal></entry>
207
+
<entry>private key</entry>
170
208
</row>
171
209
</tbody>
172
210
</tgroup>
...
...
@@ -175,8 +213,29 @@
175
213
</itemizedlist>
176
214
</refsect1>
177
215

216
+
<refsect1 role="changelog">
217
+
&reftitle.changelog;
218
+
<informaltable>
219
+
<tgroup cols="2">
220
+
<thead>
221
+
<row>
222
+
<entry>&Version;</entry>
223
+
<entry>&Description;</entry>
224
+
</row>
225
+
</thead>
226
+
<tbody>
227
+
<row>
228
+
<entry>8.0.0</entry>
229
+
<entry>
230
+
<parameter>key</parameter> accepts an <classname>OpenSSLAsymmetricKey</classname> now;
231
+
previously, a &resource; of type <literal>OpenSSL key</literal> was accepted.
232
+
</entry>
233
+
</row>
234
+
</tbody>
235
+
</tgroup>
236
+
</informaltable>
237
+
</refsect1>
178
238
</refentry>
179
-

180
239
<!-- Keep this comment at the end of the file
181
240
Local variables:
182
241
mode: sgml
183
242