I am trying to run the following example from S-Boxes and Their Algebraic Representations - Cryptography (sagemath.org) <https://doc.sagemath.org/html/en/reference/cryptography/sage/crypto/sbox.html>
from sage.crypto.sbox import SBox S = SBox(12,5,6,11,9,0,10,13,3,14,15,8,4,7,1,2) S.component_function(1).autocorrelation() When I run the code I get the error copied here: Traceback (most recent call last): File "/home/sajjad/experiments/testin.py", line 1, in <module> from sage.crypto.sbox import SBox File "/usr/lib/python3/dist-packages/sage/crypto/sbox.py", line 6, in <module> from sage.crypto.boolean_function import BooleanFunction File "sage/crypto/boolean_function.pyx", line 40, in init sage.crypto.boolean_function (build/cythonized/sage/crypto/boolean_function.c:28685) File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/__init__.py", line 32, in <module> from .PyPolyBoRi import * File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/PyPolyBoRi.py", line 68, in <module> from .pbori import (order_dict, TermOrder_from_pb_order, BooleanPolynomialRing, File "sage/rings/polynomial/pbori/pbori.pyx", line 1, in init sage.rings.polynomial.pbori.pbori (build/cythonized/sage/rings/polynomial/pbori/pbori.cpp:76772) File "sage/rings/polynomial/multi_polynomial_ring_base.pyx", line 26, in init sage.rings.polynomial.multi_polynomial_ring_base (build/cythonized/sage/rings/polynomial/multi_polynomial_ring_base.c:23089) File "/usr/lib/python3/dist-packages/sage/rings/polynomial/polynomial_ring.py", line 170, in <module> from .polynomial_element import PolynomialBaseringInjection File "sage/rings/polynomial/polynomial_element.pyx", line 67, in init sage.rings.polynomial.polynomial_element (build/cythonized/sage/rings/polynomial/polynomial_element.c:107154) ImportError: cannot import name polynomial_ring sa@DESKTOP-K88EPGF:~/experiments$ /bin/python3 /home/sajjad/experiments/testin.py Traceback (most recent call last): File "/home/sajjad/experiments/testin.py", line 1, in <module> from sage.crypto.sbox import SBox File "/usr/lib/python3/dist-packages/sage/crypto/sbox.py", line 6, in <module> from sage.crypto.boolean_function import BooleanFunction File "sage/crypto/boolean_function.pyx", line 40, in init sage.crypto.boolean_function (build/cythonized/sage/crypto/boolean_function.c:28685) File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/__init__.py", line 32, in <module> from .PyPolyBoRi import * File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/PyPolyBoRi.py", line 68, in <module> from .pbori import (order_dict, TermOrder_from_pb_order, BooleanPolynomialRing, File "sage/rings/polynomial/pbori/pbori.pyx", line 1, in init sage.rings.polynomial.pbori.pbori (build/cythonized/sage/rings/polynomial/pbori/pbori.cpp:76772) File "sage/rings/polynomial/multi_polynomial_ring_base.pyx", line 26, in init sage.rings.polynomial.multi_polynomial_ring_base (build/cythonized/sage/rings/polynomial/multi_polynomial_ring_base.c:23089) File "/usr/lib/python3/dist-packages/sage/rings/polynomial/polynomial_ring.py", line 170, in <module> from .polynomial_element import PolynomialBaseringInjection File "sage/rings/polynomial/polynomial_element.pyx", line 67, in init sage.rings.polynomial.polynomial_element (build/cythonized/sage/rings/polynomial/polynomial_element.c:107154) ImportError: cannot import name polynomial_ring On Wednesday, July 19, 2023 at 3:23:27 PM UTC+5 Dima Pasechnik wrote: > > > On Wed, Jul 19, 2023 at 10:52 AM SAJJAD AKBAR <sajja...@gmail.com> wrote: > >> I have installed SageMath 10.0 in Ubuntu 22.04 (used as a subsystem in >> Windows) from Sources in this link : >> Installing SageMath 10.0 in Ubuntu (obspm.fr) >> <https://sagemanifolds.obspm.fr/install_ubuntu.html#:~:text=Installing%20SageMath%2010.0%20in%20Ubuntu%2020.04%20or%2022.04&text=However%20building%20SageMath%2010.0%20from,or%2022.04%20is%20very%20easy.&text=A%20Jupyter%20page%20should%20then,notebook%20with%20a%20SageMath%20kernel.> >> It builds in an hour or so and works okay with most of the things. >> >> But when I try to use it for instance to find Groebner basis and >> polynomial-related stuff, I got an issue with calling some functions, like >> (boolean_functions). >> > > it's very hard to understand what's broken for you, unless you provide > Sage commands you are trying to run > (not as screenshots, please paste them here) > > > >> I checked the files with this issue are the files written in C or C++. I >> try to compile the function using Cythonize etc but no hope. (as there are >> also problems with the Cython code, long list of squiggles that needs to be >> fixed) >> [image: Capture.PNG] >> > What's the meaning of this list of imports? > What is it supposed to show? > > > >> I am not a programmer nor a developer but only a user( as a student of >> mathematics). >> >> I highly appreciate your time and support. >> >> Thanks >> S. Akbar >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-devel+...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sage-devel/1857f778-0c15-42d5-b45e-c6981d322604n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/sage-devel/1857f778-0c15-42d5-b45e-c6981d322604n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0087041b-0b45-419e-b97e-2fecf42cdad1n%40googlegroups.com.