-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmagma.php~
283 lines (252 loc) · 7.36 KB
/
magma.php~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<?php
include "page_template.html"
?>
<div id="temp-content" style="display: none;">
<h3>Magma</h3>
<hr>
<br>
In this page you can find the Magma code of
either intrinsics (ready to be installed as a Magma package)
or functions (ready to be loaded within a Magma workspace).
<br><br>
<div class="magma-index">
<h4><u>Index</u></h4>
<br>
<b>Elliptic curves</b>
<ul>
<li><a href="#nist_elliptic_curves_m">NIST elliptic curves</a></li>
<li><a href="#invalid_curve_attack_m">Invalid curve attack</a></li>
</ul>
<br>
<b>Public key cryptography</b>
<ul>
<li><a href="#kpabeGPSW2006">Key-policy Attribute-Based encryption</a></li>
</ul>
<br>
<b>Nonlinear codes</b>
<ul>
<li><a href="#johnson_bound">The Johnson upper bound</a></li>
<li><a href="#nordtrom-robinson_code">The Nordstrom-Robinson code</a></li>
</ul>
<br>
<b>Polynomial systems</b>
<ul>
<li><a href="#traverso_algorithm">The Traverso algorithm</a></li>
</ul>
</div>
<br><br><hr><br>
<h4 id="nist_elliptic_curves_m">NIST elliptic curves</h4>
<br>
<table class="CodeInfo">
<tr>
<td><b>Type: </b></td>
<td>intrinsic</td>
</tr>
<tr>
<td><b>Description: </b></td>
<td>This package contains the definition of some NIST elliptic curves,
precisely:<br>
<i>P-192, P-224, P-256, P-384, P-521, K-163, B-163</i><br>
It can be useful for testing them.
</td>
</tr>
<tr>
<td><b>View code: </b></td>
<td><a href="nist_elliptic_curves.php">NIST_Elliptic_Curves.m</a></td>
</tr>
<tr>
<td><b>Download: </b></td>
<td><a href="file/NIST_Elliptic_Curves.m" target="_blank">NIST_Elliptic_Curves.m</a>
</td>
</tr>
</table>
<br><br><hr><br>
<h4 id="invalid_curve_attack_m">Invalid curve attack</h4>
<br>
<table class="CodeInfo">
<tr>
<td><b>Type: </b></td>
<td>function</td>
</tr>
<tr>
<td><b>Description: </b></td>
<td>This is a simple exercise which shows
how to solve the dicrete logarithm problem over any curve
with an <i>invalid curve attack</i>.<br>
In particular I show how to break NIST P-192 prime curve.
</td>
</tr>
<tr>
<td><b>View code: </b></td>
<td><a href="invalid_curve_attack.php">invalid_curve_attack.m</a></td>
</tr>
<tr>
<td><b>Download: </b></td>
<td><a href="file/invalid_curve_attack.m" target="_blank">invalid_curve_attack.m</a>
</td>
</tr>
</table>
<br><br><hr><br>
<h4 id="kpabeGPSW2006">Key-policy Attribute-Based encryption</h4>
<br>
<table class="CodeInfo">
<tr>
<td><b>Type: </b></td>
<td>function</td>
</tr>
<tr>
<td><b>Description: </b></td>
<td>A Magma implementation of the
Key-Policy Attribute-based Encryption scheme defined in the paper<br>
"<i>Attribute-based Encryption for
Fine-Grained Access Control of Encrypted Data</i>", <br>
2006 - Goyal, Pandey, Sahai, Waters
</td>
</tr>
<tr>
<td><b>View code: </b></td>
<td><a href="kpabe_gpsw_2006.php">kpabe-GPSW-2006</a></td>
</tr>
<tr>
<td><b>Download: </b></td>
<td><a href="file/kpabeGPSW2006.tar.gz" target="_blank">kpabeGPSW2006.tar.gz</a>
</td>
</tr>
</table>
<br><br><hr><br>
<h4 id="johnson_bound">The Johnson upper bound</h4>
<br>
<table class="CodeInfo">
<tr>
<td><b>Type: </b></td>
<td>intrinsic</td>
</tr>
<tr>
<td><b>Description: </b></td>
<td>This is an improvement of Magma internal implementation
of the Johnson upper bound.
Magma functions <code>JohnsonBound(n,d)</code>
works only over binary fields,
while my function <code>JohnsonBound_(K,n,d)</code>
is defined for all finite fields.
Furthermore, in the binary case, my function
<code>JohnsonBound_2(n,d)</code>
(which is based on the original 1962 Johnson's article)
performs better then <code>JohnsonBound(n,d)</code>.
The smallest values for which this is true are:
<table class="JohnsonBound">
<tr>
<td><code>n</code></td>
<td><code>d</code></td>
<td><code>JohnsonBound(n,d)</code></td>
<td><code>JohnsonBound(n,d)_2</code></td>
</tr>
<tr>
<td>5</td>
<td>3</td>
<td>5</td>
<td>4</td>
</tr>
<tr>
<td>6</td>
<td>4</td>
<td>5</td>
<td>4</td>
</tr>
<tr>
<td>7</td>
<td>5</td>
<td>3</td>
<td>2</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><b>View code: </b></td>
<td><a href="johnson_bound.php">JohnsonBound.m</a></td>
</tr>
<tr>
<td><b>Download: </b></td>
<td><a href="file/JohnsonBound.m" target="_blank">JohnsonBound.m</a>
</td>
</tr>
</table>
<br><br><hr><br>
<h4 id="nordtrom-robinson_code">The Nordstrom-Robinson code</h4>
<br>
<table class="CodeInfo">
<tr>
<td><b>Type: </b></td>
<td>intrinsic</td>
</tr>
<tr>
<td><b>Description: </b></td>
<td>The Nordstrom-Robinson code is a
binary nonlinear (16, 256)-code.
The existence of the Nordstrom-Robinson code shows that
A_2(16,6) = 256.
<br>
This file provides a Magma intrinsic to generate this code
following the steps described in:
<br>
<i>
Huffman-Pless, "Fundamentals of Error Correcting Codes", Chapter 2.3.4 - The Nordstrom-Robinson code
</i>
</td>
</tr>
<tr>
<td><b>View code: </b></td>
<td><a href="nordstrom_robinson_code.php">Nordstrom-RobinsonCode.m</a></td>
</tr>
<tr>
<td><b>Download: </b></td>
<td><a href="file/Nordstrom-RobinsonCode.m" target="_blank">Nordstrom-RobinsonCode.m</a>
</td>
</tr>
</table>
<br><br><hr><br>
<h4 id="traverso_algorithm">The Traverso algorithm</h4>
<br>
<table class="CodeInfo">
<tr>
<td><b>Type: </b></td>
<td>intrinsic</td>
</tr>
<tr>
<td><b>Description: </b></td>
<td>Traverso introduced his algorithm in 1992,
during the conference MEGA,
in a scenario related to Groebner bases computation
of a zero-dimensional ideal.
Given a linear representation (Q,M) of an ideal I and
r groebner descriptions GD = {c_1,...,c_r}
of r new polynomials not in I,
the Traverso algorithm
returns the linear representation of an ideal J
where J = I U GD = I U {c_1,...,c_r}.
<br>
The file contains an implementation of the algorithm as described in
<br>
<i>
"SPES II", Mora, Fig 29.3, Traverso's Algorithm
</i>.
</td>
</tr>
<tr>
<td><b>View code: </b></td>
<td><a href="traverso.php">Traverso.m</a></td>
</tr>
<tr>
<td><b>Download: </b></td>
<td><a href="file/Traverso.m" target="_blank">Traverso.m</a>
</td>
</tr>
</table>
</div>
<script>
var x = document.getElementById("temp-content") ;
document.getElementById("main").innerHTML = x.innerHTML ;
</script>
<!--
-->