Skip to content

Commit

Permalink
[syscalls] Clean-up curve25519 msm length feature gate check (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto authored Apr 26, 2024
1 parent 1bd7406 commit 3e3b16c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions programs/bpf_loader/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1140,14 +1140,8 @@ declare_builtin_function!(
curve_syscall_traits::*, edwards, ristretto, scalar,
};

let restrict_msm_length = invoke_context
.feature_set
.is_active(&feature_set::curve25519_restrict_msm_length::id());
#[allow(clippy::collapsible_if)]
if restrict_msm_length {
if points_len > 512 {
return Err(Box::new(SyscallError::InvalidLength));
}
if points_len > 512 {
return Err(Box::new(SyscallError::InvalidLength));
}

match curve_id {
Expand Down

0 comments on commit 3e3b16c

Please sign in to comment.