mcginty / snow

A Rust implementation of the Noise Protocol Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Noise Extension: Hybrid Forward Secrecy

david415 opened this issue · comments

Are you interested in this feature?

Here's the noise fork by Yawning Angel that has the XXhfs using NewHope-Simple:

Here's the spec extension:

https://raw.githubusercontent.com/noiseprotocol/noise_spec/41d478d3dd97d77a6695f4d6cf6283e2830e9ca6/extensions/ext_hybrid_forward_secrecy.md

Yes, I'm interested in adding HFS support.

Hey all, in August/September I will probably have some time to implement this. Can I claim this issue for now?

@dsprenkels go for it :).

Here's some preliminary notes.

Hey @mcginty, today I have worked on the HFS support. I have pushed the updates to my hfs branch.

I'd like to try out your branch... What is a valid Noise HFS specification string?
This one is not valid:
Noise_XXhfs_25519+Kyber1024_ChaChaPoly_BLAKE2b

Because Trevor's spec did not mention anything about the +-syntax, I have currently implemented the resolving in a way that you have to specify the KEM separately in the builder. Let me give an example:

let params: NoiseParams = "Noise_NNhfs_25519_ChaChaPoly_SHA256".parse().unwrap();
let mut h_i = Builder::new(params.clone())
    .kem(KemChoice::Kyber1024)
    .build_initiator()
    .unwrap();

In this case, the resolver is the default resolver (not ring). Btw. don't forget to enable the hfs and pqclean_kyber1024 features.

I agree that, given the fact that Kyber1024 is currently the only supported KEM, explicitly choosing it might feel a bit pointless. Maybe this is something to be updated.

Note to self: Ask the community about this.

Hi all. I'm looking forward to this feature getting landed. No hurry I'm just saying that I'm looking forward. Cheers!

This is now merged in master.