Skip to content
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

Additional crates #2

Open
5 of 6 tasks
tarcieri opened this issue Sep 25, 2022 · 8 comments
Open
5 of 6 tasks

Additional crates #2

tarcieri opened this issue Sep 25, 2022 · 8 comments

Comments

@tarcieri
Copy link
Member

tarcieri commented Sep 25, 2022

This is a brainstorming issue for additional crates which could go in this repo.

  • ssh-cipher
  • ssh-derive
  • ssh-encoding
  • ssh-key
  • ssh-protocol
  • Others?

There is no current plan to provide a full SSH protocol in this repo, and we are only looking to provide common functionality which is useful for multiple SSH implementations and use cases outside full SSH protocol implementations, such as interoperating with the SSH key/certificate formats and providing linkage to the respective RustCrypto signing algorithm implementations.

However, with sufficient interest that may change.

@tarcieri tarcieri pinned this issue Oct 11, 2022
@kim
Copy link

kim commented Oct 21, 2022

How about ssh-agent wire types? Or if not, maybe the Encode / Decode traits could be made public.

@tarcieri
Copy link
Member Author

@kim splitting out the encoding traits (Decode/Encode and Reader/Writer) into their own crate (e.g. ssh-encoding) is a good idea.

I'll see if I can do that before the next release of ssh-key.

@tarcieri
Copy link
Member Author

#29 extracted an ssh-encoding crate

@1Dragoon
Copy link

1Dragoon commented Dec 6, 2022

How about ssh-agent wire types? Or if not, maybe the Encode / Decode traits could be made public.

If it interests you guys at all, I'm working on an SSH agent library that just provides a reference of the current ssh-agent draft specification, and leaves the actual implementation of the agent to the user. This differs from every rust ssh agent implementation I've seen thus far as the agent protocol itself is completely decoupled from the implementation code. Effectively the user will just impl the trait, and from there it is trivial for the user to make any kind of agent that they want.

https://github.com/1Dragoon/supersecretagent/blob/master/agent/src/lib.rs

It's far from finished (actually what would be nice is if we could marshal/unmarshal the wire protocol via an ordinary struct with a derive proc macro.) I could submit a PR if desired after my code has matured a bit more.

Also here's some code that utilizes the aforementioned trait to implement an SSH agent that supports both windows named pipes and pageant's message copy system:

https://github.com/1Dragoon/supersecretagent/blob/master/src/main.rs

I'm intending to add support for unix sockets as well as a few other features as noted in the code's comments.

@tarcieri
Copy link
Member Author

tarcieri commented Dec 6, 2022

actually what would be nice is if we could marshal/unmarshal the wire protocol via an ordinary struct with a derive proc macro

It wouldn't be terribly hard to add custom derive for ssh-encoding. We already have a similar crate for our der implementation.

Edit: ssh-derive is now a thing!

@kim
Copy link

kim commented Dec 6, 2022

I am happy with ssh-encoding as-is (the agent surface isn't terribly large). Also, async is not an option for me.

@tarcieri
Copy link
Member Author

tarcieri commented Mar 22, 2024

I've added ssh-derive to the list with the goal of supplying custom derive support for ssh-encoding, namely the Decode/Encode traits

@baloo
Copy link
Member

baloo commented Apr 6, 2024

About the ssh-agent, the plan would be to bring in https://github.com/wiktor-k/ssh-agent-lib

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

No branches or pull requests

4 participants