Skip to content

Increase allowed BCrypt rounds from 18 to 32#119

Merged
Joannis merged 1 commit intoorlandos-nl:mainfrom
simon-mathewson:main
Jan 8, 2026
Merged

Increase allowed BCrypt rounds from 18 to 32#119
Joannis merged 1 commit intoorlandos-nl:mainfrom
simon-mathewson:main

Conversation

@simon-mathewson
Copy link
Contributor

Hi, thank you for this great package!

I noticed that when generating an OpenSSH key with a passphrase on my Mac, the default amount of iterations is 24:

ssh-keygen -t ed25519 -f ssh_key_with_passphrase -N "testpassphrase" -C "test key with passphrase"

However, Citadel doesn't support this key because in OpenSSHKey.swift the limit is set to 18 rounds, even though the underlying C code can handle more. Therefore I suggest increasing the limit to 32.

@Joannis
Copy link
Member

Joannis commented Dec 18, 2025

Thanks for the PR! This code stems from my initial work in 2017 haha.

@simon-mathewson
Copy link
Contributor Author

Ah, that explains the lower number of rounds 😄

Do you know how to fix the failing check?

@Joannis
Copy link
Member

Joannis commented Dec 18, 2025

I do! Curious it got merged into main, that's API that didn't exist until Swift 5.10 or 6.2

I'll fix it!

@Joannis Joannis merged commit c011784 into orlandos-nl:main Jan 8, 2026
0 of 4 checks passed
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