Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build generic sat model #280

Merged
merged 31 commits into from
Sep 24, 2024
Merged

Build generic sat model #280

merged 31 commits into from
Sep 24, 2024

Conversation

juaninf
Copy link
Collaborator

@juaninf juaninf commented Sep 19, 2024

This branch introduces two features:

  • The ability for users to create heterogeneous models. Users can now specify how individual components within a system are modeled. For example, in the case of a cipher with six components, the user can define that components 1, 2, and 3 will be modeled using the regular SAT XOR differential model, while components 4, 5, and 6 will be modeled with the SAT truncated deterministic model. This provides flexibility for customizing the modeling approach for different components of a cipher.

  • Based on the previous point, we created a class that help to find probabilistic truncated models combining the regular xor differential SAT model and the deterministic bitwise truncated SAT model.

juaninf added 23 commits August 11, 2024 11:45
This feature introduces the ability for users to create
heterogeneous models. Users can now specify how individual
components within a system are modeled. For example, in
the case of a cipher with six components, the user can
define that components 1, 2, and 3 will be modeled using the
regular SAT XOR differential model, while components 4, 5,
and 6 will be modeled with the SAT truncated deterministic
model. This provides flexibility for customizing the modeling
approach for different parts of a cipher.
Adding build_generic_sat_model to sat_model. This feature will allow
users create heterogeneous SAT models. For example, combining regular
xor differential models and bitwise truncated xor differential
deterministic models.
Adding constraints to connect the regular and truncated xor differential models.
Synchronizing file claasp/components/modular_component.py with develop.
Removed the hardcoded dummy variable string dummy_hw_0 in the
_sequential_counter method to improve flexibility. Previously, users
encountered issues when combining two types of modeling that used this
method, as the hardcoded value caused the variable to be common across
both models. With this change, the variable can now be assigned
different values, resolving the conflict.
Reverting change on
claasp/cipher_modules/models/sat/sat_models/sat_bitwise_deterministic_truncated_xor_differential_model.py
- Refactored fix_variables_value_constraints method in both classes
  SatModel and SatBitwiseDeterministicTruncatedXorDifferentialModel to
  static methods, as the 'self' parameter was not being used.
- This allows class SatRegularAndDeterministicXorTruncatedDifferential
  to call fix_variables_value_constraints selectively from either class
  fix_variables_value_constraints or class
  SatBitwiseDeterministicTruncatedXorDifferentialModel, ensuring
  appropriate behavior for different subsets of components within the
  model.
@juaninf juaninf requested a review from peacker September 19, 2024 09:41
Adding test for SatRegularAndDeterministicXorTruncatedDifferential.
Specifically, adding a test for Aradi cipher reduced to 4 rounds.
- Renaming sat_regular_and_deterministic_xor_truncated_differential_model to sat_probabilistic_xor_truncated_differential_model
- Removing comments
Refactored SatProbabilisticXorTruncatedDifferential to inherit from
SatXorDifferentialModel for improved structure and code reuse.
Changing name of class from SatProbabilisticXorTruncatedDifferential to
SatProbabilisticXorTruncatedDifferentialModel.
Copy link

@peacker peacker merged commit 28f6e99 into develop Sep 24, 2024
9 checks passed
@peacker peacker deleted the build_generic_sat_model branch September 24, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants