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