* rebuild
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<License>GPLv3</License>
|
||||
<Summary>Free firewire audio drivers</Summary>
|
||||
<Description>libffado tries to provide open-source drivers for all FireWire based pro-audio devices.</Description>
|
||||
<Archive sha1sum="ae67b519358492afe705cdac4f70dd88d748271a" type="targz">http://www.ffado.org/files/libffado-2.4.2.tgz</Archive>
|
||||
<Archive sha1sum="ca9c5af7b5d327e57490b1e13add95e8c41ae331" type="targz">http://www.ffado.org/files/libffado-2.4.4.tgz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>xdg-utils</Dependency>
|
||||
<Dependency>glibmm-devel</Dependency>
|
||||
@@ -38,7 +38,7 @@
|
||||
<Patch level="1">libffado-2.4.0-py3-pyqt5-fixes.patch</Patch>
|
||||
<Patch level="1">libffado-2.4.0-additional-py3-fixes.patch</Patch>
|
||||
<Patch level="1">libffado-2.4.0-crossbar-router-fix.patch</Patch>-->
|
||||
<Patch level="1">libffado-2.4.2-python38.patch</Patch>
|
||||
<!-- <Patch level="1">libffado-2.4.2-python38.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -109,6 +109,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="7">
|
||||
<Date>2020-11-19</Date>
|
||||
<Version>2.4.4</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="6">
|
||||
<Date>2020-01-22</Date>
|
||||
<Version>2.4.2</Version>
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="8">
|
||||
<Date>2020-12-09</Date>
|
||||
<Version>1.3.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="7">
|
||||
<Date>2020-06-24</Date>
|
||||
<Version>1.3.0</Version>
|
||||
|
||||
@@ -44,6 +44,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="7">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>2.0.32</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="6">
|
||||
<Date>2020-03-02</Date>
|
||||
<Version>2.0.32</Version>
|
||||
|
||||
@@ -90,6 +90,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="8">
|
||||
<Date>2020-12-09</Date>
|
||||
<Version>0.99.11</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="7">
|
||||
<Date>2020-03-02</Date>
|
||||
<Version>0.99.11</Version>
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="6">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>2.12</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="5">
|
||||
<Date>2020-01-19</Date>
|
||||
<Version>2.12</Version>
|
||||
|
||||
@@ -206,6 +206,13 @@
|
||||
</Package-->
|
||||
|
||||
<History>
|
||||
<Update release="18">
|
||||
<Date>2020-12-09</Date>
|
||||
<Version>1.17.2</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="17">
|
||||
<Date>2020-10-05</Date>
|
||||
<Version>1.17.2</Version>
|
||||
|
||||
@@ -45,6 +45,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>2.0.0</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2020-09-28</Date>
|
||||
<Version>2.0.0</Version>
|
||||
|
||||
@@ -164,6 +164,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="11">
|
||||
<Date>2020-12-09</Date>
|
||||
<Version>1.2.10</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2020-10-05</Date>
|
||||
<Version>1.2.10</Version>
|
||||
|
||||
@@ -47,4 +47,4 @@ def install():
|
||||
pisitools.remove("/usr/share/info/bfd.info")
|
||||
|
||||
shelltools.cd("..")
|
||||
pisitools.dodoc("README*", "COPYING*", "ChangeLog*")
|
||||
pisitools.dodoc("README*", "COPYING*", "ChangeLog*")
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="8">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>9.2</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="7">
|
||||
<Date>2020-09-07</Date>
|
||||
<Version>9.2</Version>
|
||||
@@ -112,4 +119,4 @@
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
|
||||
@@ -60,6 +60,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="7">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>1.16.6</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="6">
|
||||
<Date>2020-10-01</Date>
|
||||
<Version>1.16.6</Version>
|
||||
|
||||
@@ -36,6 +36,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="11">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>0.29.21</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2020-07-21</Date>
|
||||
<Version>0.29.21</Version>
|
||||
@@ -107,4 +114,4 @@
|
||||
<Email>karaguzelibrahim@gmail.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>The fundamental package needed for scientific computing with Python</Summary>
|
||||
<Description>Numpy contains a powerful N-dimensional array object, sophisticated (broadcasting) functions, tools for integrating C/C++ and Fortran code, and useful linear algebra, Fourier transform, and random number capabilities.</Description>
|
||||
<Archive sha1sum="85a7dd868ec7447c1f0caed01c70c98c14fbe78a" type="targz">https://github.com/numpy/numpy/archive/v1.19.1.tar.gz</Archive>
|
||||
<Archive sha1sum="bddd04403c9400e25a3b89221bf89bd76d48ee7b" type="targz">https://github.com/numpy/numpy/archive/v1.19.4.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>cython3</Dependency>
|
||||
<Dependency>libgfortran</Dependency>
|
||||
<Dependency>cblas-devel</Dependency>
|
||||
<Dependency>lapack-devel</Dependency>
|
||||
<Dependency>python3-nose</Dependency>
|
||||
@@ -58,6 +59,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="11">
|
||||
<Date>2020-11-22</Date>
|
||||
<Version>1.19.4</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2020-08-30</Date>
|
||||
<Version>1.19.1</Version>
|
||||
|
||||
@@ -54,6 +54,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="8">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>4.0.1</Version>
|
||||
<Comment>Rebuild</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="7">
|
||||
<Date>2020-05-18</Date>
|
||||
<Version>4.0.1</Version>
|
||||
@@ -104,4 +111,4 @@
|
||||
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
|
||||
@@ -92,6 +92,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="13">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>1.72.0</Version>
|
||||
<Comment>Rebuild</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="12">
|
||||
<Date>2020-04-06</Date>
|
||||
<Version>1.72.0</Version>
|
||||
|
||||
@@ -72,7 +72,14 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="10">
|
||||
<Update release="11">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>65.1</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2020-01-12</Date>
|
||||
<Version>65.1</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
|
||||
@@ -6,23 +6,30 @@
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import mesontools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
mesontools.configure("-Dbuild-documentation=true")
|
||||
#shelltools.system("sh ./autogen.sh")
|
||||
#autotools.autoreconf("-fiv")
|
||||
# dont waste time building examples, docs and tests
|
||||
pisitools.dosed("Makefile.in", " tests examples docs")
|
||||
#pisitools.dosed("Makefile.in", " tests examples docs")
|
||||
|
||||
autotools.configure("--disable-static")
|
||||
#autotools.configure("--disable-static enable-shared=yes ENABLE_DOCUMENTATION=no")
|
||||
|
||||
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
|
||||
#pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
mesontools.build()
|
||||
#autotools.make()
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
mesontools.install()
|
||||
#autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
pisitools.removeDir("/usr/share/devhelp")
|
||||
#pisitools.removeDir("/usr/share/devhelp")
|
||||
|
||||
#move html docs to html doc dir
|
||||
pisitools.dodir("/usr/share/doc/%s/html" % get.srcNAME())
|
||||
|
||||
@@ -12,7 +12,12 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>Typesafe signal framework for C++</Summary>
|
||||
<Description>libsigc++ is a library which implements a full callback system for use in widget libraries, abstract interfaces, and general programming.</Description>
|
||||
<Archive sha1sum="9250f1c54d1985fb1a36c9650b963ecdae1227de" type="tarxz">mirrors://gnome/libsigc++/2.10/libsigc++-2.10.2.tar.xz</Archive>
|
||||
<Archive sha1sum="eecde11178a20b24a8bd0ff0fe6db194c9a8c9ca" type="tarxz">mirrors://gnome/libsigc++/2.10/libsigc++-2.10.4.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>meson</Dependency>
|
||||
<!-- <Dependency>doxygen</Dependency> -->
|
||||
<!-- <Dependency>docbook-xsl</Dependency> -->
|
||||
</BuildDependencies>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
@@ -48,6 +53,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="7">
|
||||
<Date>2020-11-19</Date>
|
||||
<Version>2.10.4</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="6">
|
||||
<Date>2020-01-12</Date>
|
||||
<Version>2.10.2</Version>
|
||||
|
||||
@@ -49,6 +49,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="7">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>0.2.2</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="6">
|
||||
<Date>2020-01-11</Date>
|
||||
<Version>0.2.2</Version>
|
||||
|
||||
@@ -65,6 +65,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>3.1.9</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2020-09-07</Date>
|
||||
<Version>3.1.9</Version>
|
||||
@@ -73,4 +80,4 @@
|
||||
<Email>bluedevil@sctzine.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>Memory access debugger for X86 and PPC Linux platforms</Summary>
|
||||
<Description>Valgrind is an award-winning suite of tools for debugging and profiling Linux programs. With the tools that come with Valgrind, you can automatically detect many memory management and threading bugs, avoiding hours of frustrating bug-hunting, making your programs more stable. You can also perform detailed profiling, to speed up and reduce memory use of your programs.</Description>
|
||||
<Archive sha1sum="4cc014e2390c4bcecb11aa00b37aa52d352db97f" type="tarbz2">ftp://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2</Archive>
|
||||
<Archive sha1sum="192bfe53802abb7f23edbb8aad61158a60c34f8a" type="tarbz2">ftp://sourceware.org/pub/valgrind/valgrind-3.16.1.tar.bz2</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>glibc-devel</Dependency>
|
||||
<Dependency>boost-devel</Dependency>
|
||||
@@ -31,6 +31,7 @@
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="executable">/usr/libexec</Path>
|
||||
<Path fileType="header">/usr/include/valgrind</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="doc">/usr/share/doc/valgrind</Path>
|
||||
@@ -39,6 +40,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="8">
|
||||
<Date>2020-11-21</Date>
|
||||
<Version>3.16.1</Version>
|
||||
<Comment>Version bump</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="7">
|
||||
<Date>2020-01-07</Date>
|
||||
<Version>3.15.0</Version>
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
shelltools.system("sh ./autogen.sh")
|
||||
autotools.configure("--with-posix-regex \
|
||||
--without-readlib \
|
||||
--disable-etags \
|
||||
@@ -15,6 +18,9 @@ def setup():
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
#def check():
|
||||
#autotools.make("check")
|
||||
|
||||
def install():
|
||||
autotools.install()
|
||||
@@ -23,5 +29,5 @@ def install():
|
||||
pisitools.rename("/usr/bin/ctags", "exuberant-ctags")
|
||||
pisitools.rename("/usr/share/man/man1/ctags.1", "exuberant-ctags.1")
|
||||
|
||||
pisitools.dohtml("EXTENDING.html", "ctags.html")
|
||||
pisitools.dodoc("COPYING", "FAQ", "NEWS", "README")
|
||||
#pisitools.dohtml("EXTENDING.html", "ctags.html")
|
||||
pisitools.dodoc("COPYING", "README*")
|
||||
|
||||
@@ -12,16 +12,32 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>Exuberant Ctags generates an index (or tag) file of objects found in source and header files</Summary>
|
||||
<Description>Exuberant Ctags generates an index (or tag) file of objects found in source and header files that allows these items to be quickly and easily located by a text editor or other utility. Currently supports 33 programming languages.</Description>
|
||||
<Archive sha1sum="482da1ecd182ab39bbdc09f2f02c9fba8cd20030" type="targz">mirrors://sourceforge/ctags/ctags-5.8.tar.gz</Archive>
|
||||
<Archive sha1sum="6da59c8883f26752e03b153522b59f1a7ecb2f51" type="targz">https://github.com/universal-ctags/ctags/archive/p5.9.20201129.0.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>docutils</Dependency>
|
||||
<Dependency>python3</Dependency>
|
||||
<Dependency>python3-Pygments</Dependency>
|
||||
<Dependency>python-docutils</Dependency>
|
||||
<Dependency>jansson-devel</Dependency>
|
||||
<Dependency>libxml2-devel</Dependency>
|
||||
<Dependency>libyaml-devel</Dependency>
|
||||
<Dependency>libseccomp-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">ctags-5.7-segment-fault.patch</Patch>
|
||||
<Patch>ctags-5.8-f95-pointers.patch</Patch>
|
||||
<Patch>ctags-5.8-python-vars-starting-with-def.patch</Patch>
|
||||
<!-- <Patch level="1">ctags-5.7-segment-fault.patch</Patch> -->
|
||||
<!-- <Patch>ctags-5.8-f95-pointers.patch</Patch> -->
|
||||
<!-- <Patch>ctags-5.8-python-vars-starting-with-def.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>ctags</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>jansson</Dependency>
|
||||
<Dependency>libxml2</Dependency>
|
||||
<Dependency>libyaml</Dependency>
|
||||
<Dependency>libseccomp</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
@@ -30,6 +46,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="6">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>5.9</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="5">
|
||||
<Date>2020-02-08</Date>
|
||||
<Version>5.8</Version>
|
||||
|
||||
@@ -108,6 +108,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="9">
|
||||
<Date>2020-11-07</Date>
|
||||
<Version>3.9.0</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="8">
|
||||
<Date>2019-12-12</Date>
|
||||
<Version>3.9.0</Version>
|
||||
@@ -165,4 +172,4 @@
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
|
||||
@@ -16,11 +16,11 @@ def build():
|
||||
pisitools.flags.add("-DNDEBUG -fPIC")
|
||||
pisitools.dosed("cryptopp.pc", "@VERSION@", get.srcVERSION())
|
||||
|
||||
cmaketools.make("dynamic cryptest.exe")
|
||||
cmaketools.make("dynamic cryptest.exe PREFIX=/usr libcryptopp.pc cryptopp.pc")
|
||||
|
||||
|
||||
def install():
|
||||
cmaketools.rawInstall("PREFIX=/usr DESTDIR=%s" % get.installDIR())
|
||||
cmaketools.rawInstall("DESTDIR=%s PREFIX=/usr" % get.installDIR())
|
||||
|
||||
pisitools.remove("/usr/lib/libcryptopp.a")
|
||||
|
||||
|
||||
@@ -0,0 +1,640 @@
|
||||
# Patch for Crypto++ timing leaks in EC gear (GH #869)
|
||||
# diff of Crypto++ 8.2 and Master 04b2a20c5da5
|
||||
--- pubkey.h
|
||||
+++ pubkey.h
|
||||
@@ -886,7 +886,7 @@
|
||||
/// \brief Retrieves the encoded element's size
|
||||
/// \param reversible flag indicating the encoding format
|
||||
/// \return encoded element's size, in bytes
|
||||
- /// \details The format of the encoded element varies by the underlyinhg type of the element and the
|
||||
+ /// \details The format of the encoded element varies by the underlying type of the element and the
|
||||
/// reversible flag. GetEncodedElementSize() must be implemented in a derived class.
|
||||
/// \sa GetEncodedElementSize(), EncodeElement(), DecodeElement()
|
||||
virtual unsigned int GetEncodedElementSize(bool reversible) const =0;
|
||||
@@ -1604,10 +1604,10 @@
|
||||
if (rng.CanIncorporateEntropy())
|
||||
rng.IncorporateEntropy(representative, representative.size());
|
||||
|
||||
- Integer k;
|
||||
+ Integer k, ks;
|
||||
+ const Integer& q = params.GetSubgroupOrder();
|
||||
if (alg.IsDeterministic())
|
||||
{
|
||||
- const Integer& q = params.GetSubgroupOrder();
|
||||
const Integer& x = key.GetPrivateExponent();
|
||||
const DeterministicSignatureAlgorithm& det = dynamic_cast<const DeterministicSignatureAlgorithm&>(alg);
|
||||
k = det.GenerateRandom(x, q, e);
|
||||
@@ -1617,8 +1617,15 @@
|
||||
k.Randomize(rng, 1, params.GetSubgroupOrder()-1);
|
||||
}
|
||||
|
||||
+ // Due to timing attack on nonce length by Jancar
|
||||
+ // https://github.com/weidai11/cryptopp/issues/869
|
||||
+ ks = k + q;
|
||||
+ if (ks.BitCount() == q.BitCount()) {
|
||||
+ ks += q;
|
||||
+ }
|
||||
+
|
||||
Integer r, s;
|
||||
- r = params.ConvertElementToInteger(params.ExponentiateBase(k));
|
||||
+ r = params.ConvertElementToInteger(params.ExponentiateBase(ks));
|
||||
alg.Sign(params, key.GetPrivateExponent(), k, e, r, s);
|
||||
|
||||
/*
|
||||
@@ -1630,7 +1637,7 @@
|
||||
alg.Sign(params, key.GetPrivateExponent(), ma.m_k, e, r, s);
|
||||
*/
|
||||
|
||||
- size_t rLen = alg.RLen(params);
|
||||
+ const size_t rLen = alg.RLen(params);
|
||||
r.Encode(signature, rLen);
|
||||
s.Encode(signature+rLen, alg.SLen(params));
|
||||
|
||||
--- ecp.cpp
|
||||
+++ ecp.cpp
|
||||
@@ -15,10 +15,12 @@
|
||||
ANONYMOUS_NAMESPACE_BEGIN
|
||||
|
||||
using CryptoPP::ECP;
|
||||
+using CryptoPP::Integer;
|
||||
using CryptoPP::ModularArithmetic;
|
||||
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY)
|
||||
- const ECP::Point g_identity __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 51))) = ECP::Point();
|
||||
+ #define INIT_ATTRIBUTE __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 50)))
|
||||
+ const ECP::Point g_identity INIT_ATTRIBUTE = ECP::Point();
|
||||
#elif defined(HAVE_MSC_INIT_PRIORITY)
|
||||
#pragma warning(disable: 4075)
|
||||
#pragma init_seg(".CRT$XCU")
|
||||
@@ -39,6 +41,502 @@
|
||||
return P.identity ? P : ECP::Point(mr.ConvertOut(P.x), mr.ConvertOut(P.y));
|
||||
}
|
||||
|
||||
+inline Integer IdentityToInteger(bool val)
|
||||
+{
|
||||
+ return val ? Integer::One() : Integer::Zero();
|
||||
+}
|
||||
+
|
||||
+struct ProjectivePoint
|
||||
+{
|
||||
+ ProjectivePoint() {}
|
||||
+ ProjectivePoint(const Integer &x, const Integer &y, const Integer &z)
|
||||
+ : x(x), y(y), z(z) {}
|
||||
+
|
||||
+ Integer x, y, z;
|
||||
+};
|
||||
+
|
||||
+/// \brief Addition and Double functions
|
||||
+/// \sa <A HREF="https://eprint.iacr.org/2015/1060.pdf">Complete
|
||||
+/// addition formulas for prime order elliptic curves</A>
|
||||
+struct AdditionFunction
|
||||
+{
|
||||
+ explicit AdditionFunction(const ECP::Field& field,
|
||||
+ const ECP::FieldElement &a, const ECP::FieldElement &b, ECP::Point &r);
|
||||
+
|
||||
+ // Double(P)
|
||||
+ ECP::Point operator()(const ECP::Point& P) const;
|
||||
+ // Add(P, Q)
|
||||
+ ECP::Point operator()(const ECP::Point& P, const ECP::Point& Q) const;
|
||||
+
|
||||
+protected:
|
||||
+ /// \brief Parameters and representation for Addition
|
||||
+ /// \details Addition and Doubling will use different algorithms,
|
||||
+ /// depending on the <tt>A</tt> coefficient and the representation
|
||||
+ /// (Affine or Montgomery with precomputation).
|
||||
+ enum Alpha {
|
||||
+ /// \brief Coefficient A is 0
|
||||
+ A_0 = 1,
|
||||
+ /// \brief Coefficient A is -3
|
||||
+ A_3 = 2,
|
||||
+ /// \brief Coefficient A is arbitrary
|
||||
+ A_Star = 4,
|
||||
+ /// \brief Representation is Montgomery
|
||||
+ A_Montgomery = 8
|
||||
+ };
|
||||
+
|
||||
+ const ECP::Field& field;
|
||||
+ const ECP::FieldElement &a, &b;
|
||||
+ ECP::Point &R;
|
||||
+
|
||||
+ Alpha m_alpha;
|
||||
+};
|
||||
+
|
||||
+#define X p.x
|
||||
+#define Y p.y
|
||||
+#define Z p.z
|
||||
+
|
||||
+#define X1 p.x
|
||||
+#define Y1 p.y
|
||||
+#define Z1 p.z
|
||||
+
|
||||
+#define X2 q.x
|
||||
+#define Y2 q.y
|
||||
+#define Z2 q.z
|
||||
+
|
||||
+#define X3 r.x
|
||||
+#define Y3 r.y
|
||||
+#define Z3 r.z
|
||||
+
|
||||
+AdditionFunction::AdditionFunction(const ECP::Field& field,
|
||||
+ const ECP::FieldElement &a, const ECP::FieldElement &b, ECP::Point &r)
|
||||
+ : field(field), a(a), b(b), R(r), m_alpha(static_cast<Alpha>(0))
|
||||
+{
|
||||
+ if (field.IsMontgomeryRepresentation())
|
||||
+ {
|
||||
+ m_alpha = A_Montgomery;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (a == 0)
|
||||
+ {
|
||||
+ m_alpha = A_0;
|
||||
+ }
|
||||
+ else if (a == -3 || (a - field.GetModulus()) == -3)
|
||||
+ {
|
||||
+ m_alpha = A_3;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ m_alpha = A_Star;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+ECP::Point AdditionFunction::operator()(const ECP::Point& P) const
|
||||
+{
|
||||
+ if (m_alpha == A_3)
|
||||
+ {
|
||||
+ // Gyrations attempt to maintain constant-timeness
|
||||
+ // We need either (P.x, P.y, 1) or (0, 1, 0).
|
||||
+ const Integer x = P.x * IdentityToInteger(!P.identity);
|
||||
+ const Integer y = P.y * IdentityToInteger(!P.identity) + 1 * IdentityToInteger(P.identity);
|
||||
+ const Integer z = 1 * IdentityToInteger(!P.identity);
|
||||
+
|
||||
+ ProjectivePoint p(x, y, z), r;
|
||||
+
|
||||
+ ECP::FieldElement t0 = field.Square(X);
|
||||
+ ECP::FieldElement t1 = field.Square(Y);
|
||||
+ ECP::FieldElement t2 = field.Square(Z);
|
||||
+ ECP::FieldElement t3 = field.Multiply(X, Y);
|
||||
+ t3 = field.Add(t3, t3);
|
||||
+ Z3 = field.Multiply(X, Z);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ Y3 = field.Multiply(b, t2);
|
||||
+ Y3 = field.Subtract(Y3, Z3);
|
||||
+ X3 = field.Add(Y3, Y3);
|
||||
+ Y3 = field.Add(X3, Y3);
|
||||
+ X3 = field.Subtract(t1, Y3);
|
||||
+ Y3 = field.Add(t1, Y3);
|
||||
+ Y3 = field.Multiply(X3, Y3);
|
||||
+ X3 = field.Multiply(X3, t3);
|
||||
+ t3 = field.Add(t2, t2);
|
||||
+ t2 = field.Add(t2, t3);
|
||||
+ Z3 = field.Multiply(b, Z3);
|
||||
+ Z3 = field.Subtract(Z3, t2);
|
||||
+ Z3 = field.Subtract(Z3, t0);
|
||||
+ t3 = field.Add(Z3, Z3);
|
||||
+ Z3 = field.Add(Z3, t3);
|
||||
+ t3 = field.Add(t0, t0);
|
||||
+ t0 = field.Add(t3, t0);
|
||||
+ t0 = field.Subtract(t0, t2);
|
||||
+ t0 = field.Multiply(t0, Z3);
|
||||
+ Y3 = field.Add(Y3, t0);
|
||||
+ t0 = field.Multiply(Y, Z);
|
||||
+ t0 = field.Add(t0, t0);
|
||||
+ Z3 = field.Multiply(t0, Z3);
|
||||
+ X3 = field.Subtract(X3, Z3);
|
||||
+ Z3 = field.Multiply(t0, t1);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+
|
||||
+ const ECP::FieldElement inv = field.MultiplicativeInverse(Z3.IsZero() ? Integer::One() : Z3);
|
||||
+ X3 = field.Multiply(X3, inv); Y3 = field.Multiply(Y3, inv);
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x = X3*Z3.NotZero();
|
||||
+ R.y = Y3*Z3.NotZero();
|
||||
+ R.identity = Z3.IsZero();
|
||||
+
|
||||
+ return R;
|
||||
+ }
|
||||
+ else if (m_alpha == A_0)
|
||||
+ {
|
||||
+ const ECP::FieldElement b3 = field.Multiply(b, 3);
|
||||
+
|
||||
+ // Gyrations attempt to maintain constant-timeness
|
||||
+ // We need either (P.x, P.y, 1) or (0, 1, 0).
|
||||
+ const Integer x = P.x * IdentityToInteger(!P.identity);
|
||||
+ const Integer y = P.y * IdentityToInteger(!P.identity) + 1 * IdentityToInteger(P.identity);
|
||||
+ const Integer z = 1 * IdentityToInteger(!P.identity);
|
||||
+
|
||||
+ ProjectivePoint p(x, y, z), r;
|
||||
+
|
||||
+ ECP::FieldElement t0 = field.Square(Y);
|
||||
+ Z3 = field.Add(t0, t0);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ ECP::FieldElement t1 = field.Add(Y, Z);
|
||||
+ ECP::FieldElement t2 = field.Square(Z);
|
||||
+ t2 = field.Multiply(b3, t2);
|
||||
+ X3 = field.Multiply(t2, Z3);
|
||||
+ Y3 = field.Add(t0, t2);
|
||||
+ Z3 = field.Multiply(t1, Z3);
|
||||
+ t1 = field.Add(t2, t2);
|
||||
+ t2 = field.Add(t1, t2);
|
||||
+ t0 = field.Subtract(t0, t2);
|
||||
+ Y3 = field.Multiply(t0, Y3);
|
||||
+ Y3 = field.Add(X3, Y3);
|
||||
+ t1 = field.Multiply(X, Y);
|
||||
+ X3 = field.Multiply(t0, t1);
|
||||
+ X3 = field.Add(X3, X3);
|
||||
+
|
||||
+ const ECP::FieldElement inv = field.MultiplicativeInverse(Z3.IsZero() ? Integer::One() : Z3);
|
||||
+ X3 = field.Multiply(X3, inv); Y3 = field.Multiply(Y3, inv);
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x = X3*Z3.NotZero();
|
||||
+ R.y = Y3*Z3.NotZero();
|
||||
+ R.identity = Z3.IsZero();
|
||||
+
|
||||
+ return R;
|
||||
+ }
|
||||
+ else if (m_alpha == A_Star)
|
||||
+ {
|
||||
+ const ECP::FieldElement b3 = field.Multiply(b, 3);
|
||||
+
|
||||
+ // Gyrations attempt to maintain constant-timeness
|
||||
+ // We need either (P.x, P.y, 1) or (0, 1, 0).
|
||||
+ const Integer x = P.x * IdentityToInteger(!P.identity);
|
||||
+ const Integer y = P.y * IdentityToInteger(!P.identity) + 1 * IdentityToInteger(P.identity);
|
||||
+ const Integer z = 1 * IdentityToInteger(!P.identity);
|
||||
+
|
||||
+ ProjectivePoint p(x, y, z), r;
|
||||
+
|
||||
+ ECP::FieldElement t0 = field.Square(Y);
|
||||
+ Z3 = field.Add(t0, t0);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ ECP::FieldElement t1 = field.Add(Y, Z);
|
||||
+ ECP::FieldElement t2 = field.Square(Z);
|
||||
+ t2 = field.Multiply(b3, t2);
|
||||
+ X3 = field.Multiply(t2, Z3);
|
||||
+ Y3 = field.Add(t0, t2);
|
||||
+ Z3 = field.Multiply(t1, Z3);
|
||||
+ t1 = field.Add(t2, t2);
|
||||
+ t2 = field.Add(t1, t2);
|
||||
+ t0 = field.Subtract(t0, t2);
|
||||
+ Y3 = field.Multiply(t0, Y3);
|
||||
+ Y3 = field.Add(X3, Y3);
|
||||
+ t1 = field.Multiply(X, Y);
|
||||
+ X3 = field.Multiply(t0, t1);
|
||||
+ X3 = field.Add(X3, X3);
|
||||
+
|
||||
+ const ECP::FieldElement inv = field.MultiplicativeInverse(Z3.IsZero() ? Integer::One() : Z3);
|
||||
+ X3 = field.Multiply(X3, inv); Y3 = field.Multiply(Y3, inv);
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x = X3*Z3.NotZero();
|
||||
+ R.y = Y3*Z3.NotZero();
|
||||
+ R.identity = Z3.IsZero();
|
||||
+
|
||||
+ return R;
|
||||
+ }
|
||||
+ else // A_Montgomery
|
||||
+ {
|
||||
+ // More gyrations
|
||||
+ bool identity = !!(P.identity + (P.y == field.Identity()));
|
||||
+
|
||||
+ ECP::FieldElement t = field.Square(P.x);
|
||||
+ t = field.Add(field.Add(field.Double(t), t), a);
|
||||
+ t = field.Divide(t, field.Double(P.y));
|
||||
+ ECP::FieldElement x = field.Subtract(field.Subtract(field.Square(t), P.x), P.x);
|
||||
+ R.y = field.Subtract(field.Multiply(t, field.Subtract(P.x, x)), P.y);
|
||||
+ R.x.swap(x);
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x *= IdentityToInteger(!identity);
|
||||
+ R.y *= IdentityToInteger(!identity);
|
||||
+ R.identity = identity;
|
||||
+
|
||||
+ return R;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+ECP::Point AdditionFunction::operator()(const ECP::Point& P, const ECP::Point& Q) const
|
||||
+{
|
||||
+ if (m_alpha == A_3)
|
||||
+ {
|
||||
+ // Gyrations attempt to maintain constant-timeness
|
||||
+ // We need either (P.x, P.y, 1) or (0, 1, 0).
|
||||
+ const Integer x1 = P.x * IdentityToInteger(!P.identity);
|
||||
+ const Integer y1 = P.y * IdentityToInteger(!P.identity) + 1 * IdentityToInteger(P.identity);
|
||||
+ const Integer z1 = 1 * IdentityToInteger(!P.identity);
|
||||
+
|
||||
+ const Integer x2 = Q.x * IdentityToInteger(!Q.identity);
|
||||
+ const Integer y2 = Q.y * IdentityToInteger(!Q.identity) + 1 * IdentityToInteger(Q.identity);
|
||||
+ const Integer z2 = 1 * IdentityToInteger(!Q.identity);
|
||||
+
|
||||
+ ProjectivePoint p(x1, y1, z1), q(x2, y2, z2), r;
|
||||
+
|
||||
+ ECP::FieldElement t0 = field.Multiply(X1, X2);
|
||||
+ ECP::FieldElement t1 = field.Multiply(Y1, Y2);
|
||||
+ ECP::FieldElement t2 = field.Multiply(Z1, Z2);
|
||||
+ ECP::FieldElement t3 = field.Add(X1, Y1);
|
||||
+ ECP::FieldElement t4 = field.Add(X2, Y2);
|
||||
+ t3 = field.Multiply(t3, t4);
|
||||
+ t4 = field.Add(t0, t1);
|
||||
+ t3 = field.Subtract(t3, t4);
|
||||
+ t4 = field.Add(Y1, Z1);
|
||||
+ X3 = field.Add(Y2, Z2);
|
||||
+ t4 = field.Multiply(t4, X3);
|
||||
+ X3 = field.Add(t1, t2);
|
||||
+ t4 = field.Subtract(t4, X3);
|
||||
+ X3 = field.Add(X1, Z1);
|
||||
+ Y3 = field.Add(X2, Z2);
|
||||
+ X3 = field.Multiply(X3, Y3);
|
||||
+ Y3 = field.Add(t0, t2);
|
||||
+ Y3 = field.Subtract(X3, Y3);
|
||||
+ Z3 = field.Multiply(b, t2);
|
||||
+ X3 = field.Subtract(Y3, Z3);
|
||||
+ Z3 = field.Add(X3, X3);
|
||||
+ X3 = field.Add(X3, Z3);
|
||||
+ Z3 = field.Subtract(t1, X3);
|
||||
+ X3 = field.Add(t1, X3);
|
||||
+ Y3 = field.Multiply(b, Y3);
|
||||
+ t1 = field.Add(t2, t2);
|
||||
+ t2 = field.Add(t1, t2);
|
||||
+ Y3 = field.Subtract(Y3, t2);
|
||||
+ Y3 = field.Subtract(Y3, t0);
|
||||
+ t1 = field.Add(Y3, Y3);
|
||||
+ Y3 = field.Add(t1, Y3);
|
||||
+ t1 = field.Add(t0, t0);
|
||||
+ t0 = field.Add(t1, t0);
|
||||
+ t0 = field.Subtract(t0, t2);
|
||||
+ t1 = field.Multiply(t4, Y3);
|
||||
+ t2 = field.Multiply(t0, Y3);
|
||||
+ Y3 = field.Multiply(X3, Z3);
|
||||
+ Y3 = field.Add(Y3, t2);
|
||||
+ X3 = field.Multiply(t3, X3);
|
||||
+ X3 = field.Subtract(X3, t1);
|
||||
+ Z3 = field.Multiply(t4, Z3);
|
||||
+ t1 = field.Multiply(t3, t0);
|
||||
+ Z3 = field.Add(Z3, t1);
|
||||
+
|
||||
+ const ECP::FieldElement inv = field.MultiplicativeInverse(Z3.IsZero() ? Integer::One() : Z3);
|
||||
+ X3 = field.Multiply(X3, inv); Y3 = field.Multiply(Y3, inv);
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x = X3*Z3.NotZero();
|
||||
+ R.y = Y3*Z3.NotZero();
|
||||
+ R.identity = Z3.IsZero();
|
||||
+
|
||||
+ return R;
|
||||
+ }
|
||||
+ else if (m_alpha == A_0)
|
||||
+ {
|
||||
+ const ECP::FieldElement b3 = field.Multiply(b, 3);
|
||||
+
|
||||
+ // Gyrations attempt to maintain constant-timeness
|
||||
+ // We need either (P.x, P.y, 1) or (0, 1, 0).
|
||||
+ const Integer x1 = P.x * IdentityToInteger(!P.identity);
|
||||
+ const Integer y1 = P.y * IdentityToInteger(!P.identity) + 1 * IdentityToInteger(P.identity);
|
||||
+ const Integer z1 = 1 * IdentityToInteger(!P.identity);
|
||||
+
|
||||
+ const Integer x2 = Q.x * IdentityToInteger(!Q.identity);
|
||||
+ const Integer y2 = Q.y * IdentityToInteger(!Q.identity) + 1 * IdentityToInteger(Q.identity);
|
||||
+ const Integer z2 = 1 * IdentityToInteger(!Q.identity);
|
||||
+
|
||||
+ ProjectivePoint p(x1, y1, z1), q(x2, y2, z2), r;
|
||||
+
|
||||
+ ECP::FieldElement t0 = field.Square(Y);
|
||||
+ Z3 = field.Add(t0, t0);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ Z3 = field.Add(Z3, Z3);
|
||||
+ ECP::FieldElement t1 = field.Add(Y, Z);
|
||||
+ ECP::FieldElement t2 = field.Square(Z);
|
||||
+ t2 = field.Multiply(b3, t2);
|
||||
+ X3 = field.Multiply(t2, Z3);
|
||||
+ Y3 = field.Add(t0, t2);
|
||||
+ Z3 = field.Multiply(t1, Z3);
|
||||
+ t1 = field.Add(t2, t2);
|
||||
+ t2 = field.Add(t1, t2);
|
||||
+ t0 = field.Subtract(t0, t2);
|
||||
+ Y3 = field.Multiply(t0, Y3);
|
||||
+ Y3 = field.Add(X3, Y3);
|
||||
+ t1 = field.Multiply(X, Y);
|
||||
+ X3 = field.Multiply(t0, t1);
|
||||
+ X3 = field.Add(X3, X3);
|
||||
+
|
||||
+ const ECP::FieldElement inv = field.MultiplicativeInverse(Z3.IsZero() ? Integer::One() : Z3);
|
||||
+ X3 = field.Multiply(X3, inv); Y3 = field.Multiply(Y3, inv);
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x = X3*Z3.NotZero();
|
||||
+ R.y = Y3*Z3.NotZero();
|
||||
+ R.identity = Z3.IsZero();
|
||||
+
|
||||
+ return R;
|
||||
+ }
|
||||
+ else if (m_alpha == A_Star)
|
||||
+ {
|
||||
+ const ECP::FieldElement b3 = field.Multiply(b, 3);
|
||||
+
|
||||
+ // Gyrations attempt to maintain constant-timeness
|
||||
+ // We need either (P.x, P.y, 1) or (0, 1, 0).
|
||||
+ const Integer x1 = P.x * IdentityToInteger(!P.identity);
|
||||
+ const Integer y1 = P.y * IdentityToInteger(!P.identity) + 1 * IdentityToInteger(P.identity);
|
||||
+ const Integer z1 = 1 * IdentityToInteger(!P.identity);
|
||||
+
|
||||
+ const Integer x2 = Q.x * IdentityToInteger(!Q.identity);
|
||||
+ const Integer y2 = Q.y * IdentityToInteger(!Q.identity) + 1 * IdentityToInteger(Q.identity);
|
||||
+ const Integer z2 = 1 * IdentityToInteger(!Q.identity);
|
||||
+
|
||||
+ ProjectivePoint p(x1, y1, z1), q(x2, y2, z2), r;
|
||||
+
|
||||
+ ECP::FieldElement t0 = field.Multiply(X1, X2);
|
||||
+ ECP::FieldElement t1 = field.Multiply(Y1, Y2);
|
||||
+ ECP::FieldElement t2 = field.Multiply(Z1, Z2);
|
||||
+ ECP::FieldElement t3 = field.Add(X1, Y1);
|
||||
+ ECP::FieldElement t4 = field.Add(X2, Y2);
|
||||
+ t3 = field.Multiply(t3, t4);
|
||||
+ t4 = field.Add(t0, t1);
|
||||
+ t3 = field.Subtract(t3, t4);
|
||||
+ t4 = field.Add(X1, Z1);
|
||||
+ ECP::FieldElement t5 = field.Add(X2, Z2);
|
||||
+ t4 = field.Multiply(t4, t5);
|
||||
+ t5 = field.Add(t0, t2);
|
||||
+ t4 = field.Subtract(t4, t5);
|
||||
+ t5 = field.Add(Y1, Z1);
|
||||
+ X3 = field.Add(Y2, Z2);
|
||||
+ t5 = field.Multiply(t5, X3);
|
||||
+ X3 = field.Add(t1, t2);
|
||||
+ t5 = field.Subtract(t5, X3);
|
||||
+ Z3 = field.Multiply(a, t4);
|
||||
+ X3 = field.Multiply(b3, t2);
|
||||
+ Z3 = field.Add(X3, Z3);
|
||||
+ X3 = field.Subtract(t1, Z3);
|
||||
+ Z3 = field.Add(t1, Z3);
|
||||
+ Y3 = field.Multiply(X3, Z3);
|
||||
+ t1 = field.Add(t0, t0);
|
||||
+ t1 = field.Add(t1, t0);
|
||||
+ t2 = field.Multiply(a, t2);
|
||||
+ t4 = field.Multiply(b3, t4);
|
||||
+ t1 = field.Add(t1, t2);
|
||||
+ t2 = field.Subtract(t0, t2);
|
||||
+ t2 = field.Multiply(a, t2);
|
||||
+ t4 = field.Add(t4, t2);
|
||||
+ t0 = field.Multiply(t1, t4);
|
||||
+ Y3 = field.Add(Y3, t0);
|
||||
+ t0 = field.Multiply(t5, t4);
|
||||
+ X3 = field.Multiply(t3, X3);
|
||||
+ X3 = field.Subtract(X3, t0);
|
||||
+ t0 = field.Multiply(t3, t1);
|
||||
+ Z3 = field.Multiply(t5, Z3);
|
||||
+ Z3 = field.Add(Z3, t0);
|
||||
+
|
||||
+ const ECP::FieldElement inv = field.MultiplicativeInverse(Z3.IsZero() ? Integer::One() : Z3);
|
||||
+ X3 = field.Multiply(X3, inv); Y3 = field.Multiply(Y3, inv);
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x = X3*Z3.NotZero();
|
||||
+ R.y = Y3*Z3.NotZero();
|
||||
+ R.identity = Z3.IsZero();
|
||||
+
|
||||
+ return R;
|
||||
+ }
|
||||
+ else // A_Montgomery
|
||||
+ {
|
||||
+ ECP::Point S = R;
|
||||
+
|
||||
+ // More gyrations
|
||||
+ bool return_Q = P.identity;
|
||||
+ bool return_P = Q.identity;
|
||||
+ bool double_P = field.Equal(P.x, Q.x) && field.Equal(P.y, Q.y);
|
||||
+ bool identity = field.Equal(P.x, Q.x) && !field.Equal(P.y, Q.y);
|
||||
+
|
||||
+ // This code taken from Double(P) for below
|
||||
+ identity = !!((double_P * (P.identity + (P.y == field.Identity()))) + identity);
|
||||
+
|
||||
+ if (double_P)
|
||||
+ {
|
||||
+ // This code taken from Double(P)
|
||||
+ ECP::FieldElement t = field.Square(P.x);
|
||||
+ t = field.Add(field.Add(field.Double(t), t), a);
|
||||
+ t = field.Divide(t, field.Double(P.y));
|
||||
+ ECP::FieldElement x = field.Subtract(field.Subtract(field.Square(t), P.x), P.x);
|
||||
+ R.y = field.Subtract(field.Multiply(t, field.Subtract(P.x, x)), P.y);
|
||||
+ R.x.swap(x);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // Original Add(P,Q) code
|
||||
+ ECP::FieldElement t = field.Subtract(Q.y, P.y);
|
||||
+ t = field.Divide(t, field.Subtract(Q.x, P.x));
|
||||
+ ECP::FieldElement x = field.Subtract(field.Subtract(field.Square(t), P.x), Q.x);
|
||||
+ R.y = field.Subtract(field.Multiply(t, field.Subtract(P.x, x)), P.y);
|
||||
+ R.x.swap(x);
|
||||
+ }
|
||||
+
|
||||
+ // More gyrations
|
||||
+ R.x = R.x * IdentityToInteger(!identity);
|
||||
+ R.y = R.y * IdentityToInteger(!identity);
|
||||
+ R.identity = identity;
|
||||
+
|
||||
+ if (return_Q)
|
||||
+ return (R = S), Q;
|
||||
+ else if (return_P)
|
||||
+ return (R = S), P;
|
||||
+ else
|
||||
+ return (S = R), R;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#undef X
|
||||
+#undef Y
|
||||
+#undef Z
|
||||
+
|
||||
+#undef X1
|
||||
+#undef Y1
|
||||
+#undef Z1
|
||||
+
|
||||
+#undef X2
|
||||
+#undef Y2
|
||||
+#undef Z2
|
||||
+
|
||||
+#undef X3
|
||||
+#undef Y3
|
||||
+#undef Z3
|
||||
+
|
||||
ANONYMOUS_NAMESPACE_END
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
@@ -243,34 +741,14 @@
|
||||
|
||||
const ECP::Point& ECP::Add(const Point &P, const Point &Q) const
|
||||
{
|
||||
- if (P.identity) return Q;
|
||||
- if (Q.identity) return P;
|
||||
- if (GetField().Equal(P.x, Q.x))
|
||||
- return GetField().Equal(P.y, Q.y) ? Double(P) : Identity();
|
||||
-
|
||||
- FieldElement t = GetField().Subtract(Q.y, P.y);
|
||||
- t = GetField().Divide(t, GetField().Subtract(Q.x, P.x));
|
||||
- FieldElement x = GetField().Subtract(GetField().Subtract(GetField().Square(t), P.x), Q.x);
|
||||
- m_R.y = GetField().Subtract(GetField().Multiply(t, GetField().Subtract(P.x, x)), P.y);
|
||||
-
|
||||
- m_R.x.swap(x);
|
||||
- m_R.identity = false;
|
||||
- return m_R;
|
||||
+ AdditionFunction add(GetField(), m_a, m_b, m_R);
|
||||
+ return (m_R = add(P, Q));
|
||||
}
|
||||
|
||||
const ECP::Point& ECP::Double(const Point &P) const
|
||||
{
|
||||
- if (P.identity || P.y==GetField().Identity()) return Identity();
|
||||
-
|
||||
- FieldElement t = GetField().Square(P.x);
|
||||
- t = GetField().Add(GetField().Add(GetField().Double(t), t), m_a);
|
||||
- t = GetField().Divide(t, GetField().Double(P.y));
|
||||
- FieldElement x = GetField().Subtract(GetField().Subtract(GetField().Square(t), P.x), P.x);
|
||||
- m_R.y = GetField().Subtract(GetField().Multiply(t, GetField().Subtract(P.x, x)), P.y);
|
||||
-
|
||||
- m_R.x.swap(x);
|
||||
- m_R.identity = false;
|
||||
- return m_R;
|
||||
+ AdditionFunction add(GetField(), m_a, m_b, m_R);
|
||||
+ return (m_R = add(P));
|
||||
}
|
||||
|
||||
template <class T, class Iterator> void ParallelInvert(const AbstractRing<T> &ring, Iterator begin, Iterator end)
|
||||
@@ -310,20 +788,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
-struct ProjectivePoint
|
||||
-{
|
||||
- ProjectivePoint() {}
|
||||
- ProjectivePoint(const Integer &x, const Integer &y, const Integer &z)
|
||||
- : x(x), y(y), z(z) {}
|
||||
-
|
||||
- Integer x,y,z;
|
||||
-};
|
||||
-
|
||||
class ProjectiveDoubling
|
||||
{
|
||||
public:
|
||||
ProjectiveDoubling(const ModularArithmetic &m_mr, const Integer &m_a, const Integer &m_b, const ECPPoint &Q)
|
||||
- : mr(m_mr), firstDoubling(true), negated(false)
|
||||
+ : mr(m_mr)
|
||||
{
|
||||
CRYPTOPP_UNUSED(m_b);
|
||||
if (Q.identity)
|
||||
@@ -360,7 +829,6 @@
|
||||
|
||||
const ModularArithmetic &mr;
|
||||
ProjectivePoint P;
|
||||
- bool firstDoubling, negated;
|
||||
Integer sixteenY4, aZ4, twoY, fourY2, S, M;
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>Public domain C++ class library of cryptographic schemes</Summary>
|
||||
<Description>crypto++ is a free C++ class library of cryptographic schemes. One purpose of Crypto++ is to act as a repository of public domain (not copyrighted) source code. Although the library is copyrighted as a compilation, the individual files in it are in the public domain.</Description>
|
||||
<Archive sha1sum="67d2fd0f7335aa4917a17a04e6f5bdd3dcedd75f" type="targz">https://github.com/weidai11/cryptopp/archive/CRYPTOPP_7_0_0.tar.gz</Archive>
|
||||
<Archive sha1sum="8afe6a5695a11e7bd0aaa6e1271a64aa59857cc1" type="targz">https://github.com/weidai11/cryptopp/archive/CRYPTOPP_8_2_0.tar.gz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="cryptopp.pc" permission="0644" owner="root">cryptopp.pc</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
@@ -20,6 +20,9 @@
|
||||
<Dependency>cmake</Dependency>
|
||||
<Dependency>dos2unix</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="0">cve-2019-14318.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
@@ -47,6 +50,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="5">
|
||||
<Date>2020-11-20</Date>
|
||||
<Version>8.2.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="4">
|
||||
<Date>2019-04-23</Date>
|
||||
<Version>7.0.0</Version>
|
||||
|
||||
@@ -89,6 +89,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="8">
|
||||
<Date>2020-11-09</Date>
|
||||
<Version>2.2.20</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="8">
|
||||
<Date>2020-06-03</Date>
|
||||
<Version>2.2.20</Version>
|
||||
|
||||
@@ -61,6 +61,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="9">
|
||||
<Date>2020-12-09</Date>
|
||||
<Version>1.4.1</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="8">
|
||||
<Date>2020-01-24</Date>
|
||||
<Version>1.4.1</Version>
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+9
-2
@@ -64,7 +64,7 @@
|
||||
<Patch level="1">xserver-autobind-hotplug.patch</Patch>
|
||||
<Patch level="1">xorg-server-1.12-unloadsubmodule.patch</Patch>
|
||||
<Patch level="1">xorg-server-1.18-support-multiple-Files-sections.patch</Patch>
|
||||
<Patch level="1">0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch</Patch>
|
||||
<!-- <Patch level="1">xorg-server-1.19.4-sysmacros.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -274,8 +274,15 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="17">
|
||||
<Date>2020-12-09</Date>
|
||||
<Version>1.20.9</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="16">
|
||||
<Date>2020-10-03</Date>
|
||||
<Date>2020-09-08</Date>
|
||||
<Version>1.20.9</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
|
||||
Regular → Executable
Reference in New Issue
Block a user