Skip to content

[DTLS] Add NamedCurve::P384#40

Closed
ymtdzzz wants to merge 2 commits intowebrtc-rs:masterfrom
ymtdzzz:dtls/named-curve-p384
Closed

[DTLS] Add NamedCurve::P384#40
ymtdzzz wants to merge 2 commits intowebrtc-rs:masterfrom
ymtdzzz:dtls/named-curve-p384

Conversation

@ymtdzzz
Copy link
Copy Markdown
Contributor

@ymtdzzz ymtdzzz commented Dec 14, 2020

#24

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 14, 2020

Codecov Report

Merging #40 (9efdfa2) into master (f66d2e3) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
- Coverage   67.56%   67.50%   -0.07%     
==========================================
  Files         143      143              
  Lines        8785     8793       +8     
  Branches     1858     1860       +2     
==========================================
  Hits         5936     5936              
- Misses       1228     1236       +8     
  Partials     1621     1621              
Impacted Files Coverage Δ
dtls/src/curve/named_curve.rs 70.00% <0.00%> (-17.50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f66d2e3...9efdfa2. Read the comment docs.

@ymtdzzz
Copy link
Copy Markdown
Contributor Author

ymtdzzz commented Dec 14, 2020

@rainliu
I'm implementing NamedCurve::P384 support with ring::agreement .
However, it doesn't support agreement with reusable keys, so I think we should wait for briansmith/ring#1081 to be merged.

Details

https://docs.rs/ring/0.16.19/ring/agreement/fn.agree_ephemeral.html

pub fn agree_ephemeral<B: AsRef<[u8]>, F, R, E>(
    my_private_key: EphemeralPrivateKey, 
    peer_public_key: &UnparsedPublicKey<B>, 
    error_value: E, 
    kdf: F
) -> Result<R, E> 
where
    F: FnOnce(&[u8]) -> Result<R, E>, 

Are there any alternatives?

@rainliu
Copy link
Copy Markdown
Member

rainliu commented Dec 15, 2020

@zeroclock, what about alternative p384: https://docs.rs/p384/0.5.0/p384/ ?

I implement NamedCurve::P256 using p256. p384 should be similar.

@rainliu
Copy link
Copy Markdown
Member

rainliu commented Dec 15, 2020

ops, looks like p384 doesn't have ecdh Elliptic Curve Diffie-Hellman (Ephemeral) Support

@ymtdzzz
Copy link
Copy Markdown
Contributor Author

ymtdzzz commented Dec 15, 2020

Thanks for your reply.
Yeah, p384 crate seems to support only ecdsa.
I’ll do more some research for now.

@rainliu
Copy link
Copy Markdown
Member

rainliu commented Jan 1, 2021

close this PR. Please send PR To github.com/webrtc-rs/dtls repo

@rainliu rainliu closed this Jan 1, 2021
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

Successfully merging this pull request may close these issues.

2 participants