ecdsa_ext 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ecdsa/ext/jacobian_point.rb +11 -11
- data/lib/ecdsa/ext/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2a5e0f4a0a8de441e3d2f1374666b345b3b5576c4d3b455b1e138ee9c032c88
|
4
|
+
data.tar.gz: 844a766b56bf77ce971788fa414194500f9e9ee25c9549b003cded0437fb2ff4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 794aaac69e3cad831d943aa488d0b3a5f9169d7660dd3c37edb284332550be3112b39455090af2efc0229ac828d72280ad827c383e6c29300ad2d29febc28bfc
|
7
|
+
data.tar.gz: 5ee76f7e334da633becd188573089f00e3c326726217da25ceb7fb3a9e04279e5548a4085f64366bb8e530b986fdd8f691360a88690dfbc889f90333aea45314
|
@@ -71,19 +71,19 @@ module ECDSA
|
|
71
71
|
return other if y.zero? || z.zero?
|
72
72
|
return self if other.y.zero? || other.z.zero?
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
unless x == other.x
|
75
|
+
if z == other.z
|
76
|
+
return(
|
77
|
+
z == 1 ? add_with_z_one(self, other) : add_with_z_eq(self, other)
|
78
|
+
)
|
79
|
+
end
|
80
|
+
return add_with_z2_one(other, self) if z == 1
|
81
|
+
return add_with_z2_one(self, other) if other.z == 1
|
82
|
+
return add_with_z_ne(self, other)
|
79
83
|
end
|
80
|
-
return add_with_z2_one(other, self) if z == 1
|
81
|
-
return add_with_z2_one(self, other) if other.z == 1
|
82
|
-
add_with_z_ne(self, other)
|
83
|
-
# end
|
84
84
|
|
85
|
-
|
86
|
-
|
85
|
+
return double if self == other
|
86
|
+
raise "Failed to add #{inspect} to #{other.inspect}: No addition rules matched."
|
87
87
|
end
|
88
88
|
alias + add_to_point
|
89
89
|
|
data/lib/ecdsa/ext/version.rb
CHANGED