commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
006c224c46d6ae65f8f3a8c5d300b98236855664
Tony Arcieri
2020-08-02T18:45:45
k256/p256: replace MulBase with Mul+NonZeroScalar+Generator (#106) Impls the changes from RustCrypto/traits#241, replacing the `MulBase` trait with a `Mul` impl on `AffinePoint`, which is now one of the required bounds for `Arithmetic`.
diff --git a/Cargo.lock b/Cargo.lock index 12aca697..49ffd23a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#a65edc...
10
46
107
026862a91f3f6cf9e6f73958851c69e8c06b39e1
Tony Arcieri
2020-08-01T02:35:41
k256: ECDSA usage with initial end-to-end doctest (#105) Adds an initial description of the crate's ECDSA-related cargo features (`ecdsa-core` and `ecdsa`) along with a basic signing/verification usage example.
diff --git a/k256/src/ecdsa.rs b/k256/src/ecdsa.rs index e4c28559..ab89024d 100644 --- a/k256/src/ecdsa.rs +++ b/k256/src/ecdsa.rs @@ -1,7 +1,51 @@ -//! Elliptic Curve Digital Signature Algorithm (ECDSA) +//! Elliptic Curve Digital Signature Algorithm (ECDSA). +//! +//! This module contains support for computing and ve...
1
45
1
f03fa7c00e2ededb264f5005e71b12a41771e814
Tony Arcieri
2020-08-01T02:28:32
k256/p256: wire up ecdsa::Verifier (#104) Adds a type alias for `ecdsa::verifier::Verifier` (introduced in RustCrypto/signatures#110) which provides a high-level ECDSA signing interface.
diff --git a/Cargo.lock b/Cargo.lock index 024c9a2f..12aca697 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.7.0-pre" -source = "git+https://github.com/RustCrypto/signatures#b95afa61699dd63d1089fa4e26eecf6f723985ef" +source = "git+https://github....
5
14
4
88badf5af9d4ebd933ec20ef4e0de0a99b31258a
Tony Arcieri
2020-07-31T03:21:38
OIDs (#103) Impls the `elliptic_curve::Identifier` trait for all curves, providing access to an `ObjectIdentifier` const.
diff --git a/Cargo.lock b/Cargo.lock index 866213d4..024c9a2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#2eb313...
4
16
4
61a71232297e478458d23da09062e09b24729e3d
Tony Arcieri
2020-07-31T01:21:48
k256/p256: update MulBase (#102) Implements the changes from RustCrypto/traits#239
diff --git a/Cargo.lock b/Cargo.lock index 03663018..866213d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#06f105...
6
56
29
b4b95195fab27f49dfc615f7320f7f3045fef09b
Tony Arcieri
2020-07-30T22:49:51
k256/p256: wire up ecdsa::Signer (#101) Adds a type alias for `ecdsa::signer::Signer`, which provides a high-level ECDSA signing interface.
diff --git a/Cargo.lock b/Cargo.lock index 10822c44..03663018 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.7.0-pre" -source = "git+https://github.com/RustCrypto/signatures#e33e8b2c69887cbae749126354966ddbf1c66b63" +source = "git+https://github....
14
72
68
c6fae2564691e14de8bed7388ddd609375eab081
Tony Arcieri
2020-07-29T18:08:08
k256/p256: impl FromPublicKey/FromSecretKey and ops::MulBase (#100) ...and remove the now legacy `FixedBaseScalarMul` trait. This commit impls the changes from RustCrypto/traits#229 and RustCrypto/traits#230: - Adds a `FromSecretKey` impl on `Scalar` - Adds a `FromPublicKey` impl on `AffinePoint` - Adds `MulB...
diff --git a/Cargo.lock b/Cargo.lock index 0178960d..10822c44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#f8a916...
5
109
84
0381cd674ab35e9c025be5edc83e4d1a4d7d6d31
Tony Arcieri
2020-07-28T21:25:27
k256/p256: use new `SignPrimitive` API; add `BlindedScalar` (#99) Updates both crates with the `SignPrimitive` changes from RustCrypto/signatures#107. These changes removed the `masking_scalar` from the trait, and replaced it with trait bounds that make it possible to substitute a blinded scalar. In the `p256...
diff --git a/Cargo.lock b/Cargo.lock index 5745c4ec..0178960d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.7.0-pre" -source = "git+https://github.com/RustCrypto/signatures#12b96e3ac5cfb4b7f5076355bce127ea5a33db53" +source = "git+https://github....
10
183
50
ac786d32231f724854fa35d7b8ca1dd58e6bd67c
Sawchord
2020-07-28T19:08:31
Deactivate default features of sha2 in Cargo.toml (#98) Set default-features = false for sha2 in Cargo.toml such that is the crate builds in no_std environment
diff --git a/p256/Cargo.toml b/p256/Cargo.toml index f2517b20..23f26f8e 100644 --- a/p256/Cargo.toml +++ b/p256/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["crypto", "ecc", "nist", "prime256v1", "secp256r1"] [dependencies] ecdsa = { version = "= 0.7.0-pre", optional = true, default-features = false } elliptic-curve = {...
1
1
1
9660e40fd211285c30d94de4c7c6581b9a8040dc
Tony Arcieri
2020-07-28T15:59:21
k256: extract method on ecdsa::recoverable::Id (#97)
diff --git a/k256/src/ecdsa/recoverable.rs b/k256/src/ecdsa/recoverable.rs index 72e98dd1..806d9555 100644 --- a/k256/src/ecdsa/recoverable.rs +++ b/k256/src/ecdsa/recoverable.rs @@ -54,15 +54,14 @@ impl Signature { let x = FieldElement::from_bytes(&r.to_bytes()); let pk = x.and_then(|x| { - ...
1
9
3
5e5c835d940c74e99124d824ab1cfcb4fc3a4daa
Bogdan Opanchuk
2020-07-28T15:04:50
Fix an overly strict debug check in FieldElement10x26::normalize_weak() (#96) And also fix the comment (a copy-paste artefact)
diff --git a/k256/src/arithmetic/field/field_10x26.rs b/k256/src/arithmetic/field/field_10x26.rs index 8d54be41..f385a5a1 100644 --- a/k256/src/arithmetic/field/field_10x26.rs +++ b/k256/src/arithmetic/field/field_10x26.rs @@ -185,8 +185,8 @@ impl FieldElement10x26 { // The first pass ensures the magnitude is ...
1
2
2
3166845d36aa3457d1ce699f78b19f6e0bccc7d7
Tony Arcieri
2020-07-28T02:53:21
k256/p256: use Arithmetic trait-based ECDSA SignPrimitive (#95) Incorporates changes from RustCrypto/signatures#106 The `ecdsa::hazmat::SignPrimitive` now bounds the elliptic curve generic parameter on `Arithmetic`, from which it sources an associated `Scalar` type.
diff --git a/Cargo.lock b/Cargo.lock index 36329019..5745c4ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.7.0-pre" -source = "git+https://github.com/RustCrypto/signatures#3800528655f34696877fbc2c8a6921088d503f0c" +source = "git+https://github....
3
1
5
d816964492cf561bde7289235e3c5f273d740084
Tony Arcieri
2020-07-28T02:09:44
k256/p256: FixedBaseScalarMul simplification (#94) Implements the changes from RustCrypto/traits#227
diff --git a/Cargo.lock b/Cargo.lock index d020d8c1..36329019 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#513eb0...
3
1
7
c9aca4e678b6c1bffaad9abafe330dcfe31a94e1
Tony Arcieri
2020-07-28T00:12:33
k256/p256: remove GenerateSecretKey impls; use Generate (#93) This trait was removed in https://github.com/RustCrypto/traits/pull/224 The `Generate` trait is now conditionally defined for `SecretKey` when an `Arithmetic` impl is available and its `Scalar` type impls `Generate`
diff --git a/Cargo.lock b/Cargo.lock index dd1a3962..d020d8c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#3fd8ac...
3
8
40
4ec278c0c510b5a526cf32ee071ebf7a9203a89a
Tony Arcieri
2020-07-27T21:49:16
Implement RustCrypto/traits#223 updates (#91) Updates usages of the elliptic-curve crate API to incorporate the changes from RustCrypto/traits#223.
diff --git a/Cargo.lock b/Cargo.lock index 3f459629..dd1a3962 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.7.0-pre" -source = "git+https://github.com/RustCrypto/signatures#3655c0b7a14a9641f847de5deb866e5ee7198a98" +source = "git+https://github....
6
38
25
5eb60d0cc5bde54f7d8144b901efc60deb26ab75
Tony Arcieri
2020-07-27T17:05:34
k256/p256: impl Generate for Scalar types (#90) Impls the new trait for random generation added in RustCrypto/traits#220. This can potentially be used to completely replace the `GenerateSecretKey` trait, since that can now be made a conditionally impl'd inherent method on `SecretKey` with where bounds on `Scala...
diff --git a/Cargo.lock b/Cargo.lock index 4b41ac19..3f459629 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#d00934...
5
73
33
2a56ecda57effc148c5ff500a6db7e3243ffbff8
Tony Arcieri
2020-07-25T20:57:07
k256/p256: add `Arithmetic` trait impls (#89) See: https://github.com/RustCrypto/traits/pull/219
diff --git a/Cargo.lock b/Cargo.lock index 31e2556c..4b41ac19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "elliptic-curve" version = "0.5.0-pre" -source = "git+https://github.com/RustCrypto/traits#3e7b86...
3
13
3
c965049406c82305ca322611752f65059b75950e
Tony Arcieri
2020-07-24T15:55:01
Move ECDSA test vectors to `test_vectors` module (#88) Somewhat more consistent with the other test vectors (for now). Unfortunately we can't make these available (yet) via the `test-vectors` cargo feature without making `hex-literal` a dependency, so they're gated with `#[cfg(test)]`.
diff --git a/k256/src/ecdsa.rs b/k256/src/ecdsa.rs index 46926e8c..96e8b721 100644 --- a/k256/src/ecdsa.rs +++ b/k256/src/ecdsa.rs @@ -133,22 +133,11 @@ pub fn normalize_s(signature: &Signature) -> Result<Signature, Error> { #[cfg(all(test, feature = "arithmetic"))] mod tests { use super::*; - use ecdsa::{dev...
6
177
166
62af947a6b2fbb2fb3c441d7676e51ff508031d5
Tony Arcieri
2020-07-24T02:09:38
p256: impl ecdsa::hazmat::{SignPrimitive, VerifyPrimitive} (#84)
diff --git a/Cargo.lock b/Cargo.lock index f9b6bfbb..31e2556c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -452,6 +452,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "hex", + "hex-literal", "proptest", "sha2", "zeroize", diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index a877add6..56a4b5f5 ...
7
330
69
061a1a2af13f9f298bec6ed70c7f94fd61958ca7
Tony Arcieri
2020-07-22T18:23:09
p256: Implement scalar arithmetic via Barrett reduction (#83) Co-authored-by: Nicolas Stalder <n@stalder.io>
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index 963475a6..c3481994 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -9,6 +9,9 @@ use elliptic_curve::rand_core::{CryptoRng, RngCore}; use super::util::{adc, mac, sbb}; +/// The number of 64-bit limbs used ...
2
616
15
058669385045de6eaeb6da7446d4904c08cd5dca
Bogdan Opanchuk
2020-07-21T14:02:24
Improved k256 point-scalar multiplication (#82) * Move point-scalar multiplication to its own module * Add endomorphism multiplication and an advanced windowed method from Ristretto * Make `from_bytes_unchecked()` for Scalar and Field pribate to the crate
diff --git a/k256/Cargo.toml b/k256/Cargo.toml index 957e194b..003b0549 100644 --- a/k256/Cargo.toml +++ b/k256/Cargo.toml @@ -30,6 +30,7 @@ criterion = "0.3" default = ["arithmetic", "std"] arithmetic = [] digest = ["ecdsa/digest"] +endomorphism-mul = [] field-montgomery = [] force-32-bit = [] rand = ["elliptic-...
12
501
67
1db2618053c283f0d2324f01b884ea04f7a295b3
Tony Arcieri
2020-07-20T16:44:58
k256: impl ecdsa::hazmat::{SignPrimitive, VerifyPrimitive} (#79) Implements the low-level ECDSA signing and verification interfaces
diff --git a/Cargo.lock b/Cargo.lock index 4531e722..a9f7fc35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.7.0-pre" -source = "git+https://github.com/RustCrypto/signatures#04ca0e23cabc78b3c775f0e53d376f1dde55360e" +source = "git+https://github....
5
185
25
29225090ea480b01bd1e52774a399c12a0dc462a
Bogdan Opanchuk
2020-07-18T14:25:54
Fix a bug in scalar addition (#81) If the unreduced result ended up in range [modulus, 2^256), it was not reduced.
diff --git a/k256/src/arithmetic/scalar.rs b/k256/src/arithmetic/scalar.rs index 0b4b8d3d..5a963f63 100644 --- a/k256/src/arithmetic/scalar.rs +++ b/k256/src/arithmetic/scalar.rs @@ -414,6 +414,23 @@ mod tests { assert_eq!(modulus_minus_one_neg, Scalar::one()); } + #[test] + fn add_result_within_2...
3
21
4
9441a97def3d4b681475be50e5ba073207b3f2ba
Tony Arcieri
2020-07-17T16:37:24
k256: refactor pubkey recovery from ECDSA signatures (#80) Moves some of the complexity (some of which is incidental due to subtle#73) in validating the `r` and `s` components of signatures into accessor methods. This makes the `recover_pubkey` method itself cleaner.
diff --git a/k256/src/ecdsa/recoverable.rs b/k256/src/ecdsa/recoverable.rs index 51645e73..f9cf7fc3 100644 --- a/k256/src/ecdsa/recoverable.rs +++ b/k256/src/ecdsa/recoverable.rs @@ -44,27 +44,17 @@ impl Signature { } /// Recover the [`PublicKey`] used to create the given signature - // TODO(tarcieri): a...
1
32
34
c103631a45f9567c04f5a5427bbda718f3c4810f
Tony Arcieri
2020-07-16T21:44:55
k256: Add recoverable::Signature::recovery_pubkey (#68) Conditionally implements public key recovery for `recoverable::Signature` when the `arithmetic` and `sha256` Cargo features are enabled. Recovery is only implemented for "recovery IDs" 0 and 1, as these are the only ones that occur in practice.
diff --git a/Cargo.lock b/Cargo.lock index 444ca43c..4531e722 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -291,6 +291,25 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +[[package]] +name = "hex-liter...
6
192
33
6b6758a54d0e0de28e10135de8806192f72229ca
Tony Arcieri
2020-07-16T18:26:26
k256: add Scalar::from_digest (#78) This method is intended for use when implementing ECDSA, namely for computing a `Scalar` from the hash of the message: https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm#Signature_generation_algorithm 1. Calculate 𝑒 = HASH(𝑚) 2. Let 𝐳 be the 𝐋𝑛 lef...
diff --git a/k256/Cargo.toml b/k256/Cargo.toml index 602714b1..b64ccd24 100644 --- a/k256/Cargo.toml +++ b/k256/Cargo.toml @@ -28,10 +28,11 @@ criterion = "0.3" [features] default = ["arithmetic", "std"] arithmetic = [] +digest = ["ecdsa/digest"] field-montgomery = [] force-32-bit = [] rand = ["elliptic-curve/ran...
4
56
3
37125d0d96778eab651f854a04675cf571e864bf
Tony Arcieri
2020-07-16T14:47:37
Cargo.lock: update dependencies (#77) It looks like Cargo.lock didn't get updated as part of #74
diff --git a/Cargo.lock b/Cargo.lock index ed2bc1ef..444ca43c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,16 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-...
1
531
2
8924614b06afbe7a870bd65f421a8e33973cfb14
Tony Arcieri
2020-07-16T13:45:04
k256: fix rustfmt
diff --git a/k256/bench/bench.rs b/k256/bench/bench.rs index 90ab00b3..64ac5c81 100644 --- a/k256/bench/bench.rs +++ b/k256/bench/bench.rs @@ -1,23 +1,25 @@ use core::convert::TryInto; -use criterion::measurement::{Measurement}; -use criterion::{criterion_group, criterion_main, Criterion, BenchmarkGroup}; +use criteri...
3
28
24
68d8b95b32663d7e2f562d23ffbf15a562a27c65
Bogdan Opanchuk
2020-07-16T13:44:37
Add some benchmarks for Scalar, FieldElement and point-scalar mul (#74)
diff --git a/k256/Cargo.toml b/k256/Cargo.toml index 2e66bb24..602714b1 100644 --- a/k256/Cargo.toml +++ b/k256/Cargo.toml @@ -23,6 +23,7 @@ hex = "0.4" proptest = "0.10" num-bigint = "0.3" num-traits = "0.2" +criterion = "0.3" [features] default = ["arithmetic", "std"] @@ -37,3 +38,8 @@ std = ["elliptic-curve/s...
4
143
2
ba3d127b3929607708c502bc5f99a54237f035f0
Bogdan Opanchuk
2020-07-15T18:32:06
Fixes an accidental non-constant-timeness in point-scalar multiplication (#75)
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 34fb55e4..94c8ce77 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -396,7 +396,6 @@ impl ProjectivePoint { const MUL_STEPS: usize = (256 - 1) / LOG_MUL_WINDOW_SIZE + 1; const MUL_PRECOMP_SIZE: usize = 1 << LOG_MUL_W...
1
1
2
2adf766a317c1002bb91d509d65ca8afc12020a1
Tony Arcieri
2020-07-14T03:39:21
ECDSA types (#73) The equivalents of these types used to live in the `ecdsa` crate, but were removed in this PR: https://github.com/RustCrypto/signatures/pull/96 The goal of that PR was to reverse the previous relationship where the `ecdsa` crate depended on the `k256`/`p256`/`p384` crates, and instead have t...
diff --git a/Cargo.lock b/Cargo.lock index e9e7da5f..ed2bc1ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,6 +27,15 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "block-buffe...
12
331
19
b8721a21829469c31301faaf34df4a350b6138a6
Tony Arcieri
2020-07-11T15:16:20
k256: impl ConstantTimeEq for Scalar; is_zero() (#66) Adds an impl of `subtle::ConstantTimeEq` on `Scalar`. Uses that impl to define `Scalar::is_zero`, and then uses `is_zero` within the `Neg` impl.
diff --git a/k256/src/arithmetic/scalar.rs b/k256/src/arithmetic/scalar.rs index 0e93413b..f8cb8e6e 100644 --- a/k256/src/arithmetic/scalar.rs +++ b/k256/src/arithmetic/scalar.rs @@ -86,6 +86,11 @@ impl Scalar { ret } + /// Is this scalar equal to zero? + pub fn is_zero(&self) -> Choice { + ...
1
12
3
fd3516fde64d5d9ef160f1c4392d807ca7ede6ea
Tony Arcieri
2020-07-01T00:20:57
Bump `proptest` dependency to v0.10 (#64)
diff --git a/Cargo.lock b/Cargo.lock index 63ce2fb9..efe38dfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,11 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.i...
3
19
146
42dcac1b1f19e2c45b7a284a0d02b34d9f20f794
Tony Arcieri
2020-07-01T00:11:52
k256/p256: move OsRng imports into the relevant tests (#63)
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index b35b6f6d..5247cf5b 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -537,7 +537,6 @@ impl GenerateSecretKey for Secp256k1 { #[cfg(test)] mod tests { use core::convert::TryInto; - use elliptic_curve::rand_core::OsRng; ...
2
3
4
4d1cbaa9fab39441fc81c04556ff69e30fcbcb0e
Tony Arcieri
2020-06-30T23:21:47
k256/p256: remove `getrandom`; use `rand` feature (#62) ...to implement `FieldElement::generate()`. The previous implementation was based on a legacy (and previously removed) `getrandom` feature. The `rand_core` crate has the advantage of being able to work (ergonomically) in embedded environments.
diff --git a/Cargo.lock b/Cargo.lock index 194135ee..63ce2fb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,7 +117,6 @@ dependencies = [ "fiat-crypto", "hex", "proptest", - "rand_core 0.5.1", "zeroize", ] @@ -149,7 +148,6 @@ dependencies = [ "elliptic-curve", "hex", "proptest", - "rand_core 0.5.1", ...
7
16
18
d1a8376b5520646fcb536e1094289bc65391b48d
Tony Arcieri
2020-06-30T13:48:58
k256: impl Neg for Scalar (#61) Implement negation (modulo n) for `Scalar`, for the purposes of implementing low-S normalization of ECDSA signatures (see #60).
diff --git a/k256/src/arithmetic/scalar.rs b/k256/src/arithmetic/scalar.rs index dc85ca4f..0e93413b 100644 --- a/k256/src/arithmetic/scalar.rs +++ b/k256/src/arithmetic/scalar.rs @@ -1,6 +1,6 @@ //! Scalar field arithmetic. -use core::convert::TryInto; +use core::{convert::TryInto, ops::Neg}; use elliptic_curve::su...
1
36
2
1a337d573ca7ccb887cb64b5b1a9cb7b789b15e8
Tony Arcieri
2020-06-30T13:38:00
k256: add `Scalar::is_high` (#60) Adds a method for determining if a scalar is greater than or equal to the modulus divided by 2 (in constant time). The ultimate purpose of this method is implementing non-malleable ECDSA signatures as described in BIP 0062: Dealing with Malleability, namely ensuring signatures a...
diff --git a/k256/src/arithmetic/scalar.rs b/k256/src/arithmetic/scalar.rs index 05d5bce1..dc85ca4f 100644 --- a/k256/src/arithmetic/scalar.rs +++ b/k256/src/arithmetic/scalar.rs @@ -1,7 +1,7 @@ //! Scalar field arithmetic. use core::convert::TryInto; -use elliptic_curve::subtle::{Choice, ConditionallySelectable, C...
1
46
1
134cf33b31285901284ba0b3f8cd34a8fdb6a851
Tony Arcieri
2020-06-25T19:50:08
Re-export types from `arithmetic` module at toplevel (#58) This commit removes the `arithmetic` module from the public API of the `k256` and `p256` crates, re-exporting the `AffinePoint`, `ProjectivePoint`, and `Scalar` types from the crate's toplevel. Additionally, it moves the `test_vectors` module to the tople...
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 44764534..1f9264ee 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -1,14 +1,9 @@ //! A pure-Rust implementation of group operations on secp256k1. mod field; -mod scalar; +pub(crate) mod scalar; mod util; -#[cfg(any(feature = "...
15
30
20
359f16dc9479bd27ef4d506aaf44b16f5945f718
Tony Arcieri
2020-06-21T13:47:20
Add `weierstrass::GenerateSecretKey` trait (#53) Adds a `SecretKey` generation trait for Weierstrass curves supporting curve-specific logic. The trait is implemented for the `k256` and `p256` crates using a trial generation method ("generate-and-pray") which attempts to decode a randomly generated bytestring as ...
diff --git a/Cargo.lock b/Cargo.lock index f71a7298..194135ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -60,6 +60,7 @@ version = "0.4.0" dependencies = [ "generic-array", "hex", + "rand_core 0.5.1", "subtle", "zeroize", ] @@ -116,6 +117,7 @@ dependencies = [ "fiat-crypto", "hex", "proptest", + "rand_c...
11
127
8
5e97ba568b92681a20eae7b5b711e391ee7e3df7
Tony Arcieri
2020-06-21T13:38:03
Factor SEC-1 serialization into `elliptic-curve` crate (#52) Adds a `from_affine_coords` method to `CompressedPoint` and `UncompressedPoint` which accepts a `ScalarBytes` for the x and y-coordinates. This is then used in the `k256` and `p256` crates to consolidate the duplicated SEC-1 serialization logic.
diff --git a/elliptic-curve-crate/src/weierstrass/point.rs b/elliptic-curve-crate/src/weierstrass/point.rs index 1aaf2814..eb5d5b76 100644 --- a/elliptic-curve-crate/src/weierstrass/point.rs +++ b/elliptic-curve-crate/src/weierstrass/point.rs @@ -7,8 +7,12 @@ //! <https://www.secg.org/sec1-v2.pdf> use super::Curve;...
3
47
37
7faa68f81dd7328c887a78560d1725550af06c8d
Tony Arcieri
2020-06-20T16:40:44
Drop `*Curve*` from CompressedPoint/UncompressedPoint (#51) Rationale: - `CompressedCurvePoint` and `UncompressedCurvePoint` are annoyingly long to type - It's an elliptic curve library: we already know it's a curve point by definition - More consistency with types like `AffinePoint` and `ProjectivePoint` ...
diff --git a/elliptic-curve-crate/src/weierstrass.rs b/elliptic-curve-crate/src/weierstrass.rs index a9d58eb2..fdf8e60b 100644 --- a/elliptic-curve-crate/src/weierstrass.rs +++ b/elliptic-curve-crate/src/weierstrass.rs @@ -5,7 +5,5 @@ pub mod point; pub mod public_key; pub use curve::{Curve, ScalarBytes}; -pub use ...
8
38
40
d204d2d8d927a39cec362a22ed10ea0732d054d3
Tony Arcieri
2020-06-19T15:50:34
k256/p256/p384: add curve point type aliases (#48) Adds `CompressedCurvePoint` and `UncompressedCurvePoint` type aliases to each crate, which helps simplify the type signatures.
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 2c06d2e9..3572026c 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -14,8 +14,7 @@ use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}; use elliptic_curve::generic_array::GenericArray; use subtle::{Choice, Condition...
5
33
17
c300f180847092d3e97db9fb05fe45502575f85e
Tony Arcieri
2020-06-03T02:19:36
elliptic-curve-crate: bump generic-array dep to v0.14
diff --git a/Cargo.lock b/Cargo.lock index c6d07aae..7f7c2a1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -85,9 +85,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "generic-array" -version = "0.12.3" +version = "0.14.1" source = "registry+https://github.com/rus...
2
3
4
1eddf476d3f5476ebe5d128481b0ea7f40c71727
Michael Rosenberg
2020-05-26T18:40:10
Simplified SecretKey -> Scalar conversion
diff --git a/p256/src/arithmetic/scalar.rs b/p256/src/arithmetic/scalar.rs index edf9b0db..f14c5e60 100644 --- a/p256/src/arithmetic/scalar.rs +++ b/p256/src/arithmetic/scalar.rs @@ -45,10 +45,8 @@ impl Scalar { /// /// Returns None if the secret's underlying value does not represent a field element. pub...
1
1
3
23ceb6d92a7fabf1fdd013123ce9ad67d2acd98f
Michael Rosenberg
2020-05-26T08:22:04
Implemented SecretKey -> Scalar conversion
diff --git a/p256/src/arithmetic/scalar.rs b/p256/src/arithmetic/scalar.rs index 3733d600..edf9b0db 100644 --- a/p256/src/arithmetic/scalar.rs +++ b/p256/src/arithmetic/scalar.rs @@ -3,7 +3,7 @@ use core::convert::TryInto; use subtle::{Choice, CtOption}; -use crate::arithmetic::util::sbb; +use crate::{arithmetic::u...
1
21
1
ed5bd76df746e9d150cacb521cf5a8262edd680e
Tony Arcieri
2020-04-28T16:12:08
k256: update categories and keywords - Removes "nist" keyword (copypasta from the `p256`/`p384`/`p521` crates) - Adds `cryptography::cryptocurrencies` category - Adds `bitcoin` and `ethereum` keywords
diff --git a/k256/Cargo.toml b/k256/Cargo.toml index 22403e24..c979f1c6 100644 --- a/k256/Cargo.toml +++ b/k256/Cargo.toml @@ -8,8 +8,8 @@ documentation = "https://docs.rs/elliptic-curve" repository = "https://github.com/RustCrypto/elliptic-curves/tree/master/k256" readme = "README.md" edition = "2018" -categories =...
1
2
2
0696d7f96f591449e57173ea83b5c56b221ff2d1
tuxxy
2020-04-28T09:40:53
Add fiat-crypto proptests
diff --git a/k256/Cargo.toml b/k256/Cargo.toml index 379ac9e3..22403e24 100644 --- a/k256/Cargo.toml +++ b/k256/Cargo.toml @@ -25,6 +25,7 @@ default-features = false [dev-dependencies] hex = "0.4" proptest = "0.9" +fiat-crypto = "0.1.0" [features] default = ["arithmetic", "std"] diff --git a/k256/src/arithmetic/...
2
79
0
7e21f6a47b572874af2dbb181c6067564df684fd
tuxxy
2020-04-28T08:24:56
Add scalar multiplication
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index d29feb0e..05aec6bd 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -6,6 +6,7 @@ //! decompression is supported. mod field; +mod scalar; mod util; #[cfg(any(feature = "test-vectors", test))] @@ -178,6 +179,16 @@ impl From<Affi...
3
166
54
20311e652844ad36e8d661caa3a5f5a215fdbabd
tuxxy
2020-04-28T08:23:30
Fix point doubling z coord
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 03bacffd..d29feb0e 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -306,7 +306,7 @@ impl ProjectivePoint { ProjectivePoint { x: xy2 * &yy_m_bzz9, y: (yy_m_bzz9 * &yy_p_bzz3) + &(CURVE_EQUATION_B * &...
1
2
1
88984609522e158ed40a1d4d71c44d0b49b2d252
tuxxy
2020-04-27T15:12:41
Add MUL_TEST_VECTORS
diff --git a/k256/src/arithmetic/test_vectors/group.rs b/k256/src/arithmetic/test_vectors/group.rs index c56e1045..1e54604d 100644 --- a/k256/src/arithmetic/test_vectors/group.rs +++ b/k256/src/arithmetic/test_vectors/group.rs @@ -86,102 +86,135 @@ pub const ADD_TEST_VECTORS: &[(&str, &str)] = &[ "12BA26DCB10E...
1
132
99
50d70d8126262ea99f6033c6fbff208256e4904e
tuxxy
2020-04-27T14:52:21
Implement mixed point addition (Algorithm 8)
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 7819241b..03bacffd 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -257,9 +257,31 @@ impl ProjectivePoint { /// Returns `self + other`. fn add_mixed(&self, other: &AffinePoint) -> ProjectivePoint { // We implement ...
2
106
88
6e26a0b3e37f0ba5f282e35f366cc8eb7237f4f7
tuxxy
2020-04-27T14:32:44
Implement ProjectivePoint doubling (Algorithm 9)
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 5c2657e5..7819241b 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -265,9 +265,27 @@ impl ProjectivePoint { /// Doubles this point. fn double(&self) -> ProjectivePoint { // We implement the complete addition formul...
1
21
3
0afeca501f01948cb103df6248ac14a7611c7ec4
tuxxy
2020-04-27T13:52:59
Implement ProjectivePoint addition (Algorithm 7)
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index df053d3b..5c2657e5 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -226,9 +226,32 @@ impl ProjectivePoint { /// Returns `self + other`. fn add(&self, other: &ProjectivePoint) -> ProjectivePoint { // We implement th...
1
26
3
7ae62d32124ea2388db6cbef0eeb6fc6ed196af9
tuxxy
2020-04-27T10:40:45
Implement basic field arithmetic for secp256k1 This introduces changes made by @str4d for p256, but modifies them for secp256k1. Additionally, this implementation primarily uses montgomery multiplication rather than schoolbook multiplication + a montgomery reduction for added performance gains. However, it lacks a mo...
diff --git a/k256/Cargo.toml b/k256/Cargo.toml index 31d3c94d..379ac9e3 100644 --- a/k256/Cargo.toml +++ b/k256/Cargo.toml @@ -17,7 +17,19 @@ path = "../elliptic-curve-crate" default-features = false features = ["weierstrass"] +[dependencies.subtle] +version = "2.2.2" +optional = true +default-features = false + +[...
7
1,184
0
5596a2a4b61dd2fcb8a87210db0b5da754f448a0
tuxxy
2020-04-27T12:48:51
Add @str4d's skeleton work on point addition w/ secp256k1 test vectors
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index d14e3ad3..df053d3b 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -12,7 +12,7 @@ mod util; pub mod test_vectors; use core::convert::TryInto; -use core::ops::{Neg}; +use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAs...
3
540
11
c9acc4da298d48ed9119ab293e4bd5aa579c8eb4
tuxxy
2020-04-27T12:00:52
Add ProjectivePoint struct
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 83d59aba..d14e3ad3 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -12,6 +12,7 @@ mod util; pub mod test_vectors; use core::convert::TryInto; +use core::ops::{Neg}; use elliptic_curve::generic_array::GenericArray; use subtle::{...
1
77
1
72d80fa10a2315a97a04529d684cde48ad7aa204
tuxxy
2020-04-27T11:57:45
Add generator function
diff --git a/k256/src/arithmetic.rs b/k256/src/arithmetic.rs index 527ddffd..83d59aba 100644 --- a/k256/src/arithmetic.rs +++ b/k256/src/arithmetic.rs @@ -59,6 +59,27 @@ impl PartialEq for AffinePoint { impl Eq for AffinePoint {} impl AffinePoint { + /// Returns the base point of SECP256k1. + pub fn generator...
1
21
0
d38b8f70612ba78387c9dadf3992ff6c032396b6
tuxxy
2020-04-27T10:53:37
Make clippy less angry
diff --git a/k256/src/arithmetic/field.rs b/k256/src/arithmetic/field.rs index 8310d373..98fd9242 100644 --- a/k256/src/arithmetic/field.rs +++ b/k256/src/arithmetic/field.rs @@ -36,7 +36,7 @@ const R2: FieldElement = FieldElement([ ]); /// INV = -(p^-1 mod 2^64) mod 2^64 -const INV: u64 = 0xd838091dd2253531; +cons...
1
1
1
42e101cdbdf400ac99ec4b052fa53094cbbc7516
tuxxy
2020-04-27T10:40:45
Implement basic field arithemtic for secp256k1 This introduces changes made by @str4d for p256, but modifies them for secp256k1. Additionally, this implementation primarily uses montgomery multiplication rather than schoolbook multiplication + a montgomery reduction for added performance gains. However, it lacks a mo...
diff --git a/k256/Cargo.toml b/k256/Cargo.toml index 31d3c94d..379ac9e3 100644 --- a/k256/Cargo.toml +++ b/k256/Cargo.toml @@ -17,7 +17,19 @@ path = "../elliptic-curve-crate" default-features = false features = ["weierstrass"] +[dependencies.subtle] +version = "2.2.2" +optional = true +default-features = false + +[...
7
1,184
0
2bf2ac19250e2065c45d0205b971f7bf08f09cfa
Jack Grigg
2020-04-25T00:48:12
p256: Add some missing operator impls
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index cb775d49..7a311d6b 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -382,6 +382,12 @@ impl AddAssign<ProjectivePoint> for ProjectivePoint { } } +impl AddAssign<&ProjectivePoint> for ProjectivePoint { + fn add_assign(&mut se...
2
28
0
9e06c91b13a1e8a12c88fb66f1810bd0db29b274
Jack Grigg
2020-04-24T23:39:27
p256: Basic constant-time scalar multiplication
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index b07b9d5d..cb775d49 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -17,7 +17,7 @@ mod util; pub mod test_vectors; use core::convert::TryInto; -use core::ops::{Add, AddAssign, Neg, Sub, SubAssign}; +use core::ops::{Add, AddAssign,...
2
243
3
c85935a6244af12873bb599a1f66d663eac4c8c4
Jack Grigg
2020-04-24T23:39:01
p256: impl ConditionallySelectable for ProjectivePoint
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 41f166da..b07b9d5d 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -189,6 +189,16 @@ impl From<AffinePoint> for ProjectivePoint { } } +impl ConditionallySelectable for ProjectivePoint { + fn conditional_select(a: &Self, b:...
1
10
0
50d83ccfbbf6f2118cc13500c065782c72e9a392
Jack Grigg
2020-04-24T23:37:06
p256: Add a Scalar type The Scalar uses native representation internally. This might be replaced with Montgomery representation later.
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 86fdbc9a..41f166da 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -10,6 +10,7 @@ //! - Scalar multiplication. mod field; +mod scalar; mod util; #[cfg(any(feature = "test-vectors", test))] diff --git a/p256/src/arithmetic/sca...
2
77
0
d2c7579541da10a9c07eb93ed814e3b4550c7d3c
Jack Grigg
2020-04-18T23:35:21
p256: Update arithmetic status
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 4e6d9603..86fdbc9a 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -2,8 +2,12 @@ //! //! # Status //! -//! Currently, no actual group operations are implemented. Only point compression and -//! decompression is supported. +//! Imp...
1
6
2
937d692f67fd51f275ba0bf70f8b3237fd88c5b8
Jack Grigg
2020-04-18T23:30:49
p256: Add AffinePoint::generator, clean up tests
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index fb9cb7b0..4e6d9603 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -65,6 +65,27 @@ impl PartialEq for AffinePoint { impl Eq for AffinePoint {} impl AffinePoint { + /// Returns the base point of P-256. + pub fn generator() -...
1
33
46
7eaa15da58d3f2fc198c4a80fa75fa09302aa9ce
Jack Grigg
2020-04-18T23:23:29
p256: ProjectivePoint mixed subtraction
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 6c85baa5..fb9cb7b0 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -320,6 +320,11 @@ impl ProjectivePoint { fn sub(&self, other: &ProjectivePoint) -> ProjectivePoint { self.add(&other.neg()) } + + /// Returns `s...
1
40
2
4ad23545895da0ea4e6eafc50c0b7eb04727474b
Jack Grigg
2020-04-18T23:19:54
p256: Complete mixed point addition Implements Algorithm 5 from Renes-Costello-Batina 2015. https://eprint.iacr.org/2015/1060
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 5fed79c8..6c85baa5 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -255,6 +255,35 @@ impl ProjectivePoint { } } + /// Returns `self + other`. + fn add_mixed(&self, other: &AffinePoint) -> ProjectivePoint { + ...
1
89
0
7890c36b34430e64ecfdb5e433708e67bb00e48c
Jack Grigg
2020-04-18T06:44:36
p256: Exception-free point doubling Implements Algorithm 6 from Renes-Costello-Batina 2015. https://eprint.iacr.org/2015/1060
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 97a4f0c4..5fed79c8 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -257,8 +257,34 @@ impl ProjectivePoint { /// Doubles this point. pub fn double(&self) -> ProjectivePoint { - // Because we implemented complete add...
1
28
2
97190112a9cf8163974ab515477cd43eedcba4a7
Jack Grigg
2020-04-18T05:37:34
p256: ProjectivePoint negation and subtraction
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index bf8510c9..97a4f0c4 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -12,7 +12,7 @@ mod util; pub mod test_vectors; use core::convert::TryInto; -use core::ops::{Add, AddAssign, Neg}; +use core::ops::{Add, AddAssign, Neg, Sub, SubAs...
1
59
1
4818014d723b81e14e5d4d2e017940e5f5b258fb
Jack Grigg
2020-04-18T05:30:42
p256: Complete projective point addition Implements Algorithm 4 from Renes-Costello-Batina 2015. https://eprint.iacr.org/2015/1060 As this is a complete addition formula, it works with the projective identity, and can also be used for doubling.
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index f137bda6..bf8510c9 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -12,7 +12,7 @@ mod util; pub mod test_vectors; use core::convert::TryInto; -use core::ops::Neg; +use core::ops::{Add, AddAssign, Neg}; use elliptic_curve::generi...
3
202
2
3829a63ad09bd06cbbf76f7270be2ae5ef1cd04f
Jack Grigg
2020-04-18T05:19:34
p256: Projective point representation and conversions
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 0e53b2f2..f137bda6 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -145,9 +145,81 @@ impl Neg for AffinePoint { } } +/// A point on the secp256r1 curve in projective coordinates. +#[derive(Clone, Copy, Debug)] +pub struct Pro...
1
93
1
5b3c3c83c14833bf82e397f3c71845b1f73f37f7
Jack Grigg
2020-04-18T03:59:52
p256: impl Neg for AffinePoint
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 5ee11a8f..0e53b2f2 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -12,6 +12,7 @@ mod util; pub mod test_vectors; use core::convert::TryInto; +use core::ops::Neg; use elliptic_curve::generic_array::GenericArray; use subtle::{Ch...
1
22
0
de43e1fc2b1535e92cfa4a01d165ca5095e779ca
Jack Grigg
2020-04-18T03:09:36
p256: impl {AddAssign, SubAssign, MulAssign} for FieldElement
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index ad92b644..73306302 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -1,7 +1,7 @@ //! Field arithmetic modulo p = 2^{224}(2^{32} − 1) + 2^{192} + 2^{96} − 1 use core::convert::TryInto; -use core::ops::{Add, ...
1
19
1
29dcbf6b62cfcdd22d3a74a4cdcd65fe617e06b2
Jack Grigg
2020-04-18T03:08:25
p256: Rename FieldElement:sub to FieldElement::subtract This makes it easier to refer to the const fn when core::ops::Sub is in scope.
diff --git a/p256/src/arithmetic.rs b/p256/src/arithmetic.rs index 3d24973b..5ee11a8f 100644 --- a/p256/src/arithmetic.rs +++ b/p256/src/arithmetic.rs @@ -21,9 +21,9 @@ use field::{FieldElement, MODULUS}; /// a = -3 const CURVE_EQUATION_A: FieldElement = FieldElement::zero() - .sub(&FieldElement::one()) - .su...
2
7
7
ea3da1f0811367d3f359fcb02ba3c1e580ac6d72
Jack Grigg
2020-04-17T21:26:17
p256: Field doubling and negation
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index 6ab373a2..014694eb 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -1,7 +1,7 @@ //! Field arithmetic modulo p = 2^{224}(2^{32} − 1) + 2^{192} + 2^{96} − 1 use core::convert::TryInto; -use core::ops::{Add, ...
1
31
1
23cc294732699ebfc790f01ded297a109197bbb6
Jack Grigg
2020-04-11T22:23:46
p256: Field inversion
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index c616b35a..6ab373a2 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -364,6 +364,26 @@ impl FieldElement { res } + /// Returns the multiplicative inverse of self, if self is non-zero. + pub...
1
32
0
c68188e822c10fabed8614535938dd513a77abd5
Tony Arcieri
2020-01-07T15:33:59
Re-export the 'elliptic-curve' crate ...from all crates for specific curves
diff --git a/k256/src/lib.rs b/k256/src/lib.rs index 0d079236..b0088578 100644 --- a/k256/src/lib.rs +++ b/k256/src/lib.rs @@ -12,6 +12,8 @@ #![warn(missing_docs, rust_2018_idioms, unused_qualifications)] #![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")] +pub use ell...
4
8
0
ad1bbdbbf409cc928a6b5e4af31f539c0f9f9c1e
Tony Arcieri
2020-01-06T04:19:32
p256: Import @str4d's curve arithmetic Imports point compression and decompression arithmetic originally from this pull request: https://github.com/RustCrypto/signatures/pull/63
diff --git a/p256/Cargo.toml b/p256/Cargo.toml index 0e8ee864..ce8d5ddb 100644 --- a/p256/Cargo.toml +++ b/p256/Cargo.toml @@ -17,7 +17,19 @@ path = "../elliptic-curve-crate" default-features = false features = ["weierstrass"] +[dependencies.subtle] +version = "2.2.2" +optional = true +default-features = false + +[...
7
1,048
0
2a5049a04cc6890cbfe8ab05997c55c40c14e6d1
Weihang Lo
2026-03-28T14:42:14
fix(sys): link to iphlpapi unconditionally Upstream has done that so we follow: 1. curl/curl#17413 preloads `iphlpapi` uncondiioned on `HAVE_IF_NAMETOINDEX` 2. curl/curl@b17ef873 `HAVE_IF_NAMETOINDEX` is defined unconditionally
diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index 46ea77e..cfbb0ab 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl-sys" -version = "0.4.86+curl-8.19.0" +version = "0.4.87+curl-8.19.0" authors = ["Alex Crichton <alex@alexcrichton.com>"] links = "curl" bui...
2
2
1
88c7798fd6a4b22df5c2ef095d1b0ee6bd4d58ca
Petr Shumilov
2026-02-12T19:42:16
Add getter for CURLINFO_NUM_CONNECTS option Signed-off-by: Petr Shumilov <p.shumilov@vkteam.ru>
diff --git a/src/easy/handle.rs b/src/easy/handle.rs index 1861e27..7fd754d 100644 --- a/src/easy/handle.rs +++ b/src/easy/handle.rs @@ -1352,6 +1352,11 @@ impl Easy { self.inner.local_port() } + /// Same as [`Easy2::num_connects`](struct.Easy2.html#method.num_connects) + pub fn num_connects(&self...
3
15
0
897bc975593df5876648b7b1e1cbd5674ed5f458
Petr Shumilov
2026-02-12T16:41:06
Separate mutable and immutable getters Signed-off-by: Petr Shumilov <p.shumilov@vkteam.ru>
diff --git a/src/multi.rs b/src/multi.rs index d6dae59..357e91d 100644 --- a/src/multi.rs +++ b/src/multi.rs @@ -863,40 +863,46 @@ impl fmt::Debug for Multi { macro_rules! impl_easy_getters { () => { impl_easy_getters! { - time_condition_unmet -> bool, - effective_url -> Option<&str...
1
53
31
8416bdfbcc376f6c90076ee54c08a316e29f546a
Petr Shumilov
2026-02-12T16:39:04
Remove useless mut modifier for Easy getters Signed-off-by: Petr Shumilov <p.shumilov@vkteam.ru>
diff --git a/src/easy/handle.rs b/src/easy/handle.rs index 6d074be..1861e27 100644 --- a/src/easy/handle.rs +++ b/src/easy/handle.rs @@ -1213,142 +1213,142 @@ impl Easy { // getters /// Same as [`Easy2::time_condition_unmet`](struct.Easy2.html#method.time_condition_unmet) - pub fn time_condition_unmet(&m...
1
28
28
a0761c435d2e6d6c311df695f2c4e1c9dc611837
Jean-Christophe Amiel
2025-10-15T21:24:28
Uses https://rust-lang.org instead of https://www.rust-lang.org https://www.rust-lang.org is a 301 to https://rust-lang.org now.
diff --git a/src/easy/handler.rs b/src/easy/handler.rs index 66185cc..2b20a48 100644 --- a/src/easy/handler.rs +++ b/src/easy/handler.rs @@ -43,7 +43,7 @@ use crate::Error; /// /// let mut easy = Easy2::new(Collector(Vec::new())); /// easy.get(true).unwrap(); -/// easy.url("https://www.rust-lang.org/").unwrap(); +//...
1
2
2
f19936f7a2d5c6d3c1f7818a6149552a740eedcc
Eric Huss
2025-08-12T19:20:47
Fix mismatched_lifetime_syntaxes warning (#619) This fixes the mismatched_lifetime_syntaxes warning which has started to appear on more recent versions of rustc.
diff --git a/src/easy/list.rs b/src/easy/list.rs index 3946ec2..fb13c86 100644 --- a/src/easy/list.rs +++ b/src/easy/list.rs @@ -46,7 +46,7 @@ impl List { } /// Returns an iterator over the nodes in this list. - pub fn iter(&self) -> Iter { + pub fn iter(&self) -> Iter<'_> { Iter { ...
2
2
2
c06de2a59efc9b9b7558b4c3d0d69de1167c08d6
Thomas de Zeeuw
2025-07-07T14:19:44
Update to socket2 v0.6 (#614)
diff --git a/Cargo.toml b/Cargo.toml index ca5fd4b..8363b00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ edition = "2018" [dependencies] libc = "0.2.42" curl-sys = { path = "curl-sys", version = "0.4.77", default-features = false } -socket2 = "0.5.0" +socket2 = "0.6.0" # Unix platforms use OpenSSL f...
1
1
1
e682249dcfebc2cc3a93e18fd77ddf58d931aa95
Alex Crichton
2025-06-06T21:49:33
Bump curl/curl-sys versions
diff --git a/Cargo.toml b/Cargo.toml index a3efedc..ca5fd4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl" -version = "0.4.47" +version = "0.4.48" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT" repository = "https://github.com/alexcrichton/curl-rust" diff --gi...
2
2
2
63f7213d7fd002f42f0e3124fc1da42655c0585a
Tomas Agustin Raies
2025-02-25T05:29:24
Bump `windows-sys` to ver 0.59 (#600) Co-authored-by: Tomas Raies <toraies@microsoft.com>
diff --git a/Cargo.toml b/Cargo.toml index 3a6cb4f..a3efedc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ openssl-probe = { version = "0.1.2", optional = true } [target.'cfg(target_env = "msvc")'.dependencies] schannel = "0.1.13" -windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32...
2
2
2
cd649f2490cd1ba39b5d2cfb0ab4a23d843195d2
Alex Crichton
2024-09-30T18:42:51
Bump versions numbers (#583) Making a release for #581
diff --git a/Cargo.toml b/Cargo.toml index ed871cf..3a6cb4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl" -version = "0.4.46" +version = "0.4.47" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT" repository = "https://github.com/alexcrichton/curl-rust" @@ -14,7 ...
2
3
3
e67e733f0d78c587b1340719d9b848b66cc742d5
Eric Huss
2024-09-18T17:38:54
Squelch check-cfg warnings
diff --git a/build.rs b/build.rs index 11539d4..d6b0797 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,12 @@ use std::env; fn main() { + println!( + "cargo::rustc-check-cfg=cfg(\ + need_openssl_init,\ + need_openssl_probe,\ + )" + ); // OpenSSL >= 1.1.0 can be initial...
2
14
0
0622181ca980b074ba8558e4b62ed8800f19a3c7
Mikhail Tarasov
2024-08-16T14:07:20
curl-sys: enable scope ID for IPv6 (#569)
diff --git a/curl-sys/build.rs b/curl-sys/build.rs index 7d9a661..0b48410 100644 --- a/curl-sys/build.rs +++ b/curl-sys/build.rs @@ -122,6 +122,7 @@ fn main() { .define("CURL_DISABLE_TFTP", None) .define("CURL_STATICLIB", None) .define("ENABLE_IPV6", None) + .define("HAVE_SOCKADDR_IN6_...
1
1
0
c01261310f13c85dc70d4e8a1ef87504662a1154
Adam Azarchs
2024-03-06T15:29:17
Exclude curl/docs and curl/tests from curl-sys crate (#554) These directories within the curl submodule are 5 and 11 MB, respectively, and are not necessary for building curl-sys.
diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index 1fe85b8..03ab617 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -10,6 +10,7 @@ description = "Native bindings to the libcurl library" documentation = "https://docs.rs/curl-sys" categories = ["external-ffi-bindings"] edition = "2018" +exclude...
1
1
0
6b38fc978f27bba7a245b006667c6534f8693ec3
Eric Huss
2024-02-20T15:47:38
Remove redundant imports. (#553)
diff --git a/src/easy/form.rs b/src/easy/form.rs index 83f8031..c94d2e1 100644 --- a/src/easy/form.rs +++ b/src/easy/form.rs @@ -5,7 +5,6 @@ use std::ptr; use crate::easy::{list, List}; use crate::FormError; -use curl_sys; /// Multipart/formdata for an HTTP POST request. /// diff --git a/src/easy/handle.rs b/sr...
5
1
6
dbf8d87ecb93c0f3069742e351d35de120189760
John Sirois
2024-02-12T22:19:07
Add Win32_Foundation feature to windows-sys dep. (#547) * Add Win32_Foundation feature to windows-sys dep. This is needed by the following functions we use in the easy API Windows suppport: + `windows_sys::Win32::System::LibraryLoader::GetProcAddress` + `windows_sys::Win32::System::LibraryLoader::GetModuleHandle...
diff --git a/Cargo.toml b/Cargo.toml index 0dd53e8..bfeee77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ openssl-probe = { version = "0.1.2", optional = true } [target.'cfg(target_env = "msvc")'.dependencies] schannel = "0.1.13" -windows-sys = { version = "0.52", features = ["Win32_System_LibraryLoade...
1
1
1
a4f40833dd92483395c9bf98d6a46d2c06ae1621
Eric Huss
2024-02-12T22:14:43
Set minimum version of the curl-sys crate. (#549)
diff --git a/Cargo.toml b/Cargo.toml index c51d04d..0dd53e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl" -version = "0.4.45" +version = "0.4.46" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT" repository = "https://github.com/alexcrichton/curl-rust" @@ -18,7 ...
1
2
2
c0c7a664340f0161770ed4f5c5d43d2fa2a9b749
Alex Crichton
2024-02-09T10:57:41
Bump crate versions Publishing the previous update of windows-sys
diff --git a/Cargo.toml b/Cargo.toml index f80c3a2..c51d04d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl" -version = "0.4.44" +version = "0.4.45" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT" repository = "https://github.com/alexcrichton/curl-rust" diff --gi...
2
2
2
25575e0d0e4199db3f553646b38104bdeb864b14
Mike Hommey
2024-02-09T10:51:59
Update windows-sys to 0.52 (#546)
diff --git a/Cargo.toml b/Cargo.toml index 5e70332..f80c3a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ openssl-probe = { version = "0.1.2", optional = true } [target.'cfg(target_env = "msvc")'.dependencies] schannel = "0.1.13" -windows-sys = { version = "0.48", features = ["Win32_System_LibraryLoade...
2
2
2
0c1dddf7f1192326614b638a3b7820e4ed9f5b12
Alex Crichton
2023-12-07T16:12:28
Bump to 0.4.70
diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index 2417dc8..a6f1e90 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl-sys" -version = "0.4.69+curl-8.5.0" +version = "0.4.70+curl-8.5.0" authors = ["Alex Crichton <alex@alexcrichton.com>"] links = "curl" build...
1
1
1
6b7e62bfbea67856ad91654cf2caa3c393783b00
Eric Huss
2023-10-11T22:36:00
Fix upload_lots for 8.4.0 This test is hanging on Linux with the 8.4.0 update. My poor understanding is that `perform()` should not be used with `curl_multi_socket_action` (that is, it should only use `perform` or `action`, not both). Removing this seems to fix things. Note that there were some other hang-related ch...
diff --git a/tests/multi.rs b/tests/multi.rs index 0c5e701..c1e68f4 100644 --- a/tests/multi.rs +++ b/tests/multi.rs @@ -140,7 +140,6 @@ fn upload_lots() { let e = t!(m.add(h)); - assert!(t!(m.perform()) > 0); let mut next_token = 1; let mut token_map = HashMap::new(); let mut cur_timeout = N...
1
0
1
4dea23f14471ac02b5106ab5c86cba87d4b1d5a1
Eric Huss
2023-10-11T22:32:29
post-tests: Determine multipart boundary size dynamically This determines the multipart boundary size based on the version of curl currently being used.
diff --git a/tests/post.rs b/tests/post.rs index 2779fa7..3e2db5c 100644 --- a/tests/post.rs +++ b/tests/post.rs @@ -1,3 +1,4 @@ +use curl::Version; use std::time::Duration; macro_rules! t { @@ -23,16 +24,26 @@ fn handle() -> Easy { e } -#[cfg(feature = "static-curl")] +fn multipart_boundary_size() -> usize...
1
21
8
23031372a3704fde0789d0308528060a35d194a9
Qiu Chaofan
2023-10-11T08:03:14
Update content length in POST tests Upstream curl commit 3aa3cc9b changed MIME multipart boundary from 16 to 22 bytes. Update the tests accordingly. Disable such tests when using system curl to avoid expected failure.
diff --git a/tests/post.rs b/tests/post.rs index 15e2df7..2779fa7 100644 --- a/tests/post.rs +++ b/tests/post.rs @@ -23,6 +23,7 @@ fn handle() -> Easy { e } +#[cfg(feature = "static-curl")] #[test] fn custom() { let s = Server::new(); @@ -31,7 +32,7 @@ fn custom() { POST / HTTP/1.1\r\n\ ...
1
6
3