Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-35913: Debug
component_function
in S-box Module and Add the S-bo…
…x of WARP Block Cipher <!-- Please provide a concise, informative and self-explanatory title. --> <!-- Don't put issue numbers in the title. Put it in the Description below. --> <!-- For example, instead of "Fixes #12345", use "Add a new method to multiply two integers" --> ### 📚 Description <!-- Describe your changes here in detail. --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> 1- Debugging `component_function` in sbox module: - The `from_bits(self, x, n=None)` function is invoked within the `component_function` of the Sbox class. When the `input_size` and `output_size` of the S-box differ, the `from_bits` function operates correctly if the `n` argument is specified. However, the current implementation of the `component_function` calls `from_bits` without setting the `n` argument. Consequently, calling the `component_function` of the Sbox class with differing `input_size` and `output_size` results in an error. - To resolve this issue, we only need to pass the argument `n` into the `from_bits` functions inside the `component_function`. 2- Adding the s-box of WARP to s-box suite of SageMath - I have added the S-box of the WARP block cipher to SageMath. WARP is a block cipher that follows the Generalized Feistel Structure (GFS) and was proposed as a lightweight alternative to AES-128 in SAC 2022. You can find more information about WARP in [[1]](https://link.springer.com/chapter/10.1007/978-3-030-81652-0_21). - This addition is necessary to keep the S-box suite of SageMath up to date and allows cryptographers to analyze the S-box of WARP using SageMath. - Fortunately, this update doesn't require any changes to the documentation. I only needed to make a minor update in the comment section, which I have already done. [1] - https://link.springer.com/chapter/10.1007/978-3-030-81652-0_21 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies This change does not rely on any dependencies. <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35913 Reported by: Hosein Hadipour Reviewer(s): grhkm21
- Loading branch information