Skip to content

Commit 4aa5cab

Browse files
author
Jens Alich
committed
update README.md to update usage and fix wrong version in python package
1 parent fb7b05c commit 4aa5cab

File tree

3 files changed

+28
-30
lines changed

3 files changed

+28
-30
lines changed

README.md

+26-28
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,38 @@ or, on macOS:
2424
brew install libomp
2525

2626

27-
## Usage
27+
## Install
2828

29-
To retrieve this module, use the following command:
29+
### Direct Installation via SAGE
3030

31-
git clone https://github.com/lpp-crypto/sboxU/
31+
To use this module, use the following command:
3232

33-
Then, you need to compile the content of the `sboxU/sboxU_cython` folder.
34-
This process only relies on SAGE To compile it:
33+
sage --pip install git+https://github.com/lpp-crypto/sboxU
3534

36-
cd sboxU/sboxU_cython
37-
sage setup.py build_ext --inplace
35+
This compiles the C++ part of `sboxU` and installs the full `sboxU` module
36+
in your SAGE's python environment. You can then import `sboxU` like
37+
any other python module.
3838

39-
This compiles the C++ part of `sboxU` and allows it to be called from
40-
a SAGE script. To use it in your project, simply move the `sboxU`
41-
folder to your project's directory. You can then import `sboxU` like
42-
any other python module. As an example of the functions provided by
43-
`sboxU`, the SAGE script `example.py` stored alongside the folder
44-
`sboxU` generates random permutations and tests their affine
39+
### Installation via `nix`
40+
41+
To create a development shell that contains SAGE with `sboxU` installed, use the following command:
42+
43+
nix develop github:lpp-crypto/sboxU#devShell.x86_64-linux
44+
45+
## Example Usage
46+
47+
As an example of the functions provided by `sboxU`, you can download and run the SAGE script [`example.py`](https://raw.githubusercontent.com/lpp-crypto/sboxU/refs/heads/master/example.py).
48+
There `sboxU` generates random permutations and tests their affine
4549
equivalence.
46-
47-
Then, in order to use the functions provided by sboxU, simply
48-
paste/make a link to the folder sboxU from the directory in which you
49-
are working. For example, if you have a script called `test.py` in
50-
which you want to call the functions in sboxU then your directory
51-
should look like this:
52-
53-
$ ls
54-
test.py
55-
README.md
56-
sboxu/
57-
58-
and the file `test.py` should contain `from sboxU import *`. You can
59-
also import sboxU in a sage notebook session provided that you started
60-
sage from the folder containing it.
50+
51+
On a unix based system (e.g. Linux or macOS), use the following commands:
52+
53+
wget https://raw.githubusercontent.com/lpp-crypto/sboxU/refs/heads/master/example.py
54+
sage example.py
55+
56+
57+
To write your own script using `sboxU`, this file should contain `from sboxU import *`.
58+
You can also import sboxU in a sage notebook session.
6159

6260

6361
## Troubleshooting

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
system = "x86_64-linux";
1010
pkgs = import nixpkgs { inherit system; };
1111
packageName = "sboxU";
12-
packageVersion = "1.0.0";
12+
packageVersion = "1.3.0";
1313
in {
1414

1515
packages."${system}" = {

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
setup(
7070
name = "sboxU",
71-
version = "1.0.0",
71+
version = "1.3.0",
7272
description = "SAGE/Python functions useful for studying S-boxes and Boolean functions such as computing the DDT, computing the Walsh spectrum, affine equivalence testing...",
7373
packages = ['sboxU', 'sboxU.known_functions', 'sboxU.sboxU_cython'],
7474
ext_modules=cythonize(

0 commit comments

Comments
 (0)