Posts

[How To] Run MinimaxComp_degrees in macOS

Image
MinimaxComp_degrees This algorithm finds optimized degrees for comparison/max/ReLU algorithms using minimax composite polynomial on the RNS-CKKS scheme, which was proposed in https://ieeexplore.ieee.org/document/9517029 and https://eprint.iacr.org/2021/1215 . How to run on macOS using the Apple Clang compiler: 1. % brew install NTL 2. % export LIBRARY_PATH=/usr/local/lib 3. % git clone  https://github.com/eslee3209/MinimaxComp_degrees 4. % cd MinimaxComp_degrees 5. % cmake -S . -B build 6. % cd build 7. % make 8. % ./degrees Output: ------------------------------------ alpha: 20 epsilon: 0.2002716064453125e-4 mintime: 162 depth: 22 0.39825903512705770933e-4 7 13 15 15 59   This guide runs MinimaxComp_degrees on macOS, an algorithm that finds optimized polynomial degrees for comparison, max, and ReLU operations under the RNS-CKKS homomorphic encryption scheme, based on the referenced research. CKKS can only evaluate polynomials on encrypted data, so non-polyn...

[How To] Install CRC RevEng on macOS

Image
CRC RevEng CRC RevEng is a portable, arbitrary-precision CRC calculator and algorithm finder. It calculates CRCs using any 111 preset algorithms or a user-specified algorithm to any width. It calculates reversed CRCs to give the bit pattern that produces a desired forward CRC. CRC RevEng also reverse-engineers any CRC algorithm from good, correctly formatted message-CRC pairs and optional known parameters. It comprises powerful input interpretation options. Installation instructions for macOS: 1. Download reveng from SourceForge:  https://sourceforge.net/projects/reveng/files/ 2. Unzip the downloaded reveng zip file 3. % cd Downloads/reveng-3.0.3 4. % make gcc -O3 -Wall -ansi -fomit-frame-pointer -DPRESETS -DBMPTST -o bmptst bmpbit.c ( ./bmptst && touch bmptst ) || ( rm bmptst bmptst.exe && false ) reveng: configuration fault.   Update config.h with these definitions and recompile: #define BMP_BIT   64 #define BMP_SUB   32 rm: bmptst.exe: No suc...

Top 13 Free Email Newsletters

Image
The following is the list of the 13 free most popular newsletters: 1440 Below the Fold Benedict’s Newsletter Brain Pickings Morning Brew NextDraft NPR’s Life Kit NYTimes Morning Briefing The Elevator The GIST The Hustle The Lefsetz Letter The Moz Top Ten This is a curated list of free newsletters spanning general news, technology, and culture, for anyone who wants a quick daily or weekly digest in their inbox. A good newsletter saves time by summarizing what matters so you do not have to chase a dozen sites. Every option listed is free to subscribe to.

[Solved] frame.append method is deprecated and will be removed from pandas

Image
Code: all_results = all_results.append(current_result) Error: /var/folders/wh/tdg0ff9s1wl59234d5l27_gc0000gn/T/ipykernel_98654/2691205834.py:15: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. all_results = all_results.append(current_result) Fix: all_results = pd.concat([all_results, current_result]) This warning appears because DataFrame.append was deprecated and later removed from pandas, so code that built a frame by appending one row or frame at a time needs updating. The replacement is pandas.concat, which combines a list of frames in one call. Collecting the pieces in a list and concatenating once at the end is also faster than repeated appends.

[Solved] seaborn: decrease the size of the markers

Image
Code: ax = sns.swarmplot(y="time_taken", x="dtype", data=all_results, color=".25") Error: /usr/local/Cellar/jupyterlab/3.3.2/libexec/lib/python3.9/site-packages/seaborn/categorical.py:1296: UserWarning: 35.9% of the points cannot be placed; you may want to decrease the size of the markers or use stripplot. warnings.warn(msg, UserWarning) Fix: ax = sns.swarmplot(y="time_taken", x="dtype", data=all_results, color=".25", size=3.25 ) This seaborn warning appears when a swarm plot cannot place every point without overlap, so some are dropped. It is a sign the markers are too large for the amount of data. Reducing the marker size with the size parameter, or switching to a strip plot, lets all points show. Both are quick changes to the plotting call.