RustCrypto / traits

Collection of cryptography-related traits
593 stars 193 forks source link

`elliptic_curve::SecretKey` supports `to_sec1_der_with_oid` #1646

Open heliannuuthus opened 3 months ago

heliannuuthus commented 3 months ago

I see that the to_sec1_der() method currently specifies EcParameters::NamedCurve as Option::None. In the protocol(sec1#114), I see that this field is optional. Can I set it to the correct value or provide another method to return OID?

image

tarcieri commented 3 months ago

It can be changed to introspect AssociatedOid and include it in the serialized document

tarcieri commented 3 months ago

You're also free to change it yourself, though it should probably be included by default

heliannuuthus commented 3 months ago

You're also free to change it yourself, though it should probably be included by default您也可以自己更改它,尽管它可能应该默认包含在内

got it~, thanks :)