[noise] Susurrus: Noise implementation in Rust

Trevor Perrin trevp at trevp.net
Wed Jul 22 12:36:02 PDT 2015


On Wed, Jul 22, 2015 at 8:56 AM, Tiffany Bennett <tiffany at stormbit.net> wrote:
>
>     let mut client = HandshakeXX::new(gen_keypair());
>     let mut server = HandshakeXX::new(gen_keypair());
[...]
>
> And here is the implementation of HandshakeXX, to show how simple it
> is to add new handshake types:
>
>     pub struct HandshakeXX;
>
>     impl HandshakeXX {
>         pub fn new(local: KeyPair) -> Handshake {
>             static DESCS: &'static [&'static [Descriptor]] = &[
>                 &[Descriptor::Ephemeral],
>                 &[Descriptor::Ephemeral, Descriptor::DHEE,
> Descriptor::Static, Descriptor::DHSE],
>                 &[Descriptor::Static, Descriptor::DHSE]
>             ];
>         Handshake::new(Some(local), None, DESCS)
>         }
>     }

Cool, I like the simple APIs...


> Next up I'll likely be adding a simple TCP client/server to the CLI
> utility, akin to `openssl s_client` / `openssl s_server`.

That would be great for interop and debugging.

I'd also like to see how you tackle framing (length fields) and
versioning, since these questions about core vs higher-level
responsibilities are one of the few things that seems a little
unsettled.

Trevor


More information about the Noise mailing list