This file is indexed.

/usr/include/NTL/GF2E.h is in libntl-dev 5.5.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
#ifndef NTL_GF2E__H
#define NTL_GF2E__H

#include <NTL/GF2X.h>

NTL_OPEN_NNS



class GF2EInfoT {
private:
   GF2EInfoT();                       // disabled
   GF2EInfoT(const GF2EInfoT&);   // disabled
   void operator=(const GF2EInfoT&);  // disabled
public:
   long ref_count;

   GF2EInfoT(const GF2X& NewP);
   ~GF2EInfoT() { }

   GF2XModulus p;

   long KarCross;
   long ModCross;
   long DivCross;

   ZZ   _card;
   long _card_init;
   long _card_exp;
};

extern GF2EInfoT *GF2EInfo; // info for current modulus, initially null




class GF2EContext {
private:
GF2EInfoT *ptr;

public:
void save();
void restore() const;

GF2EContext() { ptr = 0; }
GF2EContext(const GF2X& p);

GF2EContext(const GF2EContext&); 


GF2EContext& operator=(const GF2EContext&); 


~GF2EContext();


};


class GF2EBak {
private:
long MustRestore;
GF2EInfoT *ptr;

GF2EBak(const GF2EBak&); // disabled
void operator=(const GF2EBak&); // disabled

public:
void save();
void restore();

GF2EBak() { MustRestore = 0; ptr = 0; }

~GF2EBak();


};



struct GF2E_NoAlloc_type { GF2E_NoAlloc_type() { } };
const GF2E_NoAlloc_type GF2E_NoAlloc = GF2E_NoAlloc_type();



class GF2E {

public:

GF2X _GF2E__rep;


// ****** constructors and assignment

GF2E() { _GF2E__rep.xrep.SetMaxLength(GF2E::WordLength()); }

GF2E(GF2E& x, INIT_TRANS_TYPE) : _GF2E__rep(x._GF2E__rep, INIT_TRANS) { }

GF2E(const GF2E& a)  
   { _GF2E__rep.xrep.SetMaxLength(GF2E::WordLength()); _GF2E__rep = a._GF2E__rep; }

GF2E(GF2E_NoAlloc_type) { }  // allocates no space

~GF2E() { } 

GF2E& operator=(const GF2E& a) { _GF2E__rep = a._GF2E__rep; return *this; }

inline GF2E& operator=(long a);
inline GF2E& operator=(GF2 a);

// You can always access the _GF2E__representation directly...if you dare.
GF2X& LoopHole() { return _GF2E__rep; }

static long WordLength() { return GF2EInfo->p.WordLength(); }

static long storage() { return WV_storage(GF2E::WordLength()); }

static const GF2XModulus& modulus() { return GF2EInfo->p; }

static long KarCross() { return GF2EInfo->KarCross; }
static long ModCross() { return GF2EInfo->ModCross; }
static long DivCross() { return GF2EInfo->DivCross; }

static long degree() { return GF2EInfo->p.n; }

static const GF2E& zero();

static const ZZ& cardinality();

static void init(const GF2X& NewP);

};



// read-only access to GF2E representation
inline const GF2X& rep(const GF2E& a) { return a._GF2E__rep; }

inline void clear(GF2E& x)
// x = 0
   { clear(x._GF2E__rep); }

inline void set(GF2E& x)
// x = 1
   { set(x._GF2E__rep); }

inline void swap(GF2E& x, GF2E& y)
// swap x and y

   { swap(x._GF2E__rep, y._GF2E__rep); }

// ****** addition

inline void add(GF2E& x, const GF2E& a, const GF2E& b)
   { add(x._GF2E__rep, a._GF2E__rep, b._GF2E__rep); }

inline void add(GF2E& x, const GF2E& a, GF2 b)
   { add(x._GF2E__rep, a._GF2E__rep, b); }

inline void add(GF2E& x, const GF2E& a, long b)
   { add(x._GF2E__rep, a._GF2E__rep, b); }

inline void add(GF2E& x, GF2 a, const GF2E& b)  { add(x, b, a); }
inline void add(GF2E& x, long a, const GF2E& b)  { add(x, b, a); }

inline void sub(GF2E& x, const GF2E& a, const GF2E& b) { add(x, a, b); }
inline void sub(GF2E& x, const GF2E& a, GF2 b) { add(x, a, b); }
inline void sub(GF2E& x, const GF2E& a, long b) { add(x, a, b); }
inline void sub(GF2E& x, GF2 a, const GF2E& b) { add(x, a, b); }
inline void sub(GF2E& x, long a, const GF2E& b) { add(x, a, b); }

inline void negate(GF2E& x, const GF2E& a) { x = a; }


inline GF2E operator+(const GF2E& a, const GF2E& b) 
   { GF2E x; add(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator+(const GF2E& a, GF2 b) 
   { GF2E x; add(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator+(const GF2E& a, long b) 
   { GF2E x; add(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator+(GF2 a, const GF2E& b) 
   { GF2E x; add(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator+(long a, const GF2E& b) 
   { GF2E x; add(x, a, b); NTL_OPT_RETURN(GF2E, x); }


inline GF2E operator-(const GF2E& a, const GF2E& b) 
   { GF2E x; sub(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator-(const GF2E& a, GF2 b) 
   { GF2E x; sub(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator-(const GF2E& a, long b) 
   { GF2E x; sub(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator-(GF2 a, const GF2E& b) 
   { GF2E x; sub(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator-(long a, const GF2E& b) 
   { GF2E x; sub(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator-(const GF2E& a)
   { GF2E x; negate(x, a); NTL_OPT_RETURN(GF2E, x); } 


inline GF2E& operator+=(GF2E& x, const GF2E& b)
   { add(x, x, b); return x; }

inline GF2E& operator+=(GF2E& x, GF2 b)
   { add(x, x, b); return x; }

inline GF2E& operator+=(GF2E& x, long b)
   { add(x, x, b); return x; }


inline GF2E& operator-=(GF2E& x, const GF2E& b)
   { sub(x, x, b); return x; }

inline GF2E& operator-=(GF2E& x, GF2 b)
   { sub(x, x, b); return x; }

inline GF2E& operator-=(GF2E& x, long b)
   { sub(x, x, b); return x; }


inline GF2E& operator++(GF2E& x) { add(x, x, 1); return x; }

inline void operator++(GF2E& x, int) { add(x, x, 1); }

inline GF2E& operator--(GF2E& x) { sub(x, x, 1); return x; }

inline void operator--(GF2E& x, int) { sub(x, x, 1); }



// ****** multiplication

inline void mul(GF2E& x, const GF2E& a, const GF2E& b)
// x = a*b

   { MulMod(x._GF2E__rep, a._GF2E__rep, b._GF2E__rep, GF2E::modulus()); }


inline void sqr(GF2E& x, const GF2E& a)
// x = a^2

   { SqrMod(x._GF2E__rep, a._GF2E__rep, GF2E::modulus()); }

inline GF2E sqr(const GF2E& a)
   { GF2E x; sqr(x, a); NTL_OPT_RETURN(GF2E, x); }

inline void mul(GF2E& x, const GF2E& a, GF2 b)
   { mul(x._GF2E__rep, a._GF2E__rep, b); }

inline void mul(GF2E& x, const GF2E& a, long b)
   { mul(x._GF2E__rep, a._GF2E__rep, b); }

inline void mul(GF2E& x, GF2 a, const GF2E& b) { mul(x, b, a); }
inline void mul(GF2E& x, long a, const GF2E& b) { mul(x, b, a); }



inline GF2E operator*(const GF2E& a, const GF2E& b) 
   { GF2E x; mul(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator*(const GF2E& a, GF2 b) 
   { GF2E x; mul(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator*(const GF2E& a, long b) 
   { GF2E x; mul(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator*(GF2 a, const GF2E& b) 
   { GF2E x; mul(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator*(long a, const GF2E& b) 
   { GF2E x; mul(x, a, b); NTL_OPT_RETURN(GF2E, x); }


inline GF2E& operator*=(GF2E& x, const GF2E& b)
   { mul(x, x, b); return x; }

inline GF2E& operator*=(GF2E& x, GF2 b)
   { mul(x, x, b); return x; }

inline GF2E& operator*=(GF2E& x, long b)
   { mul(x, x, b); return x; }



// ****** division



void div(GF2E& x, const GF2E& a, const GF2E& b);

void inv(GF2E& x, const GF2E& a);

inline GF2E inv(const GF2E& a)
   { GF2E x; inv(x, a); NTL_OPT_RETURN(GF2E, x); }

inline void div(GF2E& x, const GF2E& a, GF2 b)
   { div(x._GF2E__rep, a._GF2E__rep, b); } 

inline void div(GF2E& x, const GF2E& a, long b)
   { div(x._GF2E__rep, a._GF2E__rep, b); } 

void div(GF2E& x, GF2 a, const GF2E& b);
void div(GF2E& x, long a, const GF2E& b);


inline GF2E operator/(const GF2E& a, const GF2E& b) 
   { GF2E x; div(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator/(const GF2E& a, GF2 b) 
   { GF2E x; div(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator/(const GF2E& a, long b) 
   { GF2E x; div(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator/(GF2 a, const GF2E& b) 
   { GF2E x; div(x, a, b); NTL_OPT_RETURN(GF2E, x); }

inline GF2E operator/(long a, const GF2E& b) 
   { GF2E x; div(x, a, b); NTL_OPT_RETURN(GF2E, x); }


inline GF2E& operator/=(GF2E& x, const GF2E& b)
   { div(x, x, b); return x; }

inline GF2E& operator/=(GF2E& x, GF2 b)
   { div(x, x, b); return x; }

inline GF2E& operator/=(GF2E& x, long b)
   { div(x, x, b); return x; }


// ****** exponentiation

inline void power(GF2E& x, const GF2E& a, const ZZ& e)
   { PowerMod(x._GF2E__rep, a._GF2E__rep, e, GF2E::modulus()); }

inline GF2E power(const GF2E& a, const ZZ& e)
   { GF2E x; power(x, a, e); NTL_OPT_RETURN(GF2E, x); }

inline void power(GF2E& x, const GF2E& a, long e)
   { PowerMod(x._GF2E__rep, a._GF2E__rep, e, GF2E::modulus()); }

inline GF2E power(const GF2E& a, long e)
   { GF2E x; power(x, a, e); NTL_OPT_RETURN(GF2E, x); }


// ****** conversion

inline void conv(GF2E& x, const GF2X& a)
// x = (a mod p)

   { rem(x._GF2E__rep, a, GF2E::modulus()); }

inline void conv(GF2E& x, long a)
   { conv(x._GF2E__rep, a); }

inline void conv(GF2E& x, GF2 a)
   { conv(x._GF2E__rep, a); }

inline void conv(GF2E& x, const ZZ& a)
   { conv(x._GF2E__rep, a); }

inline GF2E to_GF2E(const GF2X& a)
   { GF2E x; conv(x, a); NTL_OPT_RETURN(GF2E, x); }

inline GF2E to_GF2E(long a)
   { GF2E x; conv(x, a); NTL_OPT_RETURN(GF2E, x); }

inline GF2E to_GF2E(GF2 a)
   { GF2E x; conv(x, a); NTL_OPT_RETURN(GF2E, x); }

inline GF2E to_GF2E(const ZZ& a)
   { GF2E x; conv(x, a); NTL_OPT_RETURN(GF2E, x); }


// ****** comparison

inline long IsZero(const GF2E& a)
   { return IsZero(a._GF2E__rep); }

inline long IsOne(const GF2E& a)
   { return IsOne(a._GF2E__rep); }

inline long operator==(const GF2E& a, const GF2E& b)
   { return a._GF2E__rep == b._GF2E__rep; }

inline long operator==(const GF2E& a, GF2 b)
   { return a._GF2E__rep == b; }

inline long operator==(const GF2E& a, long b)
   { return a._GF2E__rep == b; }

inline long operator==(const GF2 a, const GF2E& b)
   { return a == b._GF2E__rep; }

inline long operator==(const long a, const GF2E& b)
   { return a == b._GF2E__rep; }


inline long operator!=(const GF2E& a, const GF2E& b) { return !(a == b); }
inline long operator!=(const GF2E& a, GF2 b) { return !(a == b); }
inline long operator!=(const GF2E& a, long b) { return !(a == b); }
inline long operator!=(GF2 a, const GF2E& b) { return !(a == b); }
inline long operator!=(long a, const GF2E& b) { return !(a == b); }

// ****** trace

inline void trace(GF2& x, const GF2E& a)
   { TraceMod(x, a._GF2E__rep, GF2E::modulus()); }
inline GF2 trace(const GF2E& a)
   { return TraceMod(a._GF2E__rep, GF2E::modulus()); }



// ****** random numbers

inline void random(GF2E& x)
// x = random element in GF2E

   { random(x._GF2E__rep, GF2EInfo->p.n); }

inline GF2E random_GF2E()
   { GF2E x; random(x); NTL_OPT_RETURN(GF2E, x); }


// ****** input/output

inline NTL_SNS ostream& operator<<(NTL_SNS ostream& s, const GF2E& a)
   { return s << a._GF2E__rep; }
   
NTL_SNS istream& operator>>(NTL_SNS istream& s, GF2E& x);


inline GF2E& GF2E::operator=(long a) { conv(*this, a); return *this; }
inline GF2E& GF2E::operator=(GF2 a) { conv(*this, a); return *this; }

NTL_CLOSE_NNS

#endif