Unsigned

Our unsigned types actually come in a few different flavors, depending on the number of bits you need. Just like the crypto_bigint::Uint type, you can specify however many word-sized limbs you need for your computation:

struct Unsigned<const LIMBS: usize>;

and we provide a few type synonyms for common bit sizes (Unsigned64, Unsigned128, Unsigned256, and Unsigned512).

These unsigned types allow you to perform integer arithmetic as follows (recall that at least one operand must be a ciphertext):

operationoperand
addciphertext, plaintext, Uint<LIMBS> literal, u64 literal
subciphertext, plaintext, Uint<LIMBS> literal, u64 literal
mulciphertext, plaintext, Uint<LIMBS> literal, u64 literal