Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SoraSuegami/halo2-rsa
/ functions
Functions
78 in github.com/SoraSuegami/halo2-rsa
⨍
Functions
78
◇
Types & classes
23
↓ 41 callers
Method
limb
Returns indexed limb as [`Value<F>`]. # Arguments idx - the index of the limb to retrieve. # Return values Returns the specified limb as [`Value<F>`
src/big_integer/mod.rs:294
↓ 33 callers
Method
main_gate
Getter for [`MainGate`].
src/big_integer/chip.rs:1193
↓ 30 callers
Method
num_limbs
Returns the number of the limbs.
src/big_integer/mod.rs:299
↓ 25 callers
Method
assign_constant
Generic function to assign a constant integer.
src/big_integer/chip.rs:1252
↓ 6 callers
Method
bigint_chip
Getter for [`BigIntChip`].
src/chip.rs:224
↓ 6 callers
Method
range_chip
Getter for [`RangeChip`].
src/big_integer/chip.rs:1188
↓ 6 callers
Method
sub
Given two inputs `a,b`, performs the subtraction `a - b`. # Arguments `ctx` - a region context. `a` - input of subtraction. `b` - input of subtractio
src/big_integer/chip.rs:310
↓ 5 callers
Method
add
Given two inputs `a,b`, performs the addition `a + b`. # Arguments `ctx` - a region context. `a` - input of addition. `b` - input of addition. # Ret
src/big_integer/chip.rs:245
↓ 5 callers
Method
assigned_val
Returns the witness value as [`AssignedValue<F>`].
src/big_integer/mod.rs:258
↓ 5 callers
Method
to_big_uint
Returns the witness value as [`Value<BigUint>`]. # Arguments width - bit length of each limb. # Return values Returns the witness value as [`Value<B
src/big_integer/mod.rs:348
↓ 4 callers
Method
assert_zero
Asserts that that `a` is zero or not. # Arguments `ctx` - a region context. `a` - input of comparison. # Return values Reutrns [`Error`] if `a!=0`.
src/big_integer/chip.rs:1016
↓ 4 callers
Method
extend_limbs
Increases the number of the limbs by adding the given [`AssignedValue<F>`] representing zero. # Arguments num_extend_limbs - the number of limbs to a
src/big_integer/mod.rs:375
↓ 4 callers
Method
limbs
Returns assigned limbs.
src/big_integer/mod.rs:321
↓ 4 callers
Method
mul
Given two inputs `a,b`, performs the multiplication `a - b`. # Arguments `ctx` - a region context. `a` - input of multiplication. `b` - input of mult
src/big_integer/chip.rs:386
↓ 3 callers
Method
assign_integer
Assigns a variable [`AssignedInteger`] whose [`RangeType`] is [`Fresh`]. # Arguments `ctx` - a region context. `integer` - a variable integer to assi
src/big_integer/chip.rs:62
↓ 3 callers
Method
div_mod_main_gate
Given a integer `a` and a divisor `n`, performs `a/n` and `a mod n`. # Panics Panics if `n=0`.
src/big_integer/chip.rs:1323
↓ 3 callers
Method
is_less_than
Returns an assigned bit representing whether `a` is less than `b` (`a<b`). # Arguments `ctx` - a region context. `a` - input of comparison. `b` - inp
src/big_integer/chip.rs:908
↓ 3 callers
Method
is_less_than_or_equal
Returns an assigned bit representing whether `a` is less than or equal to `b` (`a<=b`). # Arguments `ctx` - a region context. `a` - input of comparis
src/big_integer/chip.rs:932
↓ 3 callers
Method
is_zero
Returns an assigned bit representing whether `a` is zero or not. # Arguments `ctx` - a region context. `a` - input of comparison. # Return values Re
src/big_integer/chip.rs:754
↓ 3 callers
Method
main_gate
Getter for [`MainGate`].
src/chip.rs:238
↓ 3 callers
Method
mul_mod
Given two inputs `a,b` and a modulus `n`, performs the modular multiplication `a * b mod n`. # Arguments `ctx` - a region context. `a` - input of mul
src/big_integer/chip.rs:542
↓ 3 callers
Method
without_witnesses
(&self)
examples/rsa_example.rs:53
↓ 2 callers
Method
is_equal_fresh
Returns an assigned bit representing whether `a` and `b` are equivalent, whose [`RangeType`] is [`Fresh`]. # Arguments `ctx` - a region context. `a`
src/big_integer/chip.rs:780
↓ 2 callers
Method
new_assigned_integer
Creates a new [`AssignedInteger`] from its limb representation. # Arguments limbs - the assigned limbs of the integer. # Return values Returns a new
src/big_integer/chip.rs:1205
↓ 2 callers
Method
range_chip
Getter for [`RangeChip`].
src/chip.rs:233
↓ 2 callers
Method
square_mod
Given a input `a` and a modulus `n`, performs the modular square `a^2 mod n`. # Arguments `ctx` - a region context. `a` - input of square. `n` - a mo
src/big_integer/chip.rs:642
↓ 2 callers
Method
sub_unchecked
Given two inputs `a,b` (`a>=b`), performs the subtraction `a - b`. # Panics Panics if `a<b`.
src/big_integer/chip.rs:1286
↓ 1 callers
Method
assert_equal_fresh
Asserts that `a` and `b` are equivalent, whose [`RangeType`] is [`Fresh`]. # Arguments `ctx` - a region context. `a` - input of comparison whose type
src/big_integer/chip.rs:1034
↓ 1 callers
Method
assert_equal_muled
Asserts that `a` and `b` are equivalent, whose [`RangeType`] is [`Muled`]. # Arguments `ctx` - a region context. `a` - input of comparison whose type
src/big_integer/chip.rs:1053
↓ 1 callers
Method
assert_in_field
Asserts that `a` is in the order-`n` finite field. # Arguments `ctx` - a region context. `a` - input of comparison. `n` - a modulus. # Return values
src/big_integer/chip.rs:1150
↓ 1 callers
Method
assign_constant_fresh
Assigns a constant [`AssignedInteger`] whose [`RangeType`] is [`Fresh`]. # Arguments `ctx` - a region context. `integer` - a constant integer to assi
src/big_integer/chip.rs:95
↓ 1 callers
Method
assign_public_key
Assigns a [`AssignedRSAPublicKey`]. # Arguments `ctx` - a region context. `public_key` - a RSA public key to assign. # Return values Returns a new [
src/chip.rs:58
↓ 1 callers
Method
assign_signature
Assigns a [`AssignedRSASignature`]. # Arguments `ctx` - a region context. `signature` - a RSA signature to assign. # Return values Returns a new [`A
src/chip.rs:80
↓ 1 callers
Method
is_equal_muled
Returns an assigned bit representing whether `a` and `b` are equivalent, whose [`RangeType`] is [`Muled`]. # Arguments `ctx` - a region context. `a`
src/big_integer/chip.rs:822
↓ 1 callers
Method
is_greater_than
Returns an assigned bit representing whether `a` is greater than `b` (`a>b`). # Arguments `ctx` - a region context. `a` - input of comparison. `b` -
src/big_integer/chip.rs:954
↓ 1 callers
Method
is_greater_than_or_equal
Returns an assigned bit representing whether `a` is greater than or equal to `b` (`a>=b`). # Arguments `ctx` - a region context. `a` - input of compa
src/big_integer/chip.rs:976
↓ 1 callers
Method
is_in_field
Returns an assigned bit representing whether `a` is in the order-`n` finite field. # Arguments `ctx` - a region context. `a` - input of comparison. `
src/big_integer/chip.rs:998
↓ 1 callers
Method
max_value
Assigns the maximum integer whose number of limbs is `num_limbs`. # Arguments `ctx` - a region context. `num_limbs` - the number of limbs. # Return
src/big_integer/chip.rs:138
↓ 1 callers
Method
modpow_public_key
Given a base `x`, a RSA public key (e,n), performs the modular power `x^e mod n`. # Arguments `ctx` - a region context. `x` - a base integer. `public
src/chip.rs:99
↓ 1 callers
Method
pow_mod
Given a base `a`, a variable exponent `e`, and a modulus `n`, performs the modular power `a^e mod n`. # Arguments `ctx` - a region context. `a` - inp
src/big_integer/chip.rs:664
↓ 1 callers
Method
pow_mod_fixed_exp
Given a base `a`, a fixed exponent `e`, and a modulus `n`, performs the modular power `a^e mod n`. # Arguments `ctx` - a region context. `a` - input
src/big_integer/chip.rs:710
↓ 1 callers
Method
replace_limb
Replaces the specified limb to the given value. # Arguments idx - index of the modified limb. limb - new limb.
src/big_integer/mod.rs:366
↓ 1 callers
Method
rsa_chip
(&self, config: RSAConfig)
examples/rsa_example.rs:41
↓ 1 callers
Method
sha256_chip
(&self, config: Sha256Config)
examples/rsa_example.rs:44
↓ 1 callers
Method
verify_pkcs1v15_signature
Given a RSA public key, signed message bytes, and a pkcs1v15 signature, verifies the signature with SHA256 hash function. # Arguments layouter - a la
src/lib.rs:183
Method
add_mod
Given two inputs `a,b` and a modulus `n`, performs the modular addition `a + b mod n`. # Arguments `ctx` - a region context. `a` - input of addition
src/big_integer/chip.rs:452
Method
assert_greater_than
Asserts that `a` is greater than `b` (`a>b`). # Arguments `ctx` - a region context. `a` - input of comparison. `b` - input of comparison. # Return v
src/big_integer/chip.rs:1112
Method
assert_greater_than_or_equal
Asserts that `a` is greater than or equal to `b` (`a>=b`). # Arguments `ctx` - a region context. `a` - input of comparison. `b` - input of comparison
src/big_integer/chip.rs:1131
Method
assert_less_than
Asserts that `a` is less than `b` (`a<b`). # Arguments `ctx` - a region context. `a` - input of comparison. `b` - input of comparison. # Return valu
src/big_integer/chip.rs:1074
Method
assert_less_than_or_equal
Asserts that `a` is less than or equal to `b` (`a<=b`). # Arguments `ctx` - a region context. `a` - input of comparison. `b` - input of comparison.
src/big_integer/chip.rs:1093
Method
assign_constant_muled
Assigns a constant [`AssignedInteger`] whose [`RangeType`] is [`Muled`]. # Arguments `ctx` - a region context. `integer` - a constant integer to assi
src/big_integer/chip.rs:119
Function
bench_pkcs1v15_1024_disabled
(c: &mut Criterion)
benches/bench.rs:393
Function
bench_pkcs1v15_1024_enabled
(c: &mut Criterion)
benches/bench.rs:379
Function
big_pow_mod
(a: &BigUint, b: &BigUint, n: &BigUint)
src/big_integer/utils.rs:2
Method
bits_size
Returns the fewest bits necessary to express the [`BigUint`].
src/big_integer/chip.rs:1352
Method
compute_mul_word_max
Returns the maximum limb size of [`Muled`] type integers.
src/big_integer/chip.rs:1368
Method
compute_range_lens
Returns the bit length parameters necessary to configure the [`RangeChip`]. # Arguments num_limbs - the default number of limbs of [`Fresh`] integers
src/chip.rs:249
Method
compute_range_lens
Returns the bit length parameters necessary to configure the [`RangeChip`]. # Arguments limb_width - the bit length of [`Fresh`] limbs. num_limbs - t
src/big_integer/chip.rs:1220
Method
configure
(meta: &mut ConstraintSystem<F>)
examples/rsa_example.rs:57
Method
from
[`AssignedLimb`] can be also represented as [`AssignedValue`].
src/big_integer/mod.rs:240
Function
main
()
examples/rsa_example.rs:147
Method
new
Creates new [`RSAConfig`] from [`BigIntConfig`]. # Arguments bigint_config - a configuration for [`BigIntChip`]. # Return values Returns new [`RSACo
src/chip.rs:32
Method
new
Creates new [`RSAPublicKey`] from `n` and `e`. # Arguments n - an integer of `n`. e - a parameter `e`. # Return values Returns new [`RSAPublicKey`].
src/lib.rs:59
Method
new
Creates new [`BigIntConfig`] from [`RangeConfig`] and [`MainGateConfig`]. # Arguments range_config - a configuration for [`RangeChip`]. main_gate_con
src/big_integer/chip.rs:33
Method
new
Creates a new [`AssignedInteger`]. # Arguments limbs - a vector of [`AssignedLimb`]. # Return values Returns a new [`AssignedInteger`].
src/big_integer/mod.rs:316
Method
refresh
Converts a [`Muled`] type integer to a [`Fresh`] type integer. # Arguments `ctx` - a region context. `a` - an assigned integer whose type is [`Assign
src/big_integer/chip.rs:168
Method
square
Given a inputs `a`, performs the square `a^2`. # Arguments `ctx` - a region context. `a` - input of square. # Return values Returns the square resul
src/big_integer/chip.rs:431
Method
sub_mod
Given two inputs `a,b` and a modulus `n`, performs the modular subtraction `a - b mod n`. # Arguments `ctx` - a region context. `a` - input of subtra
src/big_integer/chip.rs:495
Method
sublimb_bit_len
Returns the bit length of the sublimb necessary to check the range of the `bit_len_limb`-bits integer with [`RangeChip`].
src/big_integer/chip.rs:1357
Method
synthesize
( &self, config: Self::Config, mut layouter: impl halo2wrong::halo2::circuit::Layouter
examples/rsa_example.rs:84
Function
test_debug_and_clone_traits
()
src/big_integer/mod.rs:490
Function
test_refresh_aux_random
()
src/big_integer/mod.rs:513
Function
test_unimplemented
()
src/big_integer/chip.rs:3327
Function
test_unimplemented1
()
src/chip.rs:592
Function
test_unimplemented2
()
src/chip.rs:834
Method
to_muled
Converts the [`RangeType`] from [`Fresh`] to [`Muled`].
src/big_integer/mod.rs:263
Method
verify_pkcs1v15_signature
Given a RSA public key, a message hashed with SHA256, and a pkcs1v15 signature, verifies the signature with the public key and the hashed messaged. #
src/chip.rs:128
Method
without_witness
(num_limbs: usize, fix_e: BigUint)
src/lib.rs:63