this post was submitted on 20 Jul 2024
1624 points (98.6% liked)

linuxmemes

21393 readers
2032 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] cygnus@lemmy.ca 225 points 4 months ago

    Replying to a 10-year-old tweet is a power move in itself.

    [–] Grass@sh.itjust.works 113 points 4 months ago* (last edited 4 months ago) (6 children)

    this is gold yet I don't know anyone who would get it that I can share it with

    [–] FlyingSquid@lemmy.world 31 points 4 months ago* (last edited 4 months ago)

    I just shared it with a bunch of people while also telling them that I didn't care if they didn't get it and I wasn't going to explain it.

    They're used to this.

    Edit: 2 of them got it. That's pretty good for me. I've played to smaller crowds.

    [–] devfuuu@lemmy.world 11 points 4 months ago

    That's why we come to the internet. Real life people suck.

    [–] Rai@lemmy.dbzer0.com 5 points 4 months ago

    I have exactly one person and they loved it.

    load more comments (3 replies)
    [–] slazer2au@lemmy.world 91 points 4 months ago (5 children)

    I wonder if you string together enough words can it be a valid key?

    [–] cm0002@lemmy.world 109 points 4 months ago (6 children)

    I would hope so, sentences and words are some of the most secure passwords/phrases you can use

    [–] bjorney@lemmy.ca 28 points 4 months ago* (last edited 4 months ago) (11 children)

    Words are the least secure way to generate a password of a given length because you are limiting your character set to 26, and character N gives you information about the character at position N+1

    The most secure way to generate a password is to uniformly pick bytes from the entire character set using a suitable form of entropy

    Edit: for the dozens of people still feeling the need to reply to me: RSA keys are fixed length, and you don't need to memorize them. Using a dictionary of words to create your own RSA key is intentionally kneecapping the security of the key.

    [–] laurelraven@lemmy.blahaj.zone 53 points 4 months ago (4 children)

    That's only really true if you're going to be storing the password in a secure vault after randomly generating it; otherwise, it's terrible because 1) nobody will be able to remember it so they'll be writing it down, and 2) it'll be such a pain to type that people will find ways to circumvent it at every possible turn

    Pass phrases, even when taken with the idea that it's a limited character set that follows a semi predictable flow, if you look at it in terms of the number of words possible it actually is decently secure, especially if the words used are random and not meaningful to the user. Even limiting yourself to the 1000 most common words in the English language and using 4 words, that's one trillion possible combinations without even accounting for modifying capitalisation, adding a symbol or three, including a short number at the end...

    And even with that base set, even if a computer could theoretically try all trillion possibilities quickly, it'll make a ton of noise, get throttled, and likely lock the account out long before it has a chance to try even the tiniest fraction of them

    Your way is theoretically more secure, but practically only works for machines or with secure password storage. If it's something a human needs to remember and type themselves, phrases of random words is much more viable and much more likely to be used in a secure fashion.

    [–] hedgehog@ttrpg.network 11 points 4 months ago (1 children)

    Generally people don’t memorize private keys, but this is applicable when generating pass phrases to protect private keys that are stored locally.

    Leaving this here in case anyone wants to use this method: https://www.eff.org/dice

    [–] kautau@lemmy.world 4 points 4 months ago (1 children)

    And if you don’t feel like using physical dice:

    https://diceware.rempe.us/#eff

    [–] hedgehog@ttrpg.network 2 points 4 months ago

    Thanks for that! I recommend anyone who wants to minimize risk to follow their instructions for self-hosting:

    Is the source code available and can I run my own copy locally?

    Yes! The source code is available on Github. Its a simple static HTML application and you can clone and run it by opening the index.html file in your browser. When run locally it should work when your computer is completely offline. The latest commits in the git repository are signed with my public code signing key.

    [–] bjorney@lemmy.ca 5 points 4 months ago (2 children)

    We are talking about RSA though, so there is a fixed character length and it isn't meant to be remembered because your private key is stored on disk.

    Yes the word method is better than a random character password when length is unbounded, but creating secure and memorable passwords is a bit of an oxymoron in today's date and age - if you are relying on remembering your passwords that likely means you are reusing at least some of them, which is arguably one of the worst things you can do.

    [–] user224@lemmy.sdf.org 3 points 4 months ago

    You didn't have to call me out like that.

    load more comments (1 replies)
    [–] Fetus@lemmy.world 3 points 4 months ago

    Most of my passwords are based around strings of characters that are comfortable to type, then committing them to muscle memory. There's a few downsides to this:

    • If I need to log in to something on mobile and don't have a proper keyboard with me, it's tough to remember which symbols I've used

    • I share some of my logins with friends and family for certain things, if they call and need to re-enter a password, it's usually impossible to recite it to them over the phone (most of my shared logins have reverted back to proper words and numbers to make it easier for the others)

    • If I lose an arm, I'll probably have to reset all of my passwords.

    But yeah, words alone provide plenty of possibilities. There's a reason cryptocurrency wallets use them for seed phrases.

    [–] ClamDrinker@lemmy.world 2 points 4 months ago (1 children)

    And even with that base set, even if a computer could theoretically try all trillion possibilities quickly, it’ll make a ton of noise, get throttled, and likely lock the account out long before it has a chance to try even the tiniest fraction of them

    One small correction - this just isn't how the vast majority of password cracking happens. You'll most likely get throttled before you try 5 password and banned before you get to try 50. And it's extremely traceable what you're trying to do. Most cracking happens after a data breach, where the cracker has unrestricted local access to (hopefully) encrypted and salted password hashes.

    People just often re-use their password or even forget to change it after a breach. That's where these leaked passwords get their value if you can decrypt them. So really, this is a non-factor. But the rest stands.

    load more comments (1 replies)
    [–] JackbyDev@programming.dev 8 points 4 months ago (1 children)

    Good luck remembering random bytes. That infographic is about memorable passwords.

    [–] bjorney@lemmy.ca 5 points 4 months ago (1 children)

    You memorize your RSA keys?

    [–] sus@programming.dev 3 points 4 months ago (4 children)

    you memorize the password required to decrypt whatever container your RSA key is in. Hopefully.

    load more comments (4 replies)
    [–] shrugs@lemmy.world 4 points 4 months ago* (last edited 4 months ago) (3 children)

    so you are saying 44 bits of entropy is not enough. the whole point of the comic is, that 4 words out of a list of 2000 is more secure then some shorter password with leetcode and a number and punctuation at the end. which feels rather intuitive given that 4 words are way easier to remember

    load more comments (3 replies)
    [–] Jtotheb@lemmy.world 4 points 4 months ago (1 children)

    Sounds like a good point, but claiming that “Words are the least secure way to generate a password 84 characters long” would be pointless.

    load more comments (1 replies)
    load more comments (7 replies)
    [–] ClamDrinker@lemmy.world 13 points 4 months ago* (last edited 4 months ago)

    While this comic is good for people that do the former or have very short passwords, it often misleads from the fact that humans simply shouldn't try to remember more than one really good password (for a password manager) and apply proper supplementary techniques like 2FA. One fully random password of enough length will do better than both of these, and it's not even close. It will take like a week or so of typing it to properly memorize it, but once you do, everything beyond that will all be fully random too, and will be remembered by the password manager.

    [–] Fillicia@sh.itjust.works 7 points 4 months ago (2 children)

    The part where this falls flat is that using dictionary words is one of the first step in finding unsecured password. Starting with a character by character brute force might land you on a secure password eventually, but going by dictionary and common string is sure to land you on an unsecured password fast.

    [–] possiblylinux127@lemmy.zip 8 points 4 months ago

    That'd why words are from the eff long word list and there are 6 words

    [–] SatyrSack@lemmy.one 6 points 4 months ago (2 children)

    Even if an attacker knew that your password was exactly four words from a specific list of only 2048 common words, that password would still be more secure than something like Tr0ub4dor&3

    https://www.explainxkcd.com/wiki/index.php/936:_Password_Strength

    [–] Fillicia@sh.itjust.works 4 points 4 months ago

    If the attacker search for your password specifically then xkcd themself posted the reason why it wouldn't really matter

    https://www.explainxkcd.com/wiki/index.php/538:_Security

    If you're doing blind attemps on a large set of users you'll aim for the least secured password first, dictionary words and known strings.

    [–] 14th_cylon@lemm.ee 3 points 4 months ago (1 children)

    No, it would not. 2048 to the power of 4 is significantly less than 60 to the power of 11.

    https://www.wolframalpha.com/input?i2d=true&i=Power%5B2048%2C4%5D%E2%80%94Power%5B60%2C11%5D

    [–] Zangoose@lemmy.world 7 points 4 months ago (1 children)

    That's true but in practice it wouldn't take 60^11 tries to break the password. Troubador is not a random string and all of the substitutions are common ( o -> 0, a ->4, etc. ). You could crack this password a lot easier with a basic dictionary + substitution brute force method.

    I'm saying this because I had an assignment that showed this in an college cybersecurity class. Part of our lesson on password strength was doing a brute force attack on passwords like the one in the top of the xkcd meme to prove they aren't secure. Any modern laptop with an i5 or higher can probably brute force this password using something like hashcat if you left it on overnight.

    Granted, I probably wouldn't use the xkcd one either. I'd either want another word or two or maybe a number/symbol in between each word with alternating caps or something like that. Either way it wouldn't be much harder to remember.

    [–] 14th_cylon@lemm.ee 3 points 4 months ago (1 children)

    Troubador is not a random string

    except it is not troubador. it is troubador, ampersand, digit.

    if you know there are exactly two additional characters and you know they are at the end of the string, the first number is really slightly bigger (like 11 times)

    once the random appendix is 3 characters or more, the second number wins

    https://www.wolframalpha.com/input?i2d=true&i=Divide%5BPower%5B2048%2C4%5D%2CPower%5B256%2C3%5DPower%5B2%2C4%5D4*500000%5D

    and moral of the story is: don't use xkcd comic, however funny it is, as your guidance to computer security. yes, the comic suggestions are better than having the password on a post-it on your monitor, but this is 21st century ffs, use password wallet.

    load more comments (1 replies)
    load more comments (3 replies)
    [–] ShortFuse@lemmy.world 15 points 4 months ago* (last edited 4 months ago)

    Yeah, except for the first few bytes. PKCS8 has some initial header information, but most of it is the OCTET_STRING of the private key itself.

    The PEM (human "readable") version is Base64, so you can craft up a string and make that your key. DER is that converted to binary again:

    /**
     * @see https://datatracker.ietf.org/doc/html/rfc5208#section-5
     * @see https://datatracker.ietf.org/doc/html/rfc2313#section-11
     * Unwraps PKCS8 Container for internal key (RSA or EC)
     * @param {string|Uint8Array} pkcs8
     * @param {string} [checkOID]
     * @return {Uint8Array} DER
     */
    export function privateKeyFromPrivateKeyInformation(pkcs8, checkOID) {
      const der = derFromPrivateKeyInformation(pkcs8);
      const [
        [privateKeyInfoType, [
          [versionType, version],
          algorithmIdentifierTuple,
          privateKeyTuple,
        ]],
      ] = decodeDER(der);
      if (privateKeyInfoType !== 'SEQUENCE') throw new Error('Invalid PKCS8');
      if (versionType !== 'INTEGER') throw new Error('Invalid PKCS8');
      if (version !== 0) throw new Error('Unsupported PKCS8 Version');
      const [algorithmIdentifierType, algorithmIdentifierValues] = algorithmIdentifierTuple;
      if (algorithmIdentifierType !== 'SEQUENCE') throw new Error('Invalid PKCS8');
      const [privateKeyType, privateKey] = privateKeyTuple;
      if (privateKeyType !== 'OCTET_STRING') throw new Error('Invalid PKCS8');
      if (checkOID) {
        for (const [type, value] of algorithmIdentifierValues) {
          if (type === 'OBJECT_IDENTIFIER' && value === checkOID) {
            return privateKey;
          }
        }
        return null; // Not an error, just doesn't match
      }
    
      return privateKey;
    }
    

    I wrote a "plain English" library in Javascript to demystify all the magic of Let's Encrypt, ACME, and all those certificates. (Also to spin up my own certs in NodeJS/Chrome).

    https://github.com/clshortfuse/acmejs/blob/96fcbe089f0f949f9eb6830ed2d7bc257ea8dc32/utils/certificate/privateKeyInformation.js#L40

    Edit: To be specific, PKCS8 is usually a PKCS1 (RSA) key with some wrapping to identify it (the OID). The integers (BigInts) you pick for RSA would have to line up in some way, but I would think it's doable. At worst there is maybe a character or two of garbage at the breakpoints for the RSA integers. And if you account for which ones are absent in the public key, then anybody reading it could get a kick out of reading your public certificate.

    [–] hendrik@palaver.p3x.de 10 points 4 months ago* (last edited 4 months ago) (2 children)

    It's assymetric crypto. You'd need to find a matching public key. Or it's just some useless characters. I suppose that's impossible, or what we call that... Like take a few billion years to compute. But I'm not an expert on RSA.

    [–] slazer2au@lemmy.world 16 points 4 months ago (1 children)

    Public keys are derived from the private key. The asymmetric part is for communication not generation. Afaik

    [–] hendrik@palaver.p3x.de 7 points 4 months ago* (last edited 4 months ago) (1 children)

    I'm pretty sure the cryptographic parameters to generate a public key are included in the private key file. So while you can generate the other file from that file, it's not only the private part in it but also some extra information and you can't really change the characters in the private key part. Also not an expert here. I'm fairly certain that it can't happen the other way round, or you could impersonate someone and do all kinds of MITM attacks... In this case I've tried it this way, changed characters and openssh-keygen complains and can't generate anything anymore.

    [–] kamenlady@lemmy.world 3 points 4 months ago

    The surprised man in the middle

    load more comments (1 replies)
    [–] MehBlah@lemmy.world 6 points 4 months ago

    It the length not the content for the most part. Some keys have syntax such as leading or trailing characters.

    [–] whoisearth@lemmy.ca 42 points 4 months ago

    I genuinely LOL'd at this thank you OP.

    [–] istanbullu@lemmy.ml 36 points 4 months ago (2 children)

    It's sad that I can't find anyone to share this with.

    [–] KingBoo@lemmy.world 11 points 4 months ago (1 children)
    [–] dwemthy@lemdro.id 20 points 4 months ago (2 children)

    I share these with friends who might not get it. It's like a UDP joke

    [–] randomuser38529@lemmy.world 6 points 4 months ago

    As long as you gave your best effort.

    [–] SturgiesYrFase@lemmy.ml 8 points 4 months ago

    I have literally one friend who would get this, and I try not to bombard him with memes, as I can tell it gets on his nerves sometimes, even when he thinks it's funny.

    [–] HEXN3T@lemmy.blahaj.zone 14 points 4 months ago

    Burst a kidney please help

    [–] wizzim@infosec.pub 9 points 4 months ago (1 children)

    While the joke is funny, what is the context? Why did she post the original tweet in the first place?

    [–] MystikIncarnate@lemmy.ca 10 points 4 months ago (3 children)

    It's lady gaga.

    If you've followed her at all, even indirectly, this is NOT the weirdest thing she's done, and bluntly, the weirder stuff wasn't justified (to the public at least).

    I'm not trying to throw shade at Gaga at all. Lady, let your freak flag fly all day long. You don't need my permission to do it, but if you want it, you got it. Weird isn't bad, it's just weird.

    IMO, at this point, gaga doesn't need a reason to be weird.

    load more comments (3 replies)
    [–] prole@lemmy.blahaj.zone 6 points 4 months ago
    load more comments
    view more: next ›