• @xthexder@l.sw0.com
      link
      fedilink
      English
      1123 days ago

      Yes, but also no. We use giant prime numbers for cryptography because the more factors it has, the weaker the encryption becomes (because now there’s more than one answer for A * ? = B)

    • Wugmeister
      link
      fedilink
      English
      722 days ago

      This actually is the main application for 2-almost primes. For example, instead of having an arbitrarily large prime be used for the hash, you could use a very large 2-almost prime as a key with its factors being used as 2 layers of hashing. I know there’s better uses, but the more I try to learn about cryptography the more confused I get

    • Xavienth
      link
      fedilink
      English
      322 days ago

      Presumably if they’re the product of exactly two factors then those factors would have to be prime, otherwise it wouldn’t be exactly two.

      • @Dalvoron@lemm.ee
        link
        fedilink
        English
        2
        edit-2
        22 days ago

        Well primes themselves are the product of exactly two (natural) factors, only one of which is prime, so we need to specify semi primes as having exactly two prime factors.

        • Xavienth
          link
          fedilink
          English
          121 days ago

          The definitions often exclude 1. In the case where you include it you could then say a semi prime has exactly three factors.

          • @Dalvoron@lemm.ee
            link
            fedilink
            English
            221 days ago

            I have seen 1 called a trivial factor, but I have never seen it excluded entirely from a factor list: perhaps it’s a cultural thing like how 0 is/isn’t a natural number depending on where you are from.

            On further research it seems like my earlier critique about requiring exactly two prime factors is a little off in any case, as it would exclude e.g. 4 (which only has one prime factor). It seems like semi primes must be a product of exactly two prime numbers so I think any definition based on number of factors is doomed to over- or under- define these semi primes as they could have either three or four factors.