Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ssic_idea
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
dario.genga
ssic_idea
Commits
87166d8a
Commit
87166d8a
authored
3 years ago
by
dario.genga
Browse files
Options
Downloads
Patches
Plain Diff
Add methods to implements
parent
395d00ef
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+47
-0
47 additions, 0 deletions
main.py
with
47 additions
and
0 deletions
main.py
+
47
−
0
View file @
87166d8a
...
...
@@ -5,7 +5,54 @@ Date : 2022
"""
def
add_mod
(
a
,
b
):
pass
def
mul_mod
(
a
,
b
):
pass
def
xor
(
a
,
b
):
pass
def
modulo
(
a
,
b
):
# euclide
pass
def
create_key_tables
():
pass
def
round
():
# 1. Multiply X1 and the first subkey Z1
# 2. Add X2 and the second subkey Z2
# 3. Add X3 and the third subkey Z3
# 4. Multiply X4 and the fourth subkey Z4
# Don't do the next steps if this is the final round
# 5. Bitwise XOR the results of steps 1 and 3
# 6. Bitwise XOR the results of steps 2 and 4
# 7. Multiply the result of step 5 and the fifth subkey Z5
# 8. Add the results of step 6 and 7
# 9. Multiply the result of step 8 and the sisth subkey Z6
# 10. Add the results of steps 7 and 9
# 11. Bitwise XOR the results of steps 1 and 9
# 12. Bitwise XOR the results of steps 3 and 9
# 13. Bitwise XOR the results of steps 2 and 10
# 14. Bitwise XOR the results of steps 4 and 10
pass
def
main
():
plaintext
=
1001110010101100
key
=
11011100011011110011111101011001
expected_ciphertext
=
1011101101001011
print
(
"
hello world
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment