-
Notifications
You must be signed in to change notification settings - Fork 38
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
Implement key size mismatch #195
Comments
Yeah, it seems like there's a few bugs here:
|
Hi @russelltg, I saw you have this PR #197 to fix the issue. Would it be possible to merge that? |
@russelltg I also created this PR: #216. Can you please take a look when you have a chance? I think this would be worth having even if the key size mismatch is implemented. |
Although we certainly don't want the client to behave in an unexpected or unintuitive insecure way by default, it doesn't appear that the spec is actually very prescriptive about the encryption key size selection algorithm. It might be a good idea to chose a single client API design that accommodates customization or parameterization for the key selection logic similar to what we now have for the multiplexing server listener, thanks to @pierceforte's recent contribution. Caller-Listenerhttps://haivision.github.io/srt-rfc/draft-sharabayko-srt.html#name-caller-listener-handshake
The spec also says: https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html#name-the-conclusion-response
Rendezvoushttps://haivision.github.io/srt-rfc/draft-sharabayko-srt.html#name-rendezvous-handshake
|
@pierceforte I published v0.4.4 to crates.io |
Thank you @robertream! |
@russelltg I took a deeper look at how the reference implementation handles differences between encryption settings during connection negotiation, and I found this section of the API Socket Options documentation informative: https://github.com/Haivision/srt/blob/master/docs/API/API-socket-options.md#srt_km_state
I think the solution that would be most consistent with the reference implementation, as well as true to the latest spec, would be as follows:
|
srt-rs
version: commit 1236c22I have my listener setup like this:
If I then use
ffplay
to connect like this:ffplay "srt://127.0.0.1:51379/?passphrase=wrongpass"
I get this in my console output:
If I recall correctly, the server should tell the receiver its key size. Is this a bug or has that not been implemented yet?
I know it says
not implemented
, but since "Encryption" has been marked as working in the README I thought I could use it.Note:
Setting the key size manually in
ffplay
does work (default 0):ffplay "srt://127.0.0.1:51379/?passphrase=mypass&pbkeylen=32"
But if you then use an invalid password:
ffplay "srt://127.0.0.1:51379/?passphrase=wrongpass&pbkeylen=32"
You'll get this error in your console output:
The text was updated successfully, but these errors were encountered: