Skip to content

Commit 0f3abfb

Browse files
committed
Doc change: Suggest min keysize of 2048 for keys.
Change-Id: I6dcfe9aa12338e4ad71db2e6812ce387a75c09f0
1 parent b0016e2 commit 0f3abfb

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

docs/html/guide/publishing/app-signing.jd

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -337,17 +337,6 @@ keys)</td>
337337
<td><code>-v</code></td><td>Enable verbose output.</td>
338338
</tr>
339339
<tr>
340-
<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>A name
341-
for the keystore containing the private key.</td>
342-
</tr>
343-
<tr>
344-
<td><code>-storepass &lt;password&gt;</code></td><td><p>A password for the
345-
keystore.</p><p>As a security precaution, do not include this option
346-
in your command line unless you are working at a secure computer.
347-
If not supplied, Keytool prompts you to enter the password. In this
348-
way, your password is not stored in your shell history.</p></td>
349-
</tr>
350-
<tr>
351340
<td><code>-alias &lt;alias_name&gt;</code></td><td>An alias for the key. Only
352341
the first 8 characters of the alias are used.</td>
353342
</tr>
@@ -356,29 +345,43 @@ the first 8 characters of the alias are used.</td>
356345
when generating the key. Both DSA and RSA are supported.</td>
357346
</tr>
358347
<tr>
348+
<td><code>-keysize &lt;size&gt;</code></td><td>The size of each generated key
349+
(bits). If not supplied, Keytool uses a default key size of 1024 bits. In
350+
general, we recommend using a key size of 2048 bits or higher. </td>
351+
</tr>
352+
<tr>
359353
<td><code>-dname &lt;name&gt;</code></td><td><p>A Distinguished Name that describes
360354
who created the key. The value is used as the issuer and subject fields in the
361355
self-signed certificate. </p><p>Note that you do not need to specify this option
362356
in the command line. If not supplied, Jarsigner prompts you to enter each
363357
of the Distinguished Name fields (CN, OU, and so on).</p></td>
364358
</tr>
365359
<tr>
360+
<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the
361+
key.</p> <p>As a security precaution, do not include this option in your command
362+
line. If not supplied, Keytool prompts you to enter the password. In this way,
363+
your password is not stored in your shell history.</p></td>
364+
</tr>
365+
<tr>
366366
<td><code>-validity &lt;valdays&gt;</code></td><td><p>The validity period for the
367367
key, in days. </p><p><strong>Note:</strong> A value of 10000 or greater is recommended.</p></td>
368368
</tr>
369369
<tr>
370-
<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the key.</p>
371-
<p>As a security precaution, do not include this option
372-
in your command line unless you are working at a secure computer.
373-
If not supplied, Keytool prompts you to enter the password. In this
374-
way, your password is not stored in your shell history.</p></td>
370+
<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>A name
371+
for the keystore containing the private key.</td>
372+
</tr>
373+
<tr>
374+
<td><code>-storepass &lt;password&gt;</code></td><td><p>A password for the
375+
keystore.</p><p>As a security precaution, do not include this option in your
376+
command line. If not supplied, Keytool prompts you to enter the password. In
377+
this way, your password is not stored in your shell history.</p></td>
375378
</tr>
376379
</table>
377380

378381
<p>Here's an example of a Keytool command that generates a private key:</p>
379382

380383
<pre>$ keytool -genkey -v -keystore my-release-key.keystore
381-
-alias alias_name -keyalg RSA -validity 10000</pre>
384+
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000</pre>
382385

383386
<p>Running the example command above, Keytool prompts you to provide
384387
passwords for the keystore and key, and to provide the Distinguished

0 commit comments

Comments
 (0)