Skip to content

Add Affine Cracker#483

Merged
SkeletalDemise merged 12 commits intobee-san:masterfrom
Ozzyz:feature/add_affine_cracker
Oct 10, 2020
Merged

Add Affine Cracker#483
SkeletalDemise merged 12 commits intobee-san:masterfrom
Ozzyz:feature/add_affine_cracker

Conversation

@Ozzyz
Copy link
Copy Markdown
Contributor

@Ozzyz Ozzyz commented Oct 5, 2020

Fixes #346
Heya 👋
This is my first PR to Ciphey, so please add as much input/feedback as possible!
The test case is functioning on my end

About the Cracker

This cracks the affine cipher, which has two keys, namely a, and b. The Caesar Cipher is a special version of the affine cipher with a=1 and b=the shift.
This verison of the affine cracker is written in Python, as the number of possible keys are very small. For an alfabet of length 26, there are 312 keys (since a has to be coprime to 26).

TODO:

There remain some minor cleanup, but I am writing this PR now so that you have time to give some feedback while I fix these small issues.
Things I am aware of that needs fixing:

  • Remove certain log messages that give little info
  • Add some more log messagees
  • Clean up code
  • Add some missing type hinting

Questions:

  1. Should i preserve special characters? This is useful when the affine cipher has been used in a flag-format.
  2. Is there any specific format i should return keyinfo CrackResult? Could not find info about this in the docs.
    Looking forward to your feedback :)

@Snails-Of-Wrath
Copy link
Copy Markdown

Haven’t tested it yet, but good job with the comments! Makes maintaining so much easier. Thank you!

@bee-san
Copy link
Copy Markdown
Owner

bee-san commented Oct 5, 2020

Can you make this a draft please? :) I'll check it out in a second

@Ozzyz Ozzyz marked this pull request as draft October 5, 2020 11:28
@Ozzyz
Copy link
Copy Markdown
Contributor Author

Ozzyz commented Oct 5, 2020

@Mr-Salme thanks! Code is meant to be read : )

@bee-san
Copy link
Copy Markdown
Owner

bee-san commented Oct 5, 2020

Make sure to resolve conflicts too when you make this not-a-draft :)

@Ozzyz Ozzyz marked this pull request as ready for review October 5, 2020 14:07
@Ozzyz Ozzyz requested a review from bee-san October 5, 2020 14:17
@bee-san
Copy link
Copy Markdown
Owner

bee-san commented Oct 6, 2020

Is this PR ready? @SkeletalDemise anything you want to do?

@Ozzyz
Copy link
Copy Markdown
Contributor Author

Ozzyz commented Oct 7, 2020

Personally I think it is ready, but I'd prefer if some took a real close look at it - seeing that this is my first PR : )

@Ozzyz Ozzyz requested a review from SkeletalDemise October 9, 2020 08:05
@bee-san bee-san self-requested a review October 9, 2020 11:22
@SkeletalDemise SkeletalDemise merged commit 069213e into bee-san:master Oct 10, 2020
@SkeletalDemise
Copy link
Copy Markdown
Contributor

@all-contributors please add @Ozzyz for code

@allcontributors
Copy link
Copy Markdown
Contributor

@SkeletalDemise

I've put up a pull request to add @Ozzyz! 🎉

@bee-san
Copy link
Copy Markdown
Owner

bee-san commented May 20, 2021

Hey we're changing from MIT to GPLv3 because some of our projects are licensed with that, do you approve? If you do not approve we will be forced to delete your code and rewrite it 😢

By approving of this change, you are agreeing to re-license the code you wrote under GPLv3.

@Ozzyz
Copy link
Copy Markdown
Contributor Author

Ozzyz commented May 20, 2021

@bee-san I approve

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.

Add affine cracker

4 participants