[Debian-science-sagemath] Fwd: missing default.json in fplll

Dima Pasechnik dimpase at gmail.com
Sat Feb 5 05:34:06 GMT 2022


On Fri, Feb 4, 2022 at 10:52 PM Dima Pasechnik <dimpase at gmail.com> wrote:
>
> On Fri, Feb 4, 2022 at 10:17 PM Julien Puydt <julien.puydt at gmail.com> wrote:
> >
> > Hi,
> >
> > Le vendredi 04 février 2022 à 19:36 +0000, Dima Pasechnik a écrit :
> > >
> > > It appears that default.json is not installed anywhere, and this
> > > looks like a bug.
> >
> > The libfplll7 package depends on the libfplll7-data package which ships
> > default.json, so I think the problem is elsewhere.
> >
> > Can you tell more about the issue you're seeing?
>
> I think it might be fpylll looking for default.json in the wrong directory

I don't know how fpylll looks for default.json (it doesn't seem to be
documented) - but I won't be surprised if it's a heuristic
broken by the unusual path name, /usr/share/libfplll7/... used in Debian.

Dima


>
> I build fpylll (as Sage 9.5 package) from source, using system-wide
> libfpylll (from libfpylll-dev)
>
> Then
>
> sage: from fpylll import BKZ  #this shows that it does nor know the
> right place for this json
> sage: BKZ.DEFAULT_STRATEGY
> b'default.json'
>
> # this shows that it does nor know the right place for this json - it
> should be full path to /usr/share/....
>
> sage: sage: from sage.modules.free_module_integer import IntegerLattice
> ....:         sage: L =
> IntegerLattice(sage.crypto.gen_lattice(type='modular', m=10, see
> ....: d=1337, dual=True)); L
> Free module of degree 10 and rank 10 over Integer Ring
> User basis matrix:
> [-1  1  2 -2  0  1  0 -1  2  1]
> [ 1  0  0 -1 -2  1 -2  3 -1  0]
> [ 1  2  0  2 -1  1 -2  2  2  0]
> [ 1  0 -1  0  2  3  0  0 -1 -2]
> [ 1 -3  0  0  2  1 -2 -1  0  0]
> [-3  0 -1  0 -1  2 -2  0  0  2]
> [ 0  0  0  1  0  2 -3 -3 -2 -1]
> [ 0 -1 -4 -1 -1  1  2 -1  0  1]
> [ 1  1 -2  1  1  2  1  1 -2  3]
> [ 2 -1  1  2 -3  2  2  1  0  1]
> sage: L.shortest_vector()
> terminate called after throwing an instance of 'std::runtime_error'
>   what():  Cannot open strategies file.
> ---------------------------------------------------------------------------
> KeyError                                  Traceback (most recent call last)
> ~/work/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/misc/cachefunc.pyx
> in sage.misc.cachefunc.CachedMethodCaller.__call__
> (build/cythonized/sage/misc/cachefunc.c:10347)()
>    1942             try:
> -> 1943                 return cache[k]
>    1944             except TypeError:  # k is not hashable
>
> KeyError: ((True, 'fplll'), ())
>
>
> >
> > J.Puydt
> >
> > _______________________________________________
> > Debian-science-sagemath mailing list
> > Debian-science-sagemath at alioth-lists.debian.net
> > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-sagemath



More information about the Debian-science-sagemath mailing list