Repository navigation
docs: reorganize cryptographic utilities guide by task - #35
Merged
Merged
Conversation
Rewrite CryptographicUtils.md around four tasks: generating key pairs, deriving public keys from private keys, validating existing key pairs, and validating host key entries, followed by a reference of algorithms, formats, errors, and deprecated API. Document how to check that a private and a public key belong together, the AsymmetricCryptographyError cases, and the known_hosts host field forms without naming internal TCPLocation helpers. Note that full known_hosts lines may carry a comment and that OpenSSH requires an RSA public exponent above 1. Update README and UserGuide links to the new anchors. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites
Documentation/CryptographicUtils.mdfrom top to bottom, organized around four tasks:0600permissions, andCodablestorage.ssh-keygen -yequivalent, the formats and OpenSSH ciphersPrivateKey(string:passphrase:)reads, passphrase handling, andderivePublicKey(from:).AsymmetricCryptographyError(new), and thePrivateKeyString/PrivateKeyFile/SSHUserKeyAlgorithmchecks.known_hostslines vs. shorthand keys and how they map toHostKeyAcceptance, accepted algorithms, what is verified, and the accepted host field forms.A closing Reference section lists the algorithms, formats, the full error table, the deprecated API, and what these APIs do not check.
README.mdandDocumentation/UserGuide.mdlinks now point to the new anchors.Corrections to the old text
TCPLocation.isValidKnownHostsHostField(_:)andknownHostsHostas public API, but both areinternal. The new text describes the accepted host field forms instead.known_hostslines may end with a comment. The old text described them as exactly three fields.Notes for reviewers
isValid_ShortHandHostKeyrequires exactly two fields, whileHostKeyAcceptance.shortHandAcceptedKeysdocuments an optional[comment]. This PR documents the current behavior and leaves the code alone.AsymmetricKeyType.isAvailablestill mentions "bundled Apple XCFrameworks" and a "system OpenSSL on Linux", which no longer matches the source-built OpenSSL. It is not changed here.import SwiftSFTP, not@testable) and passed on macOS. That suite is not part of this PR.Documentation-only change; no source files are modified.
🤖 Generated with Claude Code