• InfiniteStruggle@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        ·
        3 years ago

        When playing football, to keep the socks from riding down our legs, we used to put loose rubber bands on top of them, near the top of the sock. Then to avoid the rubberbands from riding up above the sockline, we used to fold the sock over the rubberbands downwards. Then to avoid the fold from being undone during play another rubberband had to be put on top of the folded part.

        Sounds similar to this. Just thought it was notable.

    • Aceticon@lemmy.world
      link
      fedilink
      arrow-up
      37
      ·
      3 years ago

      Nah, you just XOR the data with itself and it becomes uncrackable.

      Also after encryption like this the result can be compressed down to 4 bytes as long as the data is not larger than around 4Gb, 8 bytes if you need more.

      • CoderKat@lemm.ee
        link
        fedilink
        English
        arrow-up
        17
        ·
        3 years ago

        My god, that is absolute perfect encryption (completely uncrackable by brute force) and compression. This is genius and I’m gonna switch all my data to this encryption scheme. Now I just need somewhere to store the decryption keys…

    • tvbusy@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      29
      ·
      3 years ago

      Encrypt then sign. Verification is often much faster than (or at worst as fast as) decryption. Signature can also be verified without decryption key, making it possible to verify the data along the way.

  • bioemerl@kbin.social
    link
    fedilink
    arrow-up
    12
    ·
    3 years ago

    Don’t compress encrypted data since it opens you up to attacks like CRIME, unless it’s at rest and static data.

    • LostXOR@kbin.social
      link
      fedilink
      arrow-up
      20
      ·
      3 years ago

      Encrypted data compresses much worse than non-encrypted data, so it does matter in terms of size.

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      5
      ·
      3 years ago

      It really does. Apparently-random data can’t be compressed at all, by the pigeonhole principle.

      I mean, you could run it through whatever algorithm for fun, but it won’t accomplish anything.