Skip to content

Upgrade ssh_connection_hash from SHA1 to SHA256#595

Open
xnox wants to merge 1 commit intoopenssh:masterfrom
xnox:session-sha256-v2
Open

Upgrade ssh_connection_hash from SHA1 to SHA256#595
xnox wants to merge 1 commit intoopenssh:masterfrom
xnox:session-sha256-v2

Conversation

@xnox
Copy link
Copy Markdown

@xnox xnox commented Sep 7, 2025

Upgrade ssh_connection_hash from SHA1 to SHA256. Due to increased
length, instead of using hex encoding, use base64url encoding, which
for SHA256 is only slightly longer than hex SHA1.

This change enables building and using ssh completely without SHA1.

@xnox xnox force-pushed the session-sha256-v2 branch from 12c8ace to f200754 Compare September 11, 2025 12:50
Upgrade ssh_connection_hash from SHA1 to SHA256. Due to increased
length, instead of using hex encoding, use base64url encoding, which
for SHA256 is only slightly longer than hex SHA1.

This change enables building and using ssh completely without SHA1.
@xnox xnox force-pushed the session-sha256-v2 branch from f200754 to 265fc7b Compare November 9, 2025 21:01
@sivizius
Copy link
Copy Markdown

base85(sha256(foo)) should be exactly the size of hex(sha1(foo)), is this an option?

@xnox
Copy link
Copy Markdown
Author

xnox commented Nov 25, 2025

base85(sha256(foo)) should be exactly the size of hex(sha1(foo)), is this an option?

From mailing lists, one of the requirements that it has to be URL and file-system safe name, base85 seems to use \ and / which are not safe on filesystems - things can fail with "no such directory" because of slashes.

@sivizius
Copy link
Copy Markdown

From mailing lists, one of the requirements that it has to be URL and file-system safe name

I see, then nevermind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants