summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/i2p/files/i2p-0.9.23_fix-encoding.patch')
-rw-r--r--net-p2p/i2p/files/i2p-0.9.23_fix-encoding.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/net-p2p/i2p/files/i2p-0.9.23_fix-encoding.patch b/net-p2p/i2p/files/i2p-0.9.23_fix-encoding.patch
new file mode 100644
index 000000000000..4c542b5ad5bc
--- /dev/null
+++ b/net-p2p/i2p/files/i2p-0.9.23_fix-encoding.patch
@@ -0,0 +1,43 @@
+diff -Naur a/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java b/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java
+--- a/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java 2016-01-07 01:40:50.225460721 +0100
++++ b/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java 2016-01-07 01:41:19.960462373 +0100
+@@ -216,9 +216,9 @@
+ * x is recovered in the following way:
+ * <p><ul>
+ * <li>x = sign(x) * sqrt((y^2 - 1) / (d * y^2 + 1)) = sign(x) * sqrt(u / v) with u = y^2 - 1 and v = d * y^2 + 1.
+- * <li>Setting β = (u * v^3) * (u * v^7)^((q - 5) / 8) one has β^2 = +-(u / v).
+- * <li>If v * β = -u multiply β with i=sqrt(-1).
+- * <li>Set x := β.
++ * <li>Setting b = (u * v^3) * (u * v^7)^((q - 5) / 8) one has b^2 = +-(u / v).
++ * <li>If v * b = -u multiply b with i=sqrt(-1).
++ * <li>Set x := b.
+ * <li>If sign(x) != bit 255 of s then negate x.
+ *
+ * @param curve The curve.
+@@ -511,10 +511,10 @@
+ * Formula for the P^2 representation is in agreement with the formula given in [4] page 12 (with a = -1)
+ * up to a common factor -1 which does not matter:
+ * <p>
+- * B = (X + Y)^2; C = X^2; D = Y^2; E = -C = -X^2; F := E + D = Y^2 - X^2; H = Z^2; J = F − 2 * H;
+- * X3 = (B − C − D) · J = X' * (-T');
+- * Y3 = F · (E − D) = Z' * (-Y');
+- * Z3 = F · J = Z' * (-T').
++ * B = (X + Y)^2; C = X^2; D = Y^2; E = -C = -X^2; F := E + D = Y^2 - X^2; H = Z^2; J = F - 2 * H;
++ * X3 = (B - C - D) . J = X' * (-T');
++ * Y3 = F . (E - D) = Z' * (-Y');
++ * Z3 = F . J = Z' * (-T').
+ *
+ * @return The P1P1 representation
+ */
+diff -Naur a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java
+--- a/core/java/src/net/i2p/data/DataHelper.java 2016-01-07 01:40:50.214460721 +0100
++++ b/core/java/src/net/i2p/data/DataHelper.java 2016-01-07 01:41:02.491461403 +0100
+@@ -1577,7 +1577,7 @@
+ } else if (adms < 0.001d) {
+ t = ngettext("1 ns", "{0,number,###} ns", (int) Math.round(ms * 1000000d));
+ } else if (adms < 1.0d) {
+- t = ngettext("1 μs", "{0,number,###} μs", (int) Math.round(ms * 1000d));
++ t = ngettext("1 us", "{0,number,###} us", (int) Math.round(ms * 1000d));
+ } else if (ams < 3 * 1000) {
+ t = ngettext("1 ms", "{0,number,####} ms", (int) Math.round(ms));
+ } else if (ams < 2 * 60 * 1000) {