Hohha Dynamic XOR Algorithm Source Code

The source code is moved to GitHub in order to work collaboratively:

https://github.com/ikizir/HohhaDynamicXOR/tree/master

Yorumlar

  1. Have you considered actually using version control? Maybe github or bitbucket or something? Posting code on a blog is just silly.

    YanıtlaSil
  2. OK Lucas, I am going to create a public repo on GITHUB

    YanıtlaSil
  3. Lucas:
    https://github.com/ikizir/HohhaDynamicXOR/tree/master

    YanıtlaSil
  4. Keep up the work, hope the edge cases that were brought up in the mailing list can be worked on.

    YanıtlaSil
  5. Thank you My8th
    Every comment, every idea, every criticism does count.
    It is "our" work. You are all welcome to participate

    YanıtlaSil
  6. So how do you encrypt and decrypt data with it?

    YanıtlaSil
  7. I am going to write the README file on GitHUB tomorrow. OK?

    YanıtlaSil
  8. I hope it works. It's all about combinations and distractions from retracing path of sets.

    YanıtlaSil
  9. Operation

    M = (M ^ Body[M]) & BodyMask;

    will clear all bits save those present in Bodymask, whcih is length of plainetxt minus 1.

    In other words, you only use no more than 2**(bitnum) positions in Body array, where bitnum is a number of bits in binary representation of BodyMask.

    Imagine that BodMask is, say, 0x10000000. That means your algorithm only chooses one of two (!!!) positions on Body array. Is it what you really mean to do?

    Have you put your algorithm to real statistical tests, analyzing its real complexity and reliabilty?

    YanıtlaSil
  10. Thank you Konstantin, for your attention.
    I am going to fix it.
    That's why I put it into public domain. We see each other's mistakes.

    YanıtlaSil
  11. Thank you Konstantin. I've fixed it.
    But it was only affecting the key coverage.
    Clearing the key body bytes == BodyMask is a desirable situation, since, in the next round it will be updated again.
    The key is dynamically updated during the process. Clearing it is a very natural and desired situation.
    You can download the code, run the tests and see the randomness with trying different bmp.
    And no, I haven't applied any statistical tests or analysis.
    I opened it to public as a programmer toy to improve it together.
    Thank you again.

    YanıtlaSil
  12. Konstantin: I've fixed the code with + op instead of XOR but, I think it will be better to leave it as it is, I mean XOR and limit the max. key body size to 256 bytes.
    What do you think?

    YanıtlaSil
  13. Hello Ismail,

    On Github, I see the same code where BodyMask is ANDed (&), thus the same problem with reducing indices amount.

    Perhaps you means something like

    M = (M ^ LastCipherTextVal) % BodyMask;

    instead of

    M = (M ^ LastCipherTextVal) & BodyMask;

    but please reflect the change in all the functions on GitHub.

    I haven't run serious code investigation so far, but please take into account the following:

    1. The operation

    LastPlainTextVal&(SALT_SIZE-1)

    should perhaps be replaced with

    LastPlainTextVal % SALT_SIZE

    (see the problen with BodyMask for erason why

    2. Studies should be made, whether the algorithm can be attacekd with rainbox tables-like approach (percomputed tables), especially if part of plaintext is known.

    That is, thorough tests should be made before you offer your algorithm to the wide public. It could be sad if major vulnerability to simple attacks could be found.

    I also recommend communicating with me over email, since comments here are inconvenient means, to me.

    Good luck.

    YanıtlaSil
  14. Thank you Konstantin,
    I really appreciate your help.
    I haven't your e-mail address. So I am writing here. Send your e-mail address to ikizir@gmail.com. We may continue privately.

    First time you showed me that code part, I just changed the code to + instead of ^.
    But the overall speed has decreased.
    Then, I decided to leave it as it is and limit the max. keysize to 256 bytes(which is 2048 bits) and then leave the lines as they are.
    2048 bit key size is really huge for a symmetrical algorithm. If someone needs longer keys, I can show him/her how to modify the code in order to do that.

    I am using & instead of % because & is doing the same thing % does and much much much faster than % if:
    BodyMask is a Mersenne Number
    And the BodyMask is always guaranteed to be a Mersenne number. Because we force user to choose a key length which is a power of 2!
    Using & instead of % is one of key optimization techniques of the code.

    YanıtlaSil
  15. Responded by email.

    Good luck!

    YanıtlaSil
  16. Bu yorum bir blog yöneticisi tarafından silindi.

    YanıtlaSil
  17. Bu yorum bir blog yöneticisi tarafından silindi.

    YanıtlaSil

Yorum Gönder

Bu blogdaki popüler yayınlar

Visual proofs of Hohha Dynamic XOR Encryption Algorithm