Posts

Showing posts from September, 2021

Unable to revert mtime: /Library/Fonts [Solved]

Image
I was working on a python3 script on my macOS, and I came across this error: % python3 my-random-script.py Unable to revert mtime: /Library/Fonts I got it solved by installing libmagic: % brew install libmagic This message on macOS comes from the python-magic library when its underlying libmagic dependency is missing. The script still runs but cannot read file type information and prints this warning. Installing libmagic with Homebrew, as shown, supplies the missing piece and clears the message. python-magic relies on the same system libmagic that the file command uses.

NTRU in python3

Image
NTRU: NTRU – Nth Degree Truncated Polynomial Ring Units (or R = Z[X] / ( X^N-1 )) NTRU is the first public-key cryptosystem not based on factorization or discrete logarithmic problems. NTRU is a lattice-based alternative to RSA and ECC and is based on the shortest vector problem in a lattice. NTRU is an open-source public-key cryptosystem that uses lattice-based cryptography to encrypt and decrypt data. It consists of two algorithms: NTRUEncrypt, which is used for encryption, and NTRUSign, which is used for digital signatures. Unlike other popular public-key cryptosystems, it is resistant to attacks using Shor's algorithm. NTRUEncrypt was patented, but it was placed in the public domain in 2017. NTRUSign is patented, but it can be used by software under the GPL. Example in Python3: % python3 --version Python 3.9.1 % pip3 install --user sympy % pip3 install --user numpy % pip3 install --user docopt