git: 76c97e7c968a - main - security/openfhe: update 1.1.2 → 1.1.3

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 07 Mar 2024 09:48:25 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=76c97e7c968a50308665ddbcae3862c3b3d7eea5

commit 76c97e7c968a50308665ddbcae3862c3b3d7eea5
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-03-07 08:03:29 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-03-07 09:48:09 +0000

    security/openfhe: update 1.1.2 → 1.1.3
    
    Reported by:    portscout
---
 security/openfhe/Makefile                          |  2 +-
 security/openfhe/distinfo                          |  6 +--
 ...tch-src_core_include_math_hal_intnat_ubintnat.h | 47 +++++++++++-----------
 security/openfhe/pkg-plist                         |  8 ++--
 4 files changed, 33 insertions(+), 30 deletions(-)

diff --git a/security/openfhe/Makefile b/security/openfhe/Makefile
index 4182b169afca..def969ab69a5 100644
--- a/security/openfhe/Makefile
+++ b/security/openfhe/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	openfhe
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.1.2
+DISTVERSION=	1.1.3
 CATEGORIES=	security math
 
 MAINTAINER=	yuri@FreeBSD.org
diff --git a/security/openfhe/distinfo b/security/openfhe/distinfo
index 54f74b804da4..efff6613e500 100644
--- a/security/openfhe/distinfo
+++ b/security/openfhe/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1702792636
-SHA256 (openfheorg-openfhe-development-v1.1.2_GH0.tar.gz) = f728f040e33a3a4ecc8d08de66433882d157eb63870122e58240b825d57af707
-SIZE (openfheorg-openfhe-development-v1.1.2_GH0.tar.gz) = 1987229
+TIMESTAMP = 1709795933
+SHA256 (openfheorg-openfhe-development-v1.1.3_GH0.tar.gz) = 33fd5cd5936c0f967187969572614af186b99a41db1a0474dbbedd9d1234a2d2
+SIZE (openfheorg-openfhe-development-v1.1.3_GH0.tar.gz) = 1994424
 SHA256 (openfheorg-cereal-984e3f1_GH0.tar.gz) = d79d6b97a53c1adb67a001d3b85a3f7396131bfefb09a64b6ea78fa5a17c5fc5
 SIZE (openfheorg-cereal-984e3f1_GH0.tar.gz) = 386502
 SHA256 (google-googletest-8b4817e_GH0.tar.gz) = 2707e4eecfb7ab19678c435e469c500e253c85236fc6a78e9fb5cb166f4d88d2
diff --git a/security/openfhe/files/patch-src_core_include_math_hal_intnat_ubintnat.h b/security/openfhe/files/patch-src_core_include_math_hal_intnat_ubintnat.h
index cd99c0741a09..a07d0d338da7 100644
--- a/security/openfhe/files/patch-src_core_include_math_hal_intnat_ubintnat.h
+++ b/security/openfhe/files/patch-src_core_include_math_hal_intnat_ubintnat.h
@@ -1,25 +1,26 @@
---- src/core/include/math/hal/intnat/ubintnat.h.orig	2023-12-16 19:03:47 UTC
+--- src/core/include/math/hal/intnat/ubintnat.h.orig	2024-03-05 00:18:51 UTC
 +++ src/core/include/math/hal/intnat/ubintnat.h
-@@ -1935,16 +1935,16 @@ class NativeIntegerT final : public lbcrypto::BigInteg
-         res.lo = x.lo * y;
-         asm("umulh %0, %1, %2\n\t" : "=r"(res.hi) : "r"(x.lo), "r"(y));
-         res.hi += x.hi * y;
--#elif defined(__arm__)  // 32 bit processor
-+#elif defined(__powerpc64__) || defined(__riscv)
-+        U128BITS wres(0), wa(a), wb(b);
-+        wres   = wa * wb;  // should give us 128 bits  of 64 * 64
-+        res.hi = (uint64_t)(wres >> 64);
-+        res.lo = (uint64_t)wres;
-+#elif defined(__arm__) || defined(__powerpc__) // 32 bit processor
-         uint64_t wres(0), wa(a), wb(b);
-         wres   = wa * wb;
-         res.hi = wres >> 32;
-         res.lo = (uint32_t)wres & 0xFFFFFFFF;
--#elif __riscv
--        U128BITS wres(0), wa(a), wb(b);
--        wres   = wa * wb;
--        res.hi = (uint64_t)(wres >> 64);
--        res.lo = (uint64_t)wres;
+@@ -1919,6 +1919,11 @@ class NativeIntegerT final : public lbcrypto::BigInteg
+             uint128_t c{static_cast<uint128_t>(a) * b};
+             res.hi = static_cast<uint64_t>(c >> 64);
+             res.lo = static_cast<uint64_t>(c);
++#elif __riscv
++            U128BITS wres(0), wa(a), wb(b);
++            wres   = wa * wb;
++            res.hi = (uint64_t)(wres >> 64);
++            res.lo = (uint64_t)wres;
  #elif defined(__EMSCRIPTEN__)  // web assembly
-         U64BITS a1 = a >> 32;
-         U64BITS a2 = (uint32_t)a;
+             uint64_t a1 = a >> 32;
+             uint64_t a2 = (uint32_t)a;
+@@ -1957,6 +1962,11 @@ class NativeIntegerT final : public lbcrypto::BigInteg
+             res.lo = x.lo * y;
+             asm("umulh %0, %1, %2\n\t" : "=r"(res.hi) : "r"(x.lo), "r"(y));
+             res.hi += x.hi * y;
++#elif defined(__powerpc64__) || defined(__riscv)
++            U128BITS wres(0), wa(a), wb(b);
++            wres   = wa * wb;  // should give us 128 bits  of 64 * 64
++            res.hi = (uint64_t)(wres >> 64);
++            res.lo = (uint64_t)wres;
+ #elif defined(__arm__) || defined(__powerpc__)  // 32 bit processor
+             uint64_t wres(0), wa(a), wb(b);
+             wres   = wa * wb;
diff --git a/security/openfhe/pkg-plist b/security/openfhe/pkg-plist
index 05b65ed440bd..49e38d2e326e 100644
--- a/security/openfhe/pkg-plist
+++ b/security/openfhe/pkg-plist
@@ -309,9 +309,11 @@ include/openfhe/pke/scheme/ckksrns/ckksrns-utils.h
 include/openfhe/pke/scheme/ckksrns/gen-cryptocontext-ckksrns-internal.h
 include/openfhe/pke/scheme/ckksrns/gen-cryptocontext-ckksrns-params.h
 include/openfhe/pke/scheme/ckksrns/gen-cryptocontext-ckksrns.h
+include/openfhe/pke/scheme/ckksrns/schemeswitching-data-serializer.h
 include/openfhe/pke/scheme/gen-cryptocontext-params-defaults.h
 include/openfhe/pke/scheme/gen-cryptocontext-params.h
 include/openfhe/pke/scheme/scheme-id.h
+include/openfhe/pke/scheme/scheme-swch-params.h
 include/openfhe/pke/scheme/scheme-utils.h
 include/openfhe/pke/schemebase/base-advancedshe.h
 include/openfhe/pke/schemebase/base-cryptoparameters.h
@@ -349,10 +351,10 @@ lib/OpenFHE/OpenFHETargets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/OpenFHE/OpenFHETargets.cmake
 lib/libOPENFHEbinfhe.so
 lib/libOPENFHEbinfhe.so.1
-lib/libOPENFHEbinfhe.so.1.1.2
+lib/libOPENFHEbinfhe.so.1.1.3
 lib/libOPENFHEcore.so
 lib/libOPENFHEcore.so.1
-lib/libOPENFHEcore.so.1.1.2
+lib/libOPENFHEcore.so.1.1.3
 lib/libOPENFHEpke.so
 lib/libOPENFHEpke.so.1
-lib/libOPENFHEpke.so.1.1.2
+lib/libOPENFHEpke.so.1.1.3