-
Notifications
You must be signed in to change notification settings - Fork 7
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
Encryption support #15
Conversation
Do you need review or do you need actual code help? I'm pretty deep with light handler currently (for past month+), as it is current thing I need to be kinda working. :) |
Actual code help, I've gotten blind on what the problem might be ;) If you could try flash an ESP with an encryption key, add For me it always fails at Been stuck at it for way too long ;) |
I do not want to promise anything but I try to have a look during this or next week. |
I added some initial light support a couple of weeks ago - did you test it? I only have a simple W2812B LED ring to test with, so the current support might not be very comprehensive. |
I'm on it a bit. For me it looks like the NNpsk0 pattern is not supported via the used noise-java library. Some links I've collected_
In noise/functions/patterns.py:49 there is handling for psk0 modifier, in https://github.com/rweather/noise-java/blob/master/src/main/java/com/southernstorm/noise/protocol/HandshakeState.java#L161 there is no such handling. Which could be reason that we get I don't know much details - so I try to reach out to the author of the noise-java library. I did not find other alternatives for now. |
By examining the Noise java source code, I do think the variant used in the OH code Thanks for looking into this @amandel ! |
I did not try to analyze the handshake fully, but the difference in the noise spec in 9.4. Pattern modifiers triggered me:
do you have the branch with psk0 support somewhere? In your tests - do you think it fails even before this stage? |
Take a look at https://github.com/seime/noise-java/tree/nn_psk0 I think it fails in the first exchange. Maybe the code to init the library is insufficient, but I cannot see the difference from the other language implementations |
Sorry, I can't take a look at this now, recovering from minor surgery.
…On Tue, 26 Mar 2024, 18:21 Arne Seime, ***@***.***> wrote:
Take a look at https://github.com/seime/noise-java/tree/nn_psk0
I think it fails in the first exchange. Maybe the code to init the library
is insufficient, but I cannot see the difference from the other language
implementations
—
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADRSCJZKHVM57ZDDYWXTPMDY2GHATAVCNFSM6AAAAABEO4QBPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRQHA4DONBVGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hope you're doing ok! |
I've reached |
Awesome @amandel ! |
I've pushed the changes to https://github.com/amandel/noise-java - this now supports I'm still unsure, after receiving the handshake response, we try to send Edit: My commit to nn_psk0 missed some parts - fixed. |
Great work @amandel - I'm travelling ATM but I'll test this over the weekend! |
@amandel With your updated Core remaining step: Getting the updated |
Great! This sounds cool. I'm not sure - I did not get response from the original author to my inquiry. But I can create a PR and ask if there is interest. For the encryption part this definitely needs some additional review - I followed the spec but with little understanding of the details. I don't know how openHAB policies are. Might be you can include it to be not blocked until the PR gets merged. BTW: If it helps, I can create a GitHub action based build pipeline so that the binaries are at least available on GitHub. (not maven central) |
Yes this would be sufficient if it is publicly available and in a stable repo. |
On "https://maven.pkg.github.com/amandel/noise-java" there is now: <dependency>
<groupId>com.southerstorm</groupId>
<artifactId>noise-java</artifactId>
<version>1.0-ESPHOME-SNAPSHOT</version>
</dependency> for now this is just meant as a temporary solution. |
I need some help on this one.
ESPHome device reports "invalid key".