Ask Your Question

sageuser1's profile - activity

2023-09-21 21:57:45 +0200 received badge  Notable Question (source)
2023-09-21 21:57:45 +0200 received badge  Popular Question (source)
2020-10-09 14:34:54 +0200 received badge  Notable Question (source)
2020-10-09 14:33:48 +0200 received badge  Notable Question (source)
2019-04-30 16:38:09 +0200 received badge  Popular Question (source)
2018-10-08 17:43:10 +0200 received badge  Good Question (source)
2018-08-15 13:45:15 +0200 received badge  Popular Question (source)
2018-06-26 07:32:49 +0200 commented answer HUGE delay in sage.crypto.sbox.SBox method nonlinearity() introduced in v.8.2

@asante Thank you for your update!

2018-06-08 11:08:32 +0200 received badge  Good Question (source)
2018-06-07 21:40:12 +0200 received badge  Nice Question (source)
2018-06-06 15:51:14 +0200 received badge  Nice Question (source)
2018-06-06 14:16:11 +0200 commented answer HUGE delay in sage.crypto.sbox.SBox method nonlinearity() introduced in v.8.2

Please update us with the final resolution. Beside that, don't you think that the time needed (200 ms) for finding nonlinearity() of one vectorial boolean function (8 x 8) in SageMath 8.1 is too much, too?

2018-06-05 07:40:20 +0200 commented question HUGE delay in sage.crypto.sbox.SBox method nonlinearity() introduced in v.8.2

I have updated the post with the code I have used to profile the slowdown.

2018-06-04 12:23:32 +0200 asked a question HUGE delay in sage.crypto.sbox.SBox method nonlinearity() introduced in v.8.2

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
.....
2016-11-18 17:17:21 +0200 received badge  Nice Question (source)
2016-11-18 07:39:23 +0200 commented answer Memory leak when doing ANF of boolean functions?

Thank you for the update!

2016-11-18 07:37:25 +0200 received badge  Scholar (source)
2016-11-18 07:37:20 +0200 received badge  Supporter (source)
2016-11-17 14:44:49 +0200 received badge  Editor (source)
2016-11-17 14:44:25 +0200 commented question Memory leak when doing ANF of boolean functions?

I confirm the same behavior under Sage version 7.4

2016-11-17 09:50:56 +0200 asked a question Memory leak when doing ANF of boolean functions?

I am using SageMath version 7.2 (EDIT: I confirm the same behavior under Sage version 7.4)

sage: B = random_boolean_function(3)
sage: get_memory_usage()
732.5078125
sage: B.algebraic_normal_form()
x0*x1*x2 + x0*x1 + x0 + x2
sage: get_memory_usage()
743.53125
sage: B.algebraic_normal_form()
x0*x1*x2 + x0*x1 + x0 + x2
sage: get_memory_usage()
749.04296875
sage: B.algebraic_normal_form()
x0*x1*x2 + x0*x1 + x0 + x2
sage: get_memory_usage()
754.6875
sage: B.algebraic_normal_form()
x0*x1*x2 + x0*x1 + x0 + x2
sage: get_memory_usage()
760.19921875

After each ANF call the memory used is rising. Is this a memory leak?

2016-10-26 19:05:15 +0200 received badge  Student (source)
2016-10-26 16:16:13 +0200 asked a question About Boolean Function

I want to find the Algebraic Normal Form of a boolean function.

For example:

sage: R.<x1,x2,x3> = BooleanPolynomialRing(3, order='degneglex')
sage: x3>x1
True

sage: L = BooleanFunction(x1+x2*x3)

sage: L.truth_table()
(False, True, False, True, False, True, True, False)

sage: L.algebraic_normal_form()
x0 + x1*x2

Unfortunately, Algebraic Normal Form of this specific boolean function is not correct (x0 should be x3, x1 should be x2 and x2 should be x1). The answer of the ANF() method is in order='lex' (not as I desired in order = 'degneglex'). Furthermore, the ANF() form is calculated out of this ring (x0 involved?)

How should I extract the ANF() in correct syntax (where x3>x2>x1)?