• 0 Posts
  • 24 Comments
Joined 2 months ago
cake
Cake day: June 12th, 2025

help-circle
  • Yes, the WD Red line used to be for NAS use, but suddenly they started including SMR drives in their WD Red lineup, people got pissed because SMR isn’t a good fit for RAID setups which NASes usually are.

    WD continued the practice, but introduced the WD Red Pro line. So now regular WD Reds could be either CMR or SMR, but WD Red Pro are guaranteed to be CMR.

    In my opinion it’s still misleading to even brand the regular WD Red line as suitable for NAS use, but at least now you can specifically pick a drive that fits your needs.









  • These are great points, but there is something more that phones have going for them.

    All modern phones are full-disk encrypted by default, and can be remote wiped. I think this is only the case for Mac laptops, but not for Linux and Windows.

    So if your phone is stolen, it’s not really a risk of the thief having your password manager and your 2FA at the same time, but rather can they get in to your phone and then password manager and 2FA before you can trigger the remote wipe.

    Unless the attacker is sophisticated enough to mirror the whole disk and attack it offline.





  • The idea is that you could have your data stored encrypted, such that the entity that is storing your data can’t read any of your data, but can still make calculations or updates to your data without ever learning anything about your data.

    The use cases seems rather narrow to me, but there are probably many that I just can’t think of at the moment.

    One idea could be something like a VPN service that wants to store as little data about the customer as possible. They could keep the account balance in an encrypted format. When you then add money to the balance, they can increment your balance by however much you paid, without knowing what your old balance was or what the new balance is. And they could then have another homomorphic function that can check whether your balance is positive. If your balance is positive you are allowed onto the service, if it’s not positive you don’t get access. And the company wouldn’t be able to know whether you had $5 in your account or $5000, just that your balance is currently positive.

    So yeah fundamentally it’s just being able to store and update some data, while the data is fully encrypted, never decrypting the data, to ensure some form of privacy or confidentiality






  • Unittest in Python, enjoy! If you pass it with a function like the one in OPs picture, you have earned it.

    import unittest
    import random
    
    class TestOddEven(unittest.TestCase):
        def test_is_odd(self):
            for _ in range(100):
                num = random.randint(-2**63, 2**63 - 1)
    
                odd_num = num | 1
                even_num = num >> 1 << 1
    
                self.assertTrue(is_odd(odd_num))
                self.assertFalse(is_odd(even_num))
    
        def test_is_even(self):
            for _ in range(100):
                num = random.randint(-2**63, 2**63 - 1)
    
                odd_num = num | 1
                even_num = num >> 1 << 1
    
                self.assertTrue(is_even(even_num))
                self.assertFalse(is_even(odd_num))
    
    if __name__ == '__main__':
        unittest.main()
    

  • You are correct for regular hash functions, but a cryptographic hash function has stronger requirements.

    MD5 was supposed be a cryptographic hash function, but it was found to be flawed all the way back in 1996, and has been discouraged ever since… Now it’s too weak to be used in a cryptographic setting, and too slow to be used in non-cryptographic settings.

    This is why hashes like xxhash is considered a non-cryptographic hash function, while SHA-256 is considered a cryptographic hash function.