ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 29 Apr 2019 06:56:28 -0500What can i do about this large boolean function?https://ask.sagemath.org/question/46400/what-can-i-do-about-this-large-boolean-function/If i have a large boolean function like this:
FUN() = (
(( ~g&(f^i^0))|(g&(1^f^h^0)))^(( ~x&(w^z^0))|(x&(1^w^y^0)))
^((d&(1^a^b^e))|( ~d&(1^a^c^e)))^((m&(1^j^k^n))|( ~m&(1^j^l^n)))
^o^p^q^0^r^s^t^u^v
)
can anyone explain how can i code to obtain the non-linearity of this boolean formula?
I didn't really understand the `BooleanFunction()` function in Sage.athulanMon, 29 Apr 2019 06:56:28 -0500https://ask.sagemath.org/question/46400/HUGE delay in sage.crypto.sbox.SBox method nonlinearity() introduced in v.8.2https://ask.sagemath.org/question/42492/huge-delay-in-sagecryptosboxsbox-method-nonlinearity-introduced-in-v82/Average time in nonlinearity() in v.8.1. was ****200 ms****
Average time in nonlinearity() in v.8.2 is ****5.1 s****
Here is the code I have used in order to track the issue:
sage: for j in range(10):
....: S = [x for x in range(256)];shuffle(S)
....: S = sage.crypto.sbox.SBox(S)
....: %time S.nonlinearity()
Results from Sage 8.1
CPU times: user 237 ms, sys: 1.87 ms, total: 239 ms
Wall time: 236 ms
94
CPU times: user 208 ms, sys: 12.5 ms, total: 220 ms
Wall time: 220 ms
94
CPU times: user 287 ms, sys: 1.41 ms, total: 288 ms
Wall time: 288 ms
92
....
Results from Sage 8.2
CPU times: user 5.12 s, sys: 30.6 ms, total: 5.15 s
Wall time: 5.16 s
92
CPU times: user 5.04 s, sys: 14.3 ms, total: 5.05 s
Wall time: 5.05 s
96
CPU times: user 5.08 s, sys: 13 ms, total: 5.09 s
Wall time: 5.09 s
94
CPU times: user 5.03 s, sys: 8.56 ms, total: 5.04 s
Wall time: 5.04 s
92
.....sageuser1Mon, 04 Jun 2018 05:23:32 -0500https://ask.sagemath.org/question/42492/How to evaluate 16 by 16 s-boxes?https://ask.sagemath.org/question/8923/how-to-evaluate-16-by-16-s-boxes/Hi, I've a query, can we create a 16 by 16 s-box of 8 boolean variables in sage? I'm getting error while calculating difference matrix etc... secondly i'm getting nonlinearity equal to 1 when i give original AES S-box as input to boolean function. Is sage not compatible with large boolean functions/s-boxes?uzmamaroofTue, 24 Apr 2012 19:03:56 -0500https://ask.sagemath.org/question/8923/