-
Notifications
You must be signed in to change notification settings - Fork 2k
IBM protected key support for ECDSA and EdDSA #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This patch introduces support for ECDSA and EdDSA keys backed by IBM hardware. IBM private keys are passed from PEM file format while public keys will be passed by the existing file parsing mechanisms of OpenSSH. IBM protected keys are hardware protected keys that prevent the keys from being used on other systems which helps to prevent MitM attacks. Signed-off-by: Finn Callies <[email protected]>
|
IMO this would be better supported as a PKCS#11 module that could be loaded into ssh-agent. This would eliminate the need for special code in OpenSSH, but would allow these keys to be used for user and host authentication like any others. FYI EdDSA support for PKCS#11 keys is being worked on in djmdjm/openssh-wip#58 |
|
Maybe I misunderstand something but the ssh-agent is for keys used during authentication by the client. What we are trying to do is using an hardware protected key which is solely useable by the machine it was generated on to authenticate the SERVER to the client. As I read the manpages ssh-agent is a convenience tool for ssh and not for sshd. Correct me if I am wrong. |
|
ssh-agent is usable by both the client and the server. On the server is may be used to provide access to the private host keys, see https://man.openbsd.org/sshd_config.5#HostKeyAgent for some more details. Note that when you use a HostKeyAgent, you should list public keys in your sshd_config, e.g. |
|
In our case this will unfortunately not work because our keys are no PKCS#11 keys. An alternative to this patch would be for us to implement an openssl provider that could handle those keys but we would need OpenSSL 3.0 functions instead of the deprecated OpenSSL 1.1 functions used in OpenSSH. Is there any plan to migrate the deprecated OpenSSL functions from your side? Otherwise I would try to migrate where we need it. |
|
Which functions are you taking about? OpenSSH moved to EVP_PKEY for public
key handling a few releases ago.
|
EVP_PKEY API is one thing, but still many of these EVP functions are deprecated and will eventually go away. For example if you look at function Low level APIs and key structures are deprecated and will go away: Currently, A replacement for
This gets the curve name as C-string from the PKEY object. You can then use For all other things that one might need to obtain from a PKEY there are respective These
Currently autoconf.ac sets If you remove that you will see lots of deprecation warnings. Those should be taken seriously, in not too far future OpenSSL will most likely remove those deprecated functions finally. |
This patch introduces support for ECDSA and EdDSA keys backed by IBM hardware. IBM private keys are passed from PEM file format while public keys will be passed by the existing file parsing mechanisms of OpenSSH. IBM protected keys are hardware protected keys that prevent the keys from being used on other systems which helps to prevent MitM attacks.