| Summary: | Use the PKCS#8 formatted PEM files instead of insecure "traditional PEM" | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Jakub Jelen <jjelen> | ||||||
| Component: | ssh-keygen | Assignee: | Assigned to nobody <unassigned-bugs> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | enhancement | CC: | djm | ||||||
| Priority: | P5 | ||||||||
| Version: | 8.0p1 | ||||||||
| Hardware: | Other | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 2988 | ||||||||
| Attachments: |
|
||||||||
|
Description
Jakub Jelen
2019-05-23 01:37:20 AEST
Created attachment 3295 [details]
support pkcs#8 and PEM
I don't think we want to remove the ability to support olde PEM keys entirely as there's a bit of non-OpenSSL stuff that expects them. This adds support for PKCS#8 in parallel.
"ssh-keygen -m PKCS8 -t rsa" seems to do the right thing with this now.
Damien, thank you for the proposed patch. Fast read-through looks good to me and it is indeed a good idea to provide backward compatibility. This is also resolving the long-standing issue when the PKCS8 was used only for public keys, which I found very confusing whenever I tried to convert some keys from one format to other. Applied - thanks! commit eb0d8e708a1f958aecd2d6e2ff2450af488d4c2a Author: djm@openbsd.org <djm@openbsd.org> Date: Mon Jul 15 13:16:29 2019 +0000 upstream: support PKCS8 as an optional format for storage of private keys, enabled via "ssh-keygen -m PKCS8" on operations that save private keys to disk. The OpenSSH native key format remains the default, but PKCS8 is a superior format to PEM if interoperability with non-OpenSSH software is required, as it may use a less terrible KDF (IIRC PEM uses a single round of MD5 as a KDF). adapted from patch by Jakub Jelen via bz3013; ok markus OpenBSD-Commit-ID: 027824e3bc0b1c243dc5188504526d73a55accb1 closing resolved bugs as of 8.6p1 release |