issue205:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue205:c_c [2024/06/01 10:20] – créée auntiee | issue205:c_c [2024/06/05 14:02] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | I recently enrolled in a short course on technical writing, and it got me thinking. Although our magazine is aimed at Ubuntu newbies, we have an established reader base that is not. So I am going to put it out there, would you guys prefer a more clinical approach to command & conquer, or should we continue with our casual conversation-like tone? Is it about the meat and potatoes – to get the job done, or do you prefer the scenic route. Would you like to know the why or just the how? Or would you prefer learning without knowing that you are? Would you prefer gamification? | + | **I recently enrolled in a short course on technical writing, and it got me thinking. Although our magazine is aimed at Ubuntu newbies, we have an established reader base that is not. So I am going to put it out there, would you guys prefer a more clinical approach to command & conquer, or should we continue with our casual conversation-like tone? Is it about the meat and potatoes – to get the job done, or do you prefer the scenic route. Would you like to know the why or just the how? Or would you prefer learning without knowing that you are? Would you prefer gamification? |
Do let us know, so we can become more of what you want. Send us an e-mail on: misc@fullcirclemagazine.org | Do let us know, so we can become more of what you want. Send us an e-mail on: misc@fullcirclemagazine.org | ||
Ligne 7: | Ligne 7: | ||
Btanon: What's the best way to hash passwords? | Btanon: What's the best way to hash passwords? | ||
- | Srace: How can I delete my old passwords file so it can't be recovered? | + | Srace: How can I delete my old passwords file so it can't be recovered?** |
- | I’d like to start by addressing the second question first. Firstly, if you do keep bitcoin wallets and bank passwords on your computer, it should be in an encrypted folder, as when it comes to your finances, you want to be doubly sure. | + | Je me suis récemment inscrit à un court cours sur la rédaction technique et cela m'a fait réfléchir. Bien que notre magazine soit destiné aux débutants sur Ubuntu, nous avons une base de lecteurs établie qui ne l'est pas. Je vais donc vous poser la question : préférez-vous une approche plus clinique de Command & Conquer, ou devrions-nous continuer sur le ton d'une conversation décontractée ? S' |
+ | |||
+ | N' | ||
+ | |||
+ | Passons maintenant au sujet du Command & Conquer de ce mois-ci. J' | ||
+ | |||
+ | Btanon : Quelle est la meilleure façon de hacher les mots de passe ? | ||
+ | |||
+ | Srace : Comment puis-je supprimer mon ancien fichier de mots de passe afin qu'il ne puisse pas être récupéré ? | ||
+ | |||
+ | |||
+ | **I’d like to start by addressing the second question first. Firstly, if you do keep bitcoin wallets and bank passwords on your computer, it should be in an encrypted folder, as when it comes to your finances, you want to be doubly sure. | ||
Linux has a utility called “shred”, | Linux has a utility called “shred”, | ||
Ligne 17: | Ligne 28: | ||
Let’s dissect that. The -u removes everything at the end, think of it as clean up. The -z writes a file with all zeroes over your file, like there was nothing there. The -n lets you specify the amount of times to overwrite. | Let’s dissect that. The -u removes everything at the end, think of it as clean up. The -z writes a file with all zeroes over your file, like there was nothing there. The -n lets you specify the amount of times to overwrite. | ||
- | Now let's see it in action. Copy a FCM pdf file to a folder. Righ- click inside said folder and click on “open terminal here”. Now type: shred -u -z -n 6 issue201_en.pdf (replace that file name with your file) and hit enter. Poof* it’s gone. The default amount of times a file is hammered is three times. I doubled it up by specifying six. If you followed along, congratulations, | + | Now let's see it in action. Copy a FCM pdf file to a folder. Righ- click inside said folder and click on “open terminal here”. Now type: shred -u -z -n 6 issue201_en.pdf (replace that file name with your file) and hit enter. Poof* it’s gone. The default amount of times a file is hammered is three times. I doubled it up by specifying six. If you followed along, congratulations, |
- | Now let’s explain hashing as this confuses people. Hashing is a one-way function. Say it out loud. It is meant to be one way only. This is very simplistic AND wrong, but it helps to paint a picture. One plus two hashes to three, if plus was the hash. You can immediately see the problem, two plus one is also three. This *can happen in a hash, but it is unlikely. My message was one plus two, not two plus one. This is very important in password hashing, as you can imagine! While we will not discuss hashing algorithms, as it would take up the whole year, we can show you how to use them. We often see SHA256 sums in the same folder that you download a distro from. Think of this as a unique fingerprint; | + | J' |
+ | |||
+ | Linux dispose d'un utilitaire appelé « shred », comme dans file shredder (déchiqueteur de fichiers). Pour en savoir plus, vous pouvez taper : man shred | ||
+ | |||
+ | Comme il est dit, « écraser un fichier pour cacher son contenu et éventuellement le supprimer », ne présumez de rien. Si nous examinons les arguments, quelques-uns ressortent. La version TL;DR est que je me souviens de USN, les compléments pour la gym, (USN, Ultimate Sports Nutrition), mais le S est en fait un Z. | ||
+ | |||
+ | Décortiquons cela. Le -u supprime tout ce qui se trouve à la fin, il s'agit d'un nettoyage. Le -z écrit un fichier avec des zéros sur tout votre fichier, comme s'il n'y avait rien. L' | ||
+ | |||
+ | Voyons maintenant ce que cela donne. Copiez un fichier pdf du FCM dans un dossier. Faites un clic droit dans ce dossier et cliquez sur « ouvrir le terminal ici ». Tapez maintenant : shred -u -z -n 6 issue201_fr.pdf (remplacez le nom du fichier par le vôtre) et appuyez sur entrée. Pouf*, il a disparu. Par défaut, un fichier est détruit trois fois. Je l'ai doublé en spécifiant six. Si vous avez suivi, félicitations, | ||
+ | |||
+ | |||
+ | **Now let’s explain hashing as this confuses people. Hashing is a one-way function. Say it out loud. It is meant to be one way only. This is very simplistic AND wrong, but it helps to paint a picture. One plus two hashes to three, if plus was the hash. You can immediately see the problem, two plus one is also three. This *can happen in a hash, but it is unlikely. My message was one plus two, not two plus one. This is very important in password hashing, as you can imagine! While we will not discuss hashing algorithms, as it would take up the whole year, we can show you how to use them. We often see SHA256 sums in the same folder that you download a distro from. Think of this as a unique fingerprint; | ||
Let’s see that in action. I suggest using a text file as we can change the contents easily. Please follow along if you are a newbie. Create a folder and an empty file inside it: | Let’s see that in action. I suggest using a text file as we can change the contents easily. Please follow along if you are a newbie. Create a folder and an empty file inside it: | ||
Ligne 33: | Ligne 55: | ||
sha256sum fcm.txt | sha256sum fcm.txt | ||
- | OK, the file is fingerprinted! Shown top right. | + | OK, the file is fingerprinted! Shown top right.** |
- | Now open the file in your text editor, and add a space after the zero and save it. Our file is still only 11 bytes in size. However, if we repeat the command above, we will get something completely different, due to a single space. Shown right. | + | Expliquons maintenant ce qu'est le hachage, car cela peut prêter à confusion. Le hachage est une fonction à sens unique. Dites-le à voix haute. Elle est censée être à sens unique. C'est très simpliste ET faux, mais cela permet de s'en faire une idée. Un plus deux donne trois, si le plus est le hachage. Vous pouvez immédiatement voir le problème, deux plus un est aussi trois. Cela *peut se produire dans un hachage, mais c'est peu probable. Mon message était un plus deux, pas deux plus un. Comme vous pouvez l' |
+ | |||
+ | Voyons cela en action. Je suggère d' | ||
+ | |||
+ | touch fcm.txt | ||
+ | |||
+ | echo 1234567890 >> fcm.txt | ||
+ | |||
+ | Nous avons maintenant un fichier avec 11 octets de données (en haut à gauche). | ||
+ | |||
+ | Tapez maintenant : | ||
+ | |||
+ | sha256sum fcm.txt | ||
+ | |||
+ | OK, le fichier a son empreinte digitale ! En haut à droite. | ||
+ | |||
+ | |||
+ | **Now open the file in your text editor, and add a space after the zero and save it. Our file is still only 11 bytes in size. However, if we repeat the command above, we will get something completely different, due to a single space. Shown right. | ||
And that is the short version. Both files contained only “1234567890” and you could not tell by typing the file out that anything had changed, but the hash does not lie. I dare you to keep adding spaces in different places, without changing the file size and see if you can get a hash, even resembling the first one. | And that is the short version. Both files contained only “1234567890” and you could not tell by typing the file out that anything had changed, but the hash does not lie. I dare you to keep adding spaces in different places, without changing the file size and see if you can get a hash, even resembling the first one. | ||
Ligne 43: | Ligne 82: | ||
This creates a shorter fingerprint, | This creates a shorter fingerprint, | ||
- | Homework: repeat the above exercise with md5sum | + | Homework: repeat the above exercise with md5sum** |
- | We used a text file in this issue, as it is easy to change something, but you can use this with other files too, like pictures, for instance. | + | Ouvrez maintenant le fichier dans votre éditeur de texte, ajoutez une espace après le zéro et sauvegardez-le. Notre fichier ne fait toujours que 11 octets. Cependant, si nous répétons la commande ci-dessus, nous obtiendrons quelque chose de complètement différent, à cause d'une seule espace. Ci-contre à droite. |
+ | |||
+ | Et c'est la version courte. Les deux fichiers ne contiennent que « 1234567890 » et vous ne pourriez pas dire en tapant le fichier que quelque chose a changé, mais le hachage ne ment pas. Je vous mets au défi de continuer à ajouter des espaces à différents endroits, sans modifier la taille du fichier, et de voir si vous pouvez obtenir un hachage ressemblant ne serait-ce qu'à celui du premier fichier. | ||
+ | |||
+ | Vous pouvez également faire cela avec md5sum : md5sum fcm.txt | ||
+ | |||
+ | Cela crée une empreinte digitale plus courte, si vous en avez besoin pour un fichier. Mais ne l' | ||
+ | |||
+ | Devoir : répétez l' | ||
+ | |||
+ | |||
+ | **We used a text file in this issue, as it is easy to change something, but you can use this with other files too, like pictures, for instance. | ||
When it comes to passwords, you’d need to hash them and salt them and probably hash the result as well. Just remember to keep the salt nowhere near the place you keep your hashes. The same goes for the passwords, it is best to discard them once you have the hash. | When it comes to passwords, you’d need to hash them and salt them and probably hash the result as well. Just remember to keep the salt nowhere near the place you keep your hashes. The same goes for the passwords, it is best to discard them once you have the hash. | ||
- | If anything was unclear, misc@fullcirclemagazine.org | + | If anything was unclear, misc@fullcirclemagazine.org** |
+ | |||
+ | Nous avons utilisé un fichier texte dans ce numéro, car il est facile de modifier quelque chose, mais vous pouvez également utiliser cette méthode avec d' | ||
+ | |||
+ | En ce qui concerne les mots de passe, vous devez les hacher, les saler et probablement hacher le résultat aussi. N' | ||
+ | |||
+ | Si quelque chose n' |
issue205/c_c.1717230005.txt.gz · Dernière modification : 2024/06/01 10:20 de auntiee