• 0x0@lemmy.zip
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    1
    ·
    17 hours ago

    Sure, bring back Crowdstrike, that went well…

    Btw I wasn’t aware XOR was encrytion…

    • Neverclear@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      16
      ·
      edit-2
      17 hours ago

      XOR cleartext once with a key you get ciphertext. XOR the ciphertext with the same key you get the original cleartext. At its core this is the way the old DES cipher works.

      A bit of useful trivia: If you XOR any number with itself, you get all zeros. You can see this in practice when an assembly programmer XOR’s a register with itself to clear it out.

      • Malfeasant@lemm.ee
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        11 hours ago

        an x86 assembly programmer

        Ftfy. not all CPUs have an xor register with itself instruction.

      • PetteriPano@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        13 hours ago

        Apple had this undocumented function for screenshotting back on iOS 3.1, and kind of let you use it while waiting for better frameworks in iOS 4.0

        At some point they started rejecting your app automatically if they found the symbol for that function in your app. I didn’t want to leave my 3.1 users in the dust for no reason, so I did the same trick to obfuscate the symbol name before dynamically linking it in.

        It worked right up until they stopped supporting iOS 3.1 completely.

      • Quazatron@lemmy.world
        link
        fedilink
        English
        arrow-up
        12
        ·
        17 hours ago

        That’s how it was done in the old days to save a few cycles in Z80 assembly. XOR A instead of LD A, 0.

    • atrielienz@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      17 hours ago

      It technically counts. It’s a cipher that uses the same key for encryption and decryption.

    • Zwuzelmaus@feddit.org
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      17 hours ago

      Btw I wasn’t aware XOR was encrytion…

      It’s even better than ROT13, because you always need to apply ROT13 twice for getting the good results…