summaryrefslogtreecommitdiff
path: root/openssl/src/ec.rs
AgeCommit message (Collapse)Author
2021-01-01Use crate in imports in the openssl crateJonas Platte
This was mostly automated using `cargo fix --edition`, except imports of openssl_sys (renamed to ffi) were converted to crate::ffi, which was reverted. The same thing is not done for the openssl-sys crate because this breaks ctest (used in systest to verify the -sys crate), see https://github.com/gnzlbg/ctest/issues/70
2020-11-29Merge pull request #1345 from stbuehler/from-const-ptrSteven Fackler
Add and use ForeignTypeRefExt::from_const_ptr
2020-10-10Fix a typoRodolphe Breard
2020-09-27Add and use ForeignTypeRefExt::from_const_ptrStefan Bühler
1. `X::from_ptr(p as *mut _)` is dangerous, as it not only casts `*const X::CType` to `*mut X::CType`, but any `*const U` to `*mut X::CType`. Add and use a extension trait to provide `from_const_ptr`. 2. Often null pointers are returned as `Option<...>`; refactor the checks into `from_const_ptr_opt` for refs and `from_ptr_opt` for owned data. 3. `assert!(!p.is_null())` is easy to mistype as `assert!(p.is_null());`. Use `X::from(_const)?ptr_opt(...).expect("...")` instead.
2020-06-05Add PEM/DER serialization for EC public keyLeo
2020-05-24Run clippySteven Fackler
2019-11-14Format code using 'cargo fmt'Atul Bhosale
2019-11-11Add #[cfg(ossl110)]Lukas Lihotzki
2019-11-11Add EC_GROUP_order_bitsLukas Lihotzki
2019-06-19Expose EC_POINT_dup as EcPoint::to_ownedMike Belopuhov
2019-06-14Expose EC_GROUP_get_cofactor as EcGroup::cofactorMike Belopuhov
2019-06-13Expose EC_GROUP_get0_generator as EcGroup::generatorMike Belopuhov
2019-06-10Add Debug impl for EcKeyLeo
2019-03-19Expose EC_GROUP_get_curve_name()Nathaniel McCallum
This gives us the ability to get the Nid from an EcGroupRef.
2019-01-04Drop data_encoding dev dependencySteven Fackler
2018-05-19Support min/max version in LibreSSLSteven Fackler
Their implementations of the accessors don't behave expected with no bounds, so we ignore those bits of the tests.
2018-03-13Change function name to be similar to RSA oneRohit Aggarwal
2018-03-09Added a function to create a EC<Key> from its partsRohit Aggarwal
2018-01-06Rename key serialization/deserialization methodsSteven Fackler
Also document their specific formats. Closes #502
2018-01-01Misc cleanupSteven Fackler
2017-12-30Parameterize keys over what they containSteven Fackler
Closes #790
2017-12-25Remove deprecated APIsSteven Fackler
2017-12-25Move to associated constsSteven Fackler
2017-12-25Upgrade bitflags to 1.0Steven Fackler
Closes #756
2017-11-10Added a macro that wraps foreign type, and impl Send and Sync for both,Paul Florence
the borrowed type and the owned one. Replaced all invocation of `foreign_type` by `foreign_type_and_impl_send_sync`.
2017-11-04Merge pull request #761 from AndyGauge/doc-ecSteven Fackler
Doc ec module
2017-11-04Update data-encoding major versionJulien Cretin
2017-10-24Update documentation for EC moduleAndy Gauge
2017-10-11Began EC documenationAndy Gauge
2017-10-03Convert try! usage to ?johnthagen
2017-08-22Rename function, removing `get_`Bradley Beddoes
Fix per PR comment, should have been like this from the start :).
2017-08-21Add ability to get affine coordinates from EcPointBradley Beddoes
The initial usecase here is creating JWK representations as defined within RFC 7517 from an EcKey created via a PEM source.
2017-08-09Refine sig for set_public_key_affine_coordinatesBradley Beddoes
This functions signature was originally defined to require mutable references for `x` / `y` as the underpinning OpenSSL C API was not `const`. However the actual OpenSSL implementation makes no changes. This being the case we've chosen to reflect non mutability at the Rust level.
2017-08-09Fix EC_KEY_set_public_key_affine_coordinatesBradley Beddoes
Previous definition incorrectly used `const` pointers but the underpinning library definition (unfortunately) does not.
2017-08-09Set the private key within EcKeyBuilderBradley Beddoes
The initial usecase here is creating EcKey instances from JWK representations, that hold private keys, as defined within RFC 7517.
2017-08-09Support for EcKey creation from affine coordinatesBradley Beddoes
Sets the public key for an EcKey based on its affine co-ordinates, i.e. it constructs an EC_POINT object based on the supplied x and y values and sets the public key to be this EC_POINT. The initial usecase here is creating EcKey instances from JWK representations as defined within RFC 7517.
2017-07-15RustfmtSteven Fackler
2017-04-11(issues-600) Avoid compiling ec2m code against no-ec2m opensslAndrew Roetker
This commit avoids defining code that leads to undefined references when compiling against an openssl built with no-ec2m.
2017-04-10Add new EC/PKEY methods to permit deriving shared secrets.Andrew Osmond
2017-02-03Switch to foreign_typesSteven Fackler
2017-01-22Support EC_GROUP_set_asn1_flagSteven Fackler
Closes #561
2017-01-03Clean up EcKey example a bitSteven Fackler
2016-12-31add EcKey creation from EcPoint, public_keyBenjamin Fry
2016-11-16Return Option from groupSteven Fackler
2016-11-16Remove EcGroup constructorsSteven Fackler
You also need a generator and possibly other stuff. Let's hold off on construction until someone has a concrete requirement for them.
2016-11-15Add a test for mul_generatorSteven Fackler
2016-11-15Turns out yet another variant of EC_POINT_mul is allowed!Steven Fackler
2016-11-14Rename ec_key to ecSteven Fackler