-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSHELib.spec
More file actions
89 lines (78 loc) · 2.33 KB
/
Copy pathSHELib.spec
File metadata and controls
89 lines (78 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Name: {{{ git_dir_name }}}
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Simple Homomorphic Encryption Library
License: Apache License
URL: https://someurl.org
VCS: {{{ git_dir_vcs }}}
Source: {{{ git_dir_pack }}}
BuildRequires: HElib > 2.0.0
BuildRequires: gmp-devel
BuildRequires: gcc-c++
BuildRequires: make
%if 0%{?rhel} != 9
BuildRequires: pandoc
%endif
Requires: HELib > 2.0.0
%description
Homomorphic Encryption allows you to send encrypted data to a third party
and that third party can do computations on the data and return it to you
will all the computations happening on the encrypted data itself. This
library uses the HElib's binArithmetic library to implement as full a C++
semantic as possible. HElib uses the BGV homomorphic encryption system. This
system can do primitive operations of bit level addition and bit level
multiplication. Each operation adds some noise to the result, so only
a limited number of operations can be done before the noise overwhelms our
actual data. Part of BGV is a way to set the noise level to a lower value
by decrypting our the encrypted value homophorphically. The details aren't
important for the use of SHELib, but this affects the performance of any
calculations you do.
%prep
{{{ git_dir_setup_macro }}}
%build
export TARGET_INCLUDE=%{_includedir}
export TARGET_LIB=%{_libdir}
export TARGET_BIN=%{_bindir}
export TARGET_MAN=%{_mandir}
export TARGET_DOC=%{_datadir}/doc
export VERSION=%{version}
%if 0%{?rhel} != 9
make
%else
make nodoc
%endif
%install
export DESTDIR=$RPM_BUILD_ROOT
export TARGET_INCLUDE=%{_includedir}
export TARGET_LIB=%{_libdir}
export TARGET_BIN=%{_bindir}
export TARGET_MAN=%{_mandir}
export TARGET_DOC=%{_datadir}/doc
export VERSION=%{version}
%if 0%{?rhel} != 9
make install
%else
make install-nodoc
%endif
%files
%{_libdir}/libSHELib.a
%{_libdir}/pkgconfig/SHELib.pc
%{_bindir}/SHETest
%{_bindir}/SHEMathTest
%{_bindir}/SHEStringTest
%{_bindir}/SHEPerf
%{_bindir}/SHEEval
%{_includedir}/SHELib
%if 0%{?rhel} != 9
%doc %{_mandir}/man3/*
%doc %{_datadir}/doc/SHELib
%endif
%check
# do a reasonable test: use float, but skip div, log and trig tests.
# use the smallest security level
./SHETest --no-trig --float --no-log --no-div 19 600
%changelog
{{{ git_dir_changelog }}}
* Fri Oct 29 2021 Bob Relyea <rrelyea@redhat.com> - 0.0.0-0
- initial import
#EOF