Skip to main content

airbender_crypto/
raw_delegation_interface.rs

1use super::BigIntOps;
2
3/// # Safety
4///
5/// Requires pointers to be 32-byte alligned, and point to RAM based allocation of at least 32 byte size
6#[inline(always)]
7pub unsafe fn bigint_op_delegation_raw(a: *mut (), b: *const (), op: BigIntOps) -> u32 {
8    crate::bigint_delegation::delegation::bigint_op_delegation_with_carry_bit(
9        a.cast(),
10        b.cast(),
11        false,
12        op,
13    )
14}
15
16/// # Safety
17///
18/// Requires pointers to be 32-byte alligned, and point to RAM based allocation of at least 32 byte size
19#[inline(always)]
20pub unsafe fn bigint_op_delegation_with_carry_bit_raw(
21    a: *mut (),
22    b: *const (),
23    carry: bool,
24    op: BigIntOps,
25) -> u32 {
26    crate::bigint_delegation::delegation::bigint_op_delegation_with_carry_bit(
27        a.cast(),
28        b.cast(),
29        carry,
30        op,
31    )
32}