blst/
bindings.rs

1/* automatically generated by rust-bindgen 0.65.1 */
2
3#[repr(u32)]
4#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5pub enum BLST_ERROR {
6    BLST_SUCCESS = 0,
7    BLST_BAD_ENCODING = 1,
8    BLST_POINT_NOT_ON_CURVE = 2,
9    BLST_POINT_NOT_IN_GROUP = 3,
10    BLST_AGGR_TYPE_MISMATCH = 4,
11    BLST_VERIFY_FAIL = 5,
12    BLST_PK_IS_INFINITY = 6,
13    BLST_BAD_SCALAR = 7,
14}
15pub type byte = u8;
16pub type limb_t = u64;
17#[repr(C)]
18#[derive(Debug, Default, Clone, PartialEq, Eq, Zeroize)]
19#[zeroize(drop)]
20pub struct blst_scalar {
21    pub b: [byte; 32usize],
22}
23#[test]
24fn bindgen_test_layout_blst_scalar() {
25    const UNINIT: ::core::mem::MaybeUninit<blst_scalar> = ::core::mem::MaybeUninit::uninit();
26    let ptr = UNINIT.as_ptr();
27    assert_eq!(
28        ::core::mem::size_of::<blst_scalar>(),
29        32usize,
30        concat!("Size of: ", stringify!(blst_scalar))
31    );
32    assert_eq!(
33        ::core::mem::align_of::<blst_scalar>(),
34        1usize,
35        concat!("Alignment of ", stringify!(blst_scalar))
36    );
37    assert_eq!(
38        unsafe { ::core::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
39        0usize,
40        concat!(
41            "Offset of field: ",
42            stringify!(blst_scalar),
43            "::",
44            stringify!(b)
45        )
46    );
47}
48#[repr(C)]
49#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
50pub struct blst_fr {
51    pub l: [limb_t; 4usize],
52}
53#[test]
54fn bindgen_test_layout_blst_fr() {
55    const UNINIT: ::core::mem::MaybeUninit<blst_fr> = ::core::mem::MaybeUninit::uninit();
56    let ptr = UNINIT.as_ptr();
57    assert_eq!(
58        ::core::mem::size_of::<blst_fr>(),
59        32usize,
60        concat!("Size of: ", stringify!(blst_fr))
61    );
62    assert_eq!(
63        ::core::mem::align_of::<blst_fr>(),
64        8usize,
65        concat!("Alignment of ", stringify!(blst_fr))
66    );
67    assert_eq!(
68        unsafe { ::core::ptr::addr_of!((*ptr).l) as usize - ptr as usize },
69        0usize,
70        concat!(
71            "Offset of field: ",
72            stringify!(blst_fr),
73            "::",
74            stringify!(l)
75        )
76    );
77}
78#[repr(C)]
79#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
80pub struct blst_fp {
81    pub l: [limb_t; 6usize],
82}
83#[test]
84fn bindgen_test_layout_blst_fp() {
85    const UNINIT: ::core::mem::MaybeUninit<blst_fp> = ::core::mem::MaybeUninit::uninit();
86    let ptr = UNINIT.as_ptr();
87    assert_eq!(
88        ::core::mem::size_of::<blst_fp>(),
89        48usize,
90        concat!("Size of: ", stringify!(blst_fp))
91    );
92    assert_eq!(
93        ::core::mem::align_of::<blst_fp>(),
94        8usize,
95        concat!("Alignment of ", stringify!(blst_fp))
96    );
97    assert_eq!(
98        unsafe { ::core::ptr::addr_of!((*ptr).l) as usize - ptr as usize },
99        0usize,
100        concat!(
101            "Offset of field: ",
102            stringify!(blst_fp),
103            "::",
104            stringify!(l)
105        )
106    );
107}
108#[repr(C)]
109#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
110pub struct blst_fp2 {
111    pub fp: [blst_fp; 2usize],
112}
113#[test]
114fn bindgen_test_layout_blst_fp2() {
115    const UNINIT: ::core::mem::MaybeUninit<blst_fp2> = ::core::mem::MaybeUninit::uninit();
116    let ptr = UNINIT.as_ptr();
117    assert_eq!(
118        ::core::mem::size_of::<blst_fp2>(),
119        96usize,
120        concat!("Size of: ", stringify!(blst_fp2))
121    );
122    assert_eq!(
123        ::core::mem::align_of::<blst_fp2>(),
124        8usize,
125        concat!("Alignment of ", stringify!(blst_fp2))
126    );
127    assert_eq!(
128        unsafe { ::core::ptr::addr_of!((*ptr).fp) as usize - ptr as usize },
129        0usize,
130        concat!(
131            "Offset of field: ",
132            stringify!(blst_fp2),
133            "::",
134            stringify!(fp)
135        )
136    );
137}
138#[repr(C)]
139#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
140pub struct blst_fp6 {
141    pub fp2: [blst_fp2; 3usize],
142}
143#[test]
144fn bindgen_test_layout_blst_fp6() {
145    const UNINIT: ::core::mem::MaybeUninit<blst_fp6> = ::core::mem::MaybeUninit::uninit();
146    let ptr = UNINIT.as_ptr();
147    assert_eq!(
148        ::core::mem::size_of::<blst_fp6>(),
149        288usize,
150        concat!("Size of: ", stringify!(blst_fp6))
151    );
152    assert_eq!(
153        ::core::mem::align_of::<blst_fp6>(),
154        8usize,
155        concat!("Alignment of ", stringify!(blst_fp6))
156    );
157    assert_eq!(
158        unsafe { ::core::ptr::addr_of!((*ptr).fp2) as usize - ptr as usize },
159        0usize,
160        concat!(
161            "Offset of field: ",
162            stringify!(blst_fp6),
163            "::",
164            stringify!(fp2)
165        )
166    );
167}
168#[repr(C)]
169#[derive(Debug, Copy, Clone, Eq)]
170pub struct blst_fp12 {
171    pub fp6: [blst_fp6; 2usize],
172}
173#[test]
174fn bindgen_test_layout_blst_fp12() {
175    const UNINIT: ::core::mem::MaybeUninit<blst_fp12> = ::core::mem::MaybeUninit::uninit();
176    let ptr = UNINIT.as_ptr();
177    assert_eq!(
178        ::core::mem::size_of::<blst_fp12>(),
179        576usize,
180        concat!("Size of: ", stringify!(blst_fp12))
181    );
182    assert_eq!(
183        ::core::mem::align_of::<blst_fp12>(),
184        8usize,
185        concat!("Alignment of ", stringify!(blst_fp12))
186    );
187    assert_eq!(
188        unsafe { ::core::ptr::addr_of!((*ptr).fp6) as usize - ptr as usize },
189        0usize,
190        concat!(
191            "Offset of field: ",
192            stringify!(blst_fp12),
193            "::",
194            stringify!(fp6)
195        )
196    );
197}
198extern "C" {
199    pub fn blst_scalar_from_uint32(out: *mut blst_scalar, a: *const u32);
200}
201extern "C" {
202    pub fn blst_uint32_from_scalar(out: *mut u32, a: *const blst_scalar);
203}
204extern "C" {
205    pub fn blst_scalar_from_uint64(out: *mut blst_scalar, a: *const u64);
206}
207extern "C" {
208    pub fn blst_uint64_from_scalar(out: *mut u64, a: *const blst_scalar);
209}
210extern "C" {
211    pub fn blst_scalar_from_bendian(out: *mut blst_scalar, a: *const byte);
212}
213extern "C" {
214    pub fn blst_bendian_from_scalar(out: *mut byte, a: *const blst_scalar);
215}
216extern "C" {
217    pub fn blst_scalar_from_lendian(out: *mut blst_scalar, a: *const byte);
218}
219extern "C" {
220    pub fn blst_lendian_from_scalar(out: *mut byte, a: *const blst_scalar);
221}
222extern "C" {
223    pub fn blst_scalar_fr_check(a: *const blst_scalar) -> bool;
224}
225extern "C" {
226    pub fn blst_sk_check(a: *const blst_scalar) -> bool;
227}
228extern "C" {
229    pub fn blst_sk_add_n_check(
230        out: *mut blst_scalar,
231        a: *const blst_scalar,
232        b: *const blst_scalar,
233    ) -> bool;
234}
235extern "C" {
236    pub fn blst_sk_sub_n_check(
237        out: *mut blst_scalar,
238        a: *const blst_scalar,
239        b: *const blst_scalar,
240    ) -> bool;
241}
242extern "C" {
243    pub fn blst_sk_mul_n_check(
244        out: *mut blst_scalar,
245        a: *const blst_scalar,
246        b: *const blst_scalar,
247    ) -> bool;
248}
249extern "C" {
250    pub fn blst_sk_inverse(out: *mut blst_scalar, a: *const blst_scalar);
251}
252extern "C" {
253    pub fn blst_scalar_from_le_bytes(out: *mut blst_scalar, in_: *const byte, len: usize) -> bool;
254}
255extern "C" {
256    pub fn blst_scalar_from_be_bytes(out: *mut blst_scalar, in_: *const byte, len: usize) -> bool;
257}
258extern "C" {
259    pub fn blst_fr_add(ret: *mut blst_fr, a: *const blst_fr, b: *const blst_fr);
260}
261extern "C" {
262    pub fn blst_fr_sub(ret: *mut blst_fr, a: *const blst_fr, b: *const blst_fr);
263}
264extern "C" {
265    pub fn blst_fr_mul_by_3(ret: *mut blst_fr, a: *const blst_fr);
266}
267extern "C" {
268    pub fn blst_fr_lshift(ret: *mut blst_fr, a: *const blst_fr, count: usize);
269}
270extern "C" {
271    pub fn blst_fr_rshift(ret: *mut blst_fr, a: *const blst_fr, count: usize);
272}
273extern "C" {
274    pub fn blst_fr_mul(ret: *mut blst_fr, a: *const blst_fr, b: *const blst_fr);
275}
276extern "C" {
277    pub fn blst_fr_sqr(ret: *mut blst_fr, a: *const blst_fr);
278}
279extern "C" {
280    pub fn blst_fr_cneg(ret: *mut blst_fr, a: *const blst_fr, flag: bool);
281}
282extern "C" {
283    pub fn blst_fr_eucl_inverse(ret: *mut blst_fr, a: *const blst_fr);
284}
285extern "C" {
286    pub fn blst_fr_inverse(ret: *mut blst_fr, a: *const blst_fr);
287}
288extern "C" {
289    pub fn blst_fr_from_uint64(ret: *mut blst_fr, a: *const u64);
290}
291extern "C" {
292    pub fn blst_uint64_from_fr(ret: *mut u64, a: *const blst_fr);
293}
294extern "C" {
295    pub fn blst_fr_from_scalar(ret: *mut blst_fr, a: *const blst_scalar);
296}
297extern "C" {
298    pub fn blst_scalar_from_fr(ret: *mut blst_scalar, a: *const blst_fr);
299}
300extern "C" {
301    pub fn blst_fp_add(ret: *mut blst_fp, a: *const blst_fp, b: *const blst_fp);
302}
303extern "C" {
304    pub fn blst_fp_sub(ret: *mut blst_fp, a: *const blst_fp, b: *const blst_fp);
305}
306extern "C" {
307    pub fn blst_fp_mul_by_3(ret: *mut blst_fp, a: *const blst_fp);
308}
309extern "C" {
310    pub fn blst_fp_mul_by_8(ret: *mut blst_fp, a: *const blst_fp);
311}
312extern "C" {
313    pub fn blst_fp_lshift(ret: *mut blst_fp, a: *const blst_fp, count: usize);
314}
315extern "C" {
316    pub fn blst_fp_mul(ret: *mut blst_fp, a: *const blst_fp, b: *const blst_fp);
317}
318extern "C" {
319    pub fn blst_fp_sqr(ret: *mut blst_fp, a: *const blst_fp);
320}
321extern "C" {
322    pub fn blst_fp_cneg(ret: *mut blst_fp, a: *const blst_fp, flag: bool);
323}
324extern "C" {
325    pub fn blst_fp_eucl_inverse(ret: *mut blst_fp, a: *const blst_fp);
326}
327extern "C" {
328    pub fn blst_fp_inverse(ret: *mut blst_fp, a: *const blst_fp);
329}
330extern "C" {
331    pub fn blst_fp_sqrt(ret: *mut blst_fp, a: *const blst_fp) -> bool;
332}
333extern "C" {
334    pub fn blst_fp_from_uint32(ret: *mut blst_fp, a: *const u32);
335}
336extern "C" {
337    pub fn blst_uint32_from_fp(ret: *mut u32, a: *const blst_fp);
338}
339extern "C" {
340    pub fn blst_fp_from_uint64(ret: *mut blst_fp, a: *const u64);
341}
342extern "C" {
343    pub fn blst_uint64_from_fp(ret: *mut u64, a: *const blst_fp);
344}
345extern "C" {
346    pub fn blst_fp_from_bendian(ret: *mut blst_fp, a: *const byte);
347}
348extern "C" {
349    pub fn blst_bendian_from_fp(ret: *mut byte, a: *const blst_fp);
350}
351extern "C" {
352    pub fn blst_fp_from_lendian(ret: *mut blst_fp, a: *const byte);
353}
354extern "C" {
355    pub fn blst_lendian_from_fp(ret: *mut byte, a: *const blst_fp);
356}
357extern "C" {
358    pub fn blst_fp2_add(ret: *mut blst_fp2, a: *const blst_fp2, b: *const blst_fp2);
359}
360extern "C" {
361    pub fn blst_fp2_sub(ret: *mut blst_fp2, a: *const blst_fp2, b: *const blst_fp2);
362}
363extern "C" {
364    pub fn blst_fp2_mul_by_3(ret: *mut blst_fp2, a: *const blst_fp2);
365}
366extern "C" {
367    pub fn blst_fp2_mul_by_8(ret: *mut blst_fp2, a: *const blst_fp2);
368}
369extern "C" {
370    pub fn blst_fp2_lshift(ret: *mut blst_fp2, a: *const blst_fp2, count: usize);
371}
372extern "C" {
373    pub fn blst_fp2_mul(ret: *mut blst_fp2, a: *const blst_fp2, b: *const blst_fp2);
374}
375extern "C" {
376    pub fn blst_fp2_sqr(ret: *mut blst_fp2, a: *const blst_fp2);
377}
378extern "C" {
379    pub fn blst_fp2_cneg(ret: *mut blst_fp2, a: *const blst_fp2, flag: bool);
380}
381extern "C" {
382    pub fn blst_fp2_eucl_inverse(ret: *mut blst_fp2, a: *const blst_fp2);
383}
384extern "C" {
385    pub fn blst_fp2_inverse(ret: *mut blst_fp2, a: *const blst_fp2);
386}
387extern "C" {
388    pub fn blst_fp2_sqrt(ret: *mut blst_fp2, a: *const blst_fp2) -> bool;
389}
390extern "C" {
391    pub fn blst_fp12_sqr(ret: *mut blst_fp12, a: *const blst_fp12);
392}
393extern "C" {
394    pub fn blst_fp12_cyclotomic_sqr(ret: *mut blst_fp12, a: *const blst_fp12);
395}
396extern "C" {
397    pub fn blst_fp12_mul(ret: *mut blst_fp12, a: *const blst_fp12, b: *const blst_fp12);
398}
399extern "C" {
400    pub fn blst_fp12_mul_by_xy00z0(
401        ret: *mut blst_fp12,
402        a: *const blst_fp12,
403        xy00z0: *const blst_fp6,
404    );
405}
406extern "C" {
407    pub fn blst_fp12_conjugate(a: *mut blst_fp12);
408}
409extern "C" {
410    pub fn blst_fp12_inverse(ret: *mut blst_fp12, a: *const blst_fp12);
411}
412extern "C" {
413    pub fn blst_fp12_frobenius_map(ret: *mut blst_fp12, a: *const blst_fp12, n: usize);
414}
415extern "C" {
416    pub fn blst_fp12_is_equal(a: *const blst_fp12, b: *const blst_fp12) -> bool;
417}
418extern "C" {
419    pub fn blst_fp12_is_one(a: *const blst_fp12) -> bool;
420}
421extern "C" {
422    pub fn blst_fp12_in_group(a: *const blst_fp12) -> bool;
423}
424extern "C" {
425    pub fn blst_fp12_one() -> *const blst_fp12;
426}
427#[repr(C)]
428#[derive(Debug, Default, Copy, Clone, Eq)]
429pub struct blst_p1 {
430    pub x: blst_fp,
431    pub y: blst_fp,
432    pub z: blst_fp,
433}
434#[test]
435fn bindgen_test_layout_blst_p1() {
436    const UNINIT: ::core::mem::MaybeUninit<blst_p1> = ::core::mem::MaybeUninit::uninit();
437    let ptr = UNINIT.as_ptr();
438    assert_eq!(
439        ::core::mem::size_of::<blst_p1>(),
440        144usize,
441        concat!("Size of: ", stringify!(blst_p1))
442    );
443    assert_eq!(
444        ::core::mem::align_of::<blst_p1>(),
445        8usize,
446        concat!("Alignment of ", stringify!(blst_p1))
447    );
448    assert_eq!(
449        unsafe { ::core::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
450        0usize,
451        concat!(
452            "Offset of field: ",
453            stringify!(blst_p1),
454            "::",
455            stringify!(x)
456        )
457    );
458    assert_eq!(
459        unsafe { ::core::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
460        48usize,
461        concat!(
462            "Offset of field: ",
463            stringify!(blst_p1),
464            "::",
465            stringify!(y)
466        )
467    );
468    assert_eq!(
469        unsafe { ::core::ptr::addr_of!((*ptr).z) as usize - ptr as usize },
470        96usize,
471        concat!(
472            "Offset of field: ",
473            stringify!(blst_p1),
474            "::",
475            stringify!(z)
476        )
477    );
478}
479#[repr(C)]
480#[derive(Debug, Default, Copy, Clone, Eq)]
481pub struct blst_p1_affine {
482    pub x: blst_fp,
483    pub y: blst_fp,
484}
485#[test]
486fn bindgen_test_layout_blst_p1_affine() {
487    const UNINIT: ::core::mem::MaybeUninit<blst_p1_affine> = ::core::mem::MaybeUninit::uninit();
488    let ptr = UNINIT.as_ptr();
489    assert_eq!(
490        ::core::mem::size_of::<blst_p1_affine>(),
491        96usize,
492        concat!("Size of: ", stringify!(blst_p1_affine))
493    );
494    assert_eq!(
495        ::core::mem::align_of::<blst_p1_affine>(),
496        8usize,
497        concat!("Alignment of ", stringify!(blst_p1_affine))
498    );
499    assert_eq!(
500        unsafe { ::core::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
501        0usize,
502        concat!(
503            "Offset of field: ",
504            stringify!(blst_p1_affine),
505            "::",
506            stringify!(x)
507        )
508    );
509    assert_eq!(
510        unsafe { ::core::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
511        48usize,
512        concat!(
513            "Offset of field: ",
514            stringify!(blst_p1_affine),
515            "::",
516            stringify!(y)
517        )
518    );
519}
520extern "C" {
521    pub fn blst_p1_add(out: *mut blst_p1, a: *const blst_p1, b: *const blst_p1);
522}
523extern "C" {
524    pub fn blst_p1_add_or_double(out: *mut blst_p1, a: *const blst_p1, b: *const blst_p1);
525}
526extern "C" {
527    pub fn blst_p1_add_affine(out: *mut blst_p1, a: *const blst_p1, b: *const blst_p1_affine);
528}
529extern "C" {
530    pub fn blst_p1_add_or_double_affine(
531        out: *mut blst_p1,
532        a: *const blst_p1,
533        b: *const blst_p1_affine,
534    );
535}
536extern "C" {
537    pub fn blst_p1_double(out: *mut blst_p1, a: *const blst_p1);
538}
539extern "C" {
540    pub fn blst_p1_mult(out: *mut blst_p1, p: *const blst_p1, scalar: *const byte, nbits: usize);
541}
542extern "C" {
543    pub fn blst_p1_cneg(p: *mut blst_p1, cbit: bool);
544}
545extern "C" {
546    pub fn blst_p1_to_affine(out: *mut blst_p1_affine, in_: *const blst_p1);
547}
548extern "C" {
549    pub fn blst_p1_from_affine(out: *mut blst_p1, in_: *const blst_p1_affine);
550}
551extern "C" {
552    pub fn blst_p1_on_curve(p: *const blst_p1) -> bool;
553}
554extern "C" {
555    pub fn blst_p1_in_g1(p: *const blst_p1) -> bool;
556}
557extern "C" {
558    pub fn blst_p1_is_equal(a: *const blst_p1, b: *const blst_p1) -> bool;
559}
560extern "C" {
561    pub fn blst_p1_is_inf(a: *const blst_p1) -> bool;
562}
563extern "C" {
564    pub fn blst_p1_generator() -> *const blst_p1;
565}
566extern "C" {
567    pub fn blst_p1_affine_on_curve(p: *const blst_p1_affine) -> bool;
568}
569extern "C" {
570    pub fn blst_p1_affine_in_g1(p: *const blst_p1_affine) -> bool;
571}
572extern "C" {
573    pub fn blst_p1_affine_is_equal(a: *const blst_p1_affine, b: *const blst_p1_affine) -> bool;
574}
575extern "C" {
576    pub fn blst_p1_affine_is_inf(a: *const blst_p1_affine) -> bool;
577}
578extern "C" {
579    pub fn blst_p1_affine_generator() -> *const blst_p1_affine;
580}
581#[repr(C)]
582#[derive(Debug, Default, Copy, Clone, Eq)]
583pub struct blst_p2 {
584    pub x: blst_fp2,
585    pub y: blst_fp2,
586    pub z: blst_fp2,
587}
588#[test]
589fn bindgen_test_layout_blst_p2() {
590    const UNINIT: ::core::mem::MaybeUninit<blst_p2> = ::core::mem::MaybeUninit::uninit();
591    let ptr = UNINIT.as_ptr();
592    assert_eq!(
593        ::core::mem::size_of::<blst_p2>(),
594        288usize,
595        concat!("Size of: ", stringify!(blst_p2))
596    );
597    assert_eq!(
598        ::core::mem::align_of::<blst_p2>(),
599        8usize,
600        concat!("Alignment of ", stringify!(blst_p2))
601    );
602    assert_eq!(
603        unsafe { ::core::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
604        0usize,
605        concat!(
606            "Offset of field: ",
607            stringify!(blst_p2),
608            "::",
609            stringify!(x)
610        )
611    );
612    assert_eq!(
613        unsafe { ::core::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
614        96usize,
615        concat!(
616            "Offset of field: ",
617            stringify!(blst_p2),
618            "::",
619            stringify!(y)
620        )
621    );
622    assert_eq!(
623        unsafe { ::core::ptr::addr_of!((*ptr).z) as usize - ptr as usize },
624        192usize,
625        concat!(
626            "Offset of field: ",
627            stringify!(blst_p2),
628            "::",
629            stringify!(z)
630        )
631    );
632}
633#[repr(C)]
634#[derive(Debug, Default, Copy, Clone, Eq)]
635pub struct blst_p2_affine {
636    pub x: blst_fp2,
637    pub y: blst_fp2,
638}
639#[test]
640fn bindgen_test_layout_blst_p2_affine() {
641    const UNINIT: ::core::mem::MaybeUninit<blst_p2_affine> = ::core::mem::MaybeUninit::uninit();
642    let ptr = UNINIT.as_ptr();
643    assert_eq!(
644        ::core::mem::size_of::<blst_p2_affine>(),
645        192usize,
646        concat!("Size of: ", stringify!(blst_p2_affine))
647    );
648    assert_eq!(
649        ::core::mem::align_of::<blst_p2_affine>(),
650        8usize,
651        concat!("Alignment of ", stringify!(blst_p2_affine))
652    );
653    assert_eq!(
654        unsafe { ::core::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
655        0usize,
656        concat!(
657            "Offset of field: ",
658            stringify!(blst_p2_affine),
659            "::",
660            stringify!(x)
661        )
662    );
663    assert_eq!(
664        unsafe { ::core::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
665        96usize,
666        concat!(
667            "Offset of field: ",
668            stringify!(blst_p2_affine),
669            "::",
670            stringify!(y)
671        )
672    );
673}
674extern "C" {
675    pub fn blst_p2_add(out: *mut blst_p2, a: *const blst_p2, b: *const blst_p2);
676}
677extern "C" {
678    pub fn blst_p2_add_or_double(out: *mut blst_p2, a: *const blst_p2, b: *const blst_p2);
679}
680extern "C" {
681    pub fn blst_p2_add_affine(out: *mut blst_p2, a: *const blst_p2, b: *const blst_p2_affine);
682}
683extern "C" {
684    pub fn blst_p2_add_or_double_affine(
685        out: *mut blst_p2,
686        a: *const blst_p2,
687        b: *const blst_p2_affine,
688    );
689}
690extern "C" {
691    pub fn blst_p2_double(out: *mut blst_p2, a: *const blst_p2);
692}
693extern "C" {
694    pub fn blst_p2_mult(out: *mut blst_p2, p: *const blst_p2, scalar: *const byte, nbits: usize);
695}
696extern "C" {
697    pub fn blst_p2_cneg(p: *mut blst_p2, cbit: bool);
698}
699extern "C" {
700    pub fn blst_p2_to_affine(out: *mut blst_p2_affine, in_: *const blst_p2);
701}
702extern "C" {
703    pub fn blst_p2_from_affine(out: *mut blst_p2, in_: *const blst_p2_affine);
704}
705extern "C" {
706    pub fn blst_p2_on_curve(p: *const blst_p2) -> bool;
707}
708extern "C" {
709    pub fn blst_p2_in_g2(p: *const blst_p2) -> bool;
710}
711extern "C" {
712    pub fn blst_p2_is_equal(a: *const blst_p2, b: *const blst_p2) -> bool;
713}
714extern "C" {
715    pub fn blst_p2_is_inf(a: *const blst_p2) -> bool;
716}
717extern "C" {
718    pub fn blst_p2_generator() -> *const blst_p2;
719}
720extern "C" {
721    pub fn blst_p2_affine_on_curve(p: *const blst_p2_affine) -> bool;
722}
723extern "C" {
724    pub fn blst_p2_affine_in_g2(p: *const blst_p2_affine) -> bool;
725}
726extern "C" {
727    pub fn blst_p2_affine_is_equal(a: *const blst_p2_affine, b: *const blst_p2_affine) -> bool;
728}
729extern "C" {
730    pub fn blst_p2_affine_is_inf(a: *const blst_p2_affine) -> bool;
731}
732extern "C" {
733    pub fn blst_p2_affine_generator() -> *const blst_p2_affine;
734}
735extern "C" {
736    pub fn blst_p1s_to_affine(
737        dst: *mut blst_p1_affine,
738        points: *const *const blst_p1,
739        npoints: usize,
740    );
741}
742extern "C" {
743    pub fn blst_p1s_add(ret: *mut blst_p1, points: *const *const blst_p1_affine, npoints: usize);
744}
745extern "C" {
746    pub fn blst_p1s_mult_wbits_precompute_sizeof(wbits: usize, npoints: usize) -> usize;
747}
748extern "C" {
749    pub fn blst_p1s_mult_wbits_precompute(
750        table: *mut blst_p1_affine,
751        wbits: usize,
752        points: *const *const blst_p1_affine,
753        npoints: usize,
754    );
755}
756extern "C" {
757    pub fn blst_p1s_mult_wbits_scratch_sizeof(npoints: usize) -> usize;
758}
759extern "C" {
760    pub fn blst_p1s_mult_wbits(
761        ret: *mut blst_p1,
762        table: *const blst_p1_affine,
763        wbits: usize,
764        npoints: usize,
765        scalars: *const *const byte,
766        nbits: usize,
767        scratch: *mut limb_t,
768    );
769}
770extern "C" {
771    pub fn blst_p1s_mult_pippenger_scratch_sizeof(npoints: usize) -> usize;
772}
773extern "C" {
774    pub fn blst_p1s_mult_pippenger(
775        ret: *mut blst_p1,
776        points: *const *const blst_p1_affine,
777        npoints: usize,
778        scalars: *const *const byte,
779        nbits: usize,
780        scratch: *mut limb_t,
781    );
782}
783extern "C" {
784    pub fn blst_p1s_tile_pippenger(
785        ret: *mut blst_p1,
786        points: *const *const blst_p1_affine,
787        npoints: usize,
788        scalars: *const *const byte,
789        nbits: usize,
790        scratch: *mut limb_t,
791        bit0: usize,
792        window: usize,
793    );
794}
795extern "C" {
796    pub fn blst_p2s_to_affine(
797        dst: *mut blst_p2_affine,
798        points: *const *const blst_p2,
799        npoints: usize,
800    );
801}
802extern "C" {
803    pub fn blst_p2s_add(ret: *mut blst_p2, points: *const *const blst_p2_affine, npoints: usize);
804}
805extern "C" {
806    pub fn blst_p2s_mult_wbits_precompute_sizeof(wbits: usize, npoints: usize) -> usize;
807}
808extern "C" {
809    pub fn blst_p2s_mult_wbits_precompute(
810        table: *mut blst_p2_affine,
811        wbits: usize,
812        points: *const *const blst_p2_affine,
813        npoints: usize,
814    );
815}
816extern "C" {
817    pub fn blst_p2s_mult_wbits_scratch_sizeof(npoints: usize) -> usize;
818}
819extern "C" {
820    pub fn blst_p2s_mult_wbits(
821        ret: *mut blst_p2,
822        table: *const blst_p2_affine,
823        wbits: usize,
824        npoints: usize,
825        scalars: *const *const byte,
826        nbits: usize,
827        scratch: *mut limb_t,
828    );
829}
830extern "C" {
831    pub fn blst_p2s_mult_pippenger_scratch_sizeof(npoints: usize) -> usize;
832}
833extern "C" {
834    pub fn blst_p2s_mult_pippenger(
835        ret: *mut blst_p2,
836        points: *const *const blst_p2_affine,
837        npoints: usize,
838        scalars: *const *const byte,
839        nbits: usize,
840        scratch: *mut limb_t,
841    );
842}
843extern "C" {
844    pub fn blst_p2s_tile_pippenger(
845        ret: *mut blst_p2,
846        points: *const *const blst_p2_affine,
847        npoints: usize,
848        scalars: *const *const byte,
849        nbits: usize,
850        scratch: *mut limb_t,
851        bit0: usize,
852        window: usize,
853    );
854}
855extern "C" {
856    pub fn blst_map_to_g1(out: *mut blst_p1, u: *const blst_fp, v: *const blst_fp);
857}
858extern "C" {
859    pub fn blst_map_to_g2(out: *mut blst_p2, u: *const blst_fp2, v: *const blst_fp2);
860}
861extern "C" {
862    pub fn blst_encode_to_g1(
863        out: *mut blst_p1,
864        msg: *const byte,
865        msg_len: usize,
866        DST: *const byte,
867        DST_len: usize,
868        aug: *const byte,
869        aug_len: usize,
870    );
871}
872extern "C" {
873    pub fn blst_hash_to_g1(
874        out: *mut blst_p1,
875        msg: *const byte,
876        msg_len: usize,
877        DST: *const byte,
878        DST_len: usize,
879        aug: *const byte,
880        aug_len: usize,
881    );
882}
883extern "C" {
884    pub fn blst_encode_to_g2(
885        out: *mut blst_p2,
886        msg: *const byte,
887        msg_len: usize,
888        DST: *const byte,
889        DST_len: usize,
890        aug: *const byte,
891        aug_len: usize,
892    );
893}
894extern "C" {
895    pub fn blst_hash_to_g2(
896        out: *mut blst_p2,
897        msg: *const byte,
898        msg_len: usize,
899        DST: *const byte,
900        DST_len: usize,
901        aug: *const byte,
902        aug_len: usize,
903    );
904}
905extern "C" {
906    pub fn blst_p1_serialize(out: *mut byte, in_: *const blst_p1);
907}
908extern "C" {
909    pub fn blst_p1_compress(out: *mut byte, in_: *const blst_p1);
910}
911extern "C" {
912    pub fn blst_p1_affine_serialize(out: *mut byte, in_: *const blst_p1_affine);
913}
914extern "C" {
915    pub fn blst_p1_affine_compress(out: *mut byte, in_: *const blst_p1_affine);
916}
917extern "C" {
918    pub fn blst_p1_uncompress(out: *mut blst_p1_affine, in_: *const byte) -> BLST_ERROR;
919}
920extern "C" {
921    pub fn blst_p1_deserialize(out: *mut blst_p1_affine, in_: *const byte) -> BLST_ERROR;
922}
923extern "C" {
924    pub fn blst_p2_serialize(out: *mut byte, in_: *const blst_p2);
925}
926extern "C" {
927    pub fn blst_p2_compress(out: *mut byte, in_: *const blst_p2);
928}
929extern "C" {
930    pub fn blst_p2_affine_serialize(out: *mut byte, in_: *const blst_p2_affine);
931}
932extern "C" {
933    pub fn blst_p2_affine_compress(out: *mut byte, in_: *const blst_p2_affine);
934}
935extern "C" {
936    pub fn blst_p2_uncompress(out: *mut blst_p2_affine, in_: *const byte) -> BLST_ERROR;
937}
938extern "C" {
939    pub fn blst_p2_deserialize(out: *mut blst_p2_affine, in_: *const byte) -> BLST_ERROR;
940}
941extern "C" {
942    pub fn blst_keygen(
943        out_SK: *mut blst_scalar,
944        IKM: *const byte,
945        IKM_len: usize,
946        info: *const byte,
947        info_len: usize,
948    );
949}
950extern "C" {
951    pub fn blst_sk_to_pk_in_g1(out_pk: *mut blst_p1, SK: *const blst_scalar);
952}
953extern "C" {
954    pub fn blst_sign_pk_in_g1(out_sig: *mut blst_p2, hash: *const blst_p2, SK: *const blst_scalar);
955}
956extern "C" {
957    pub fn blst_sk_to_pk_in_g2(out_pk: *mut blst_p2, SK: *const blst_scalar);
958}
959extern "C" {
960    pub fn blst_sign_pk_in_g2(out_sig: *mut blst_p1, hash: *const blst_p1, SK: *const blst_scalar);
961}
962extern "C" {
963    pub fn blst_miller_loop(
964        ret: *mut blst_fp12,
965        Q: *const blst_p2_affine,
966        P: *const blst_p1_affine,
967    );
968}
969extern "C" {
970    pub fn blst_miller_loop_n(
971        ret: *mut blst_fp12,
972        Qs: *const *const blst_p2_affine,
973        Ps: *const *const blst_p1_affine,
974        n: usize,
975    );
976}
977extern "C" {
978    pub fn blst_final_exp(ret: *mut blst_fp12, f: *const blst_fp12);
979}
980extern "C" {
981    pub fn blst_precompute_lines(Qlines: *mut blst_fp6, Q: *const blst_p2_affine);
982}
983extern "C" {
984    pub fn blst_miller_loop_lines(
985        ret: *mut blst_fp12,
986        Qlines: *const blst_fp6,
987        P: *const blst_p1_affine,
988    );
989}
990extern "C" {
991    pub fn blst_fp12_finalverify(gt1: *const blst_fp12, gt2: *const blst_fp12) -> bool;
992}
993#[repr(C)]
994#[repr(align(1))]
995#[derive(Debug, Default)]
996pub struct blst_pairing {
997    pub _bindgen_opaque_blob: [u8; 0usize],
998}
999#[test]
1000fn bindgen_test_layout_blst_pairing() {
1001    assert_eq!(
1002        ::core::mem::size_of::<blst_pairing>(),
1003        0usize,
1004        concat!("Size of: ", stringify!(blst_pairing))
1005    );
1006    assert_eq!(
1007        ::core::mem::align_of::<blst_pairing>(),
1008        1usize,
1009        concat!("Alignment of ", stringify!(blst_pairing))
1010    );
1011}
1012extern "C" {
1013    pub fn blst_pairing_sizeof() -> usize;
1014}
1015extern "C" {
1016    pub fn blst_pairing_init(
1017        new_ctx: *mut blst_pairing,
1018        hash_or_encode: bool,
1019        DST: *const byte,
1020        DST_len: usize,
1021    );
1022}
1023extern "C" {
1024    pub fn blst_pairing_get_dst(ctx: *const blst_pairing) -> *const byte;
1025}
1026extern "C" {
1027    pub fn blst_pairing_commit(ctx: *mut blst_pairing);
1028}
1029extern "C" {
1030    pub fn blst_pairing_aggregate_pk_in_g2(
1031        ctx: *mut blst_pairing,
1032        PK: *const blst_p2_affine,
1033        signature: *const blst_p1_affine,
1034        msg: *const byte,
1035        msg_len: usize,
1036        aug: *const byte,
1037        aug_len: usize,
1038    ) -> BLST_ERROR;
1039}
1040extern "C" {
1041    pub fn blst_pairing_chk_n_aggr_pk_in_g2(
1042        ctx: *mut blst_pairing,
1043        PK: *const blst_p2_affine,
1044        pk_grpchk: bool,
1045        signature: *const blst_p1_affine,
1046        sig_grpchk: bool,
1047        msg: *const byte,
1048        msg_len: usize,
1049        aug: *const byte,
1050        aug_len: usize,
1051    ) -> BLST_ERROR;
1052}
1053extern "C" {
1054    pub fn blst_pairing_mul_n_aggregate_pk_in_g2(
1055        ctx: *mut blst_pairing,
1056        PK: *const blst_p2_affine,
1057        sig: *const blst_p1_affine,
1058        scalar: *const byte,
1059        nbits: usize,
1060        msg: *const byte,
1061        msg_len: usize,
1062        aug: *const byte,
1063        aug_len: usize,
1064    ) -> BLST_ERROR;
1065}
1066extern "C" {
1067    pub fn blst_pairing_chk_n_mul_n_aggr_pk_in_g2(
1068        ctx: *mut blst_pairing,
1069        PK: *const blst_p2_affine,
1070        pk_grpchk: bool,
1071        sig: *const blst_p1_affine,
1072        sig_grpchk: bool,
1073        scalar: *const byte,
1074        nbits: usize,
1075        msg: *const byte,
1076        msg_len: usize,
1077        aug: *const byte,
1078        aug_len: usize,
1079    ) -> BLST_ERROR;
1080}
1081extern "C" {
1082    pub fn blst_pairing_aggregate_pk_in_g1(
1083        ctx: *mut blst_pairing,
1084        PK: *const blst_p1_affine,
1085        signature: *const blst_p2_affine,
1086        msg: *const byte,
1087        msg_len: usize,
1088        aug: *const byte,
1089        aug_len: usize,
1090    ) -> BLST_ERROR;
1091}
1092extern "C" {
1093    pub fn blst_pairing_chk_n_aggr_pk_in_g1(
1094        ctx: *mut blst_pairing,
1095        PK: *const blst_p1_affine,
1096        pk_grpchk: bool,
1097        signature: *const blst_p2_affine,
1098        sig_grpchk: bool,
1099        msg: *const byte,
1100        msg_len: usize,
1101        aug: *const byte,
1102        aug_len: usize,
1103    ) -> BLST_ERROR;
1104}
1105extern "C" {
1106    pub fn blst_pairing_mul_n_aggregate_pk_in_g1(
1107        ctx: *mut blst_pairing,
1108        PK: *const blst_p1_affine,
1109        sig: *const blst_p2_affine,
1110        scalar: *const byte,
1111        nbits: usize,
1112        msg: *const byte,
1113        msg_len: usize,
1114        aug: *const byte,
1115        aug_len: usize,
1116    ) -> BLST_ERROR;
1117}
1118extern "C" {
1119    pub fn blst_pairing_chk_n_mul_n_aggr_pk_in_g1(
1120        ctx: *mut blst_pairing,
1121        PK: *const blst_p1_affine,
1122        pk_grpchk: bool,
1123        sig: *const blst_p2_affine,
1124        sig_grpchk: bool,
1125        scalar: *const byte,
1126        nbits: usize,
1127        msg: *const byte,
1128        msg_len: usize,
1129        aug: *const byte,
1130        aug_len: usize,
1131    ) -> BLST_ERROR;
1132}
1133extern "C" {
1134    pub fn blst_pairing_merge(ctx: *mut blst_pairing, ctx1: *const blst_pairing) -> BLST_ERROR;
1135}
1136extern "C" {
1137    pub fn blst_pairing_finalverify(ctx: *const blst_pairing, gtsig: *const blst_fp12) -> bool;
1138}
1139extern "C" {
1140    pub fn blst_aggregate_in_g1(
1141        out: *mut blst_p1,
1142        in_: *const blst_p1,
1143        zwire: *const byte,
1144    ) -> BLST_ERROR;
1145}
1146extern "C" {
1147    pub fn blst_aggregate_in_g2(
1148        out: *mut blst_p2,
1149        in_: *const blst_p2,
1150        zwire: *const byte,
1151    ) -> BLST_ERROR;
1152}
1153extern "C" {
1154    pub fn blst_aggregated_in_g1(out: *mut blst_fp12, signature: *const blst_p1_affine);
1155}
1156extern "C" {
1157    pub fn blst_aggregated_in_g2(out: *mut blst_fp12, signature: *const blst_p2_affine);
1158}
1159extern "C" {
1160    pub fn blst_core_verify_pk_in_g1(
1161        pk: *const blst_p1_affine,
1162        signature: *const blst_p2_affine,
1163        hash_or_encode: bool,
1164        msg: *const byte,
1165        msg_len: usize,
1166        DST: *const byte,
1167        DST_len: usize,
1168        aug: *const byte,
1169        aug_len: usize,
1170    ) -> BLST_ERROR;
1171}
1172extern "C" {
1173    pub fn blst_core_verify_pk_in_g2(
1174        pk: *const blst_p2_affine,
1175        signature: *const blst_p1_affine,
1176        hash_or_encode: bool,
1177        msg: *const byte,
1178        msg_len: usize,
1179        DST: *const byte,
1180        DST_len: usize,
1181        aug: *const byte,
1182        aug_len: usize,
1183    ) -> BLST_ERROR;
1184}
1185extern "C" {
1186    pub static BLS12_381_G1: blst_p1_affine;
1187}
1188extern "C" {
1189    pub static BLS12_381_NEG_G1: blst_p1_affine;
1190}
1191extern "C" {
1192    pub static BLS12_381_G2: blst_p2_affine;
1193}
1194extern "C" {
1195    pub static BLS12_381_NEG_G2: blst_p2_affine;
1196}
1197extern "C" {
1198    pub fn blst_fr_ct_bfly(x0: *mut blst_fr, x1: *mut blst_fr, twiddle: *const blst_fr);
1199}
1200extern "C" {
1201    pub fn blst_fr_gs_bfly(x0: *mut blst_fr, x1: *mut blst_fr, twiddle: *const blst_fr);
1202}
1203extern "C" {
1204    pub fn blst_fr_to(ret: *mut blst_fr, a: *const blst_fr);
1205}
1206extern "C" {
1207    pub fn blst_fr_from(ret: *mut blst_fr, a: *const blst_fr);
1208}
1209extern "C" {
1210    pub fn blst_fp_to(ret: *mut blst_fp, a: *const blst_fp);
1211}
1212extern "C" {
1213    pub fn blst_fp_from(ret: *mut blst_fp, a: *const blst_fp);
1214}
1215extern "C" {
1216    pub fn blst_fp_is_square(a: *const blst_fp) -> bool;
1217}
1218extern "C" {
1219    pub fn blst_fp2_is_square(a: *const blst_fp2) -> bool;
1220}
1221extern "C" {
1222    pub fn blst_p1_from_jacobian(out: *mut blst_p1, in_: *const blst_p1);
1223}
1224extern "C" {
1225    pub fn blst_p2_from_jacobian(out: *mut blst_p2, in_: *const blst_p2);
1226}
1227extern "C" {
1228    pub fn blst_sk_to_pk2_in_g1(
1229        out: *mut byte,
1230        out_pk: *mut blst_p1_affine,
1231        SK: *const blst_scalar,
1232    );
1233}
1234extern "C" {
1235    pub fn blst_sign_pk2_in_g1(
1236        out: *mut byte,
1237        out_sig: *mut blst_p2_affine,
1238        hash: *const blst_p2,
1239        SK: *const blst_scalar,
1240    );
1241}
1242extern "C" {
1243    pub fn blst_sk_to_pk2_in_g2(
1244        out: *mut byte,
1245        out_pk: *mut blst_p2_affine,
1246        SK: *const blst_scalar,
1247    );
1248}
1249extern "C" {
1250    pub fn blst_sign_pk2_in_g2(
1251        out: *mut byte,
1252        out_sig: *mut blst_p1_affine,
1253        hash: *const blst_p1,
1254        SK: *const blst_scalar,
1255    );
1256}
1257#[repr(C)]
1258#[repr(align(1))]
1259#[derive(Debug, Default)]
1260pub struct blst_uniq {
1261    pub _bindgen_opaque_blob: [u8; 0usize],
1262}
1263#[test]
1264fn bindgen_test_layout_blst_uniq() {
1265    assert_eq!(
1266        ::core::mem::size_of::<blst_uniq>(),
1267        0usize,
1268        concat!("Size of: ", stringify!(blst_uniq))
1269    );
1270    assert_eq!(
1271        ::core::mem::align_of::<blst_uniq>(),
1272        1usize,
1273        concat!("Alignment of ", stringify!(blst_uniq))
1274    );
1275}
1276extern "C" {
1277    pub fn blst_uniq_sizeof(n_nodes: usize) -> usize;
1278}
1279extern "C" {
1280    pub fn blst_uniq_init(tree: *mut blst_uniq);
1281}
1282extern "C" {
1283    pub fn blst_uniq_test(tree: *mut blst_uniq, msg: *const byte, len: usize) -> bool;
1284}
1285extern "C" {
1286    pub fn blst_expand_message_xmd(
1287        out: *mut byte,
1288        out_len: usize,
1289        msg: *const byte,
1290        msg_len: usize,
1291        DST: *const byte,
1292        DST_len: usize,
1293    );
1294}
1295extern "C" {
1296    pub fn blst_p1_unchecked_mult(
1297        out: *mut blst_p1,
1298        p: *const blst_p1,
1299        scalar: *const byte,
1300        nbits: usize,
1301    );
1302}
1303extern "C" {
1304    pub fn blst_p2_unchecked_mult(
1305        out: *mut blst_p2,
1306        p: *const blst_p2,
1307        scalar: *const byte,
1308        nbits: usize,
1309    );
1310}
1311extern "C" {
1312    pub fn blst_pairing_raw_aggregate(
1313        ctx: *mut blst_pairing,
1314        q: *const blst_p2_affine,
1315        p: *const blst_p1_affine,
1316    );
1317}
1318extern "C" {
1319    pub fn blst_pairing_as_fp12(ctx: *mut blst_pairing) -> *mut blst_fp12;
1320}
1321extern "C" {
1322    pub fn blst_bendian_from_fp12(out: *mut byte, a: *const blst_fp12);
1323}
1324extern "C" {
1325    pub fn blst_keygen_v3(
1326        out_SK: *mut blst_scalar,
1327        IKM: *const byte,
1328        IKM_len: usize,
1329        info: *const byte,
1330        info_len: usize,
1331    );
1332}
1333extern "C" {
1334    pub fn blst_keygen_v4_5(
1335        out_SK: *mut blst_scalar,
1336        IKM: *const byte,
1337        IKM_len: usize,
1338        salt: *const byte,
1339        salt_len: usize,
1340        info: *const byte,
1341        info_len: usize,
1342    );
1343}
1344extern "C" {
1345    pub fn blst_keygen_v5(
1346        out_SK: *mut blst_scalar,
1347        IKM: *const byte,
1348        IKM_len: usize,
1349        salt: *const byte,
1350        salt_len: usize,
1351        info: *const byte,
1352        info_len: usize,
1353    );
1354}
1355extern "C" {
1356    pub fn blst_derive_master_eip2333(out_SK: *mut blst_scalar, IKM: *const byte, IKM_len: usize);
1357}
1358extern "C" {
1359    pub fn blst_derive_child_eip2333(
1360        out_SK: *mut blst_scalar,
1361        SK: *const blst_scalar,
1362        child_index: u32,
1363    );
1364}
1365extern "C" {
1366    pub fn blst_scalar_from_hexascii(out: *mut blst_scalar, hex: *const byte);
1367}
1368extern "C" {
1369    pub fn blst_fr_from_hexascii(ret: *mut blst_fr, hex: *const byte);
1370}
1371extern "C" {
1372    pub fn blst_fp_from_hexascii(ret: *mut blst_fp, hex: *const byte);
1373}
1374extern "C" {
1375    pub fn blst_p1_sizeof() -> usize;
1376}
1377extern "C" {
1378    pub fn blst_p1_affine_sizeof() -> usize;
1379}
1380extern "C" {
1381    pub fn blst_p2_sizeof() -> usize;
1382}
1383extern "C" {
1384    pub fn blst_p2_affine_sizeof() -> usize;
1385}
1386extern "C" {
1387    pub fn blst_fp12_sizeof() -> usize;
1388}
1389extern "C" {
1390    pub fn blst_sha256(out: *mut byte, msg: *const byte, msg_len: usize);
1391}
1392#[test]
1393fn bindgen_test_normal_types() {
1394    // from "Rust for Rustaceans" by Jon Gjengset
1395    fn is_normal<T: Sized + Send + Sync + Unpin>() {}
1396    is_normal::<BLST_ERROR>();
1397    is_normal::<blst_scalar>();
1398    is_normal::<blst_fr>();
1399    is_normal::<blst_fp>();
1400    is_normal::<blst_fp2>();
1401    is_normal::<blst_fp6>();
1402    is_normal::<blst_fp12>();
1403    is_normal::<blst_p1>();
1404    is_normal::<blst_p1_affine>();
1405    is_normal::<blst_p2>();
1406    is_normal::<blst_p2_affine>();
1407    is_normal::<blst_pairing>();
1408    is_normal::<blst_uniq>();
1409}