Basic File Encryption with GPG key pairs!

Поділитися
Вставка
  • Опубліковано 27 сер 2024
  • Forum (BRAND NEW): forum.lukesmit...
    Support the channel!: / lukesmith
    Send money: PayPal.me/Luke...
    Ask a question: luke@lukesmith.xyz
    Get my configs: github.com/Luk...
    See my website: lukesmith.xyz

КОМЕНТАРІ • 154

  • @LukeSmithxyz
    @LukeSmithxyz  6 років тому +21

    I'm putting this vid out to go with my new mutt-wizard, which you should check out! (ua-cam.com/video/SsEJz9f9VMQ/v-deo.html)

    • @niteshmalani3742
      @niteshmalani3742 5 років тому

      Dear sir I have Ex4 encrypted file so how can find key or how can change key or editing in it ? How can compile it ? I used mt4 platform.

  • @zakrent2000
    @zakrent2000 6 років тому +9

    If you want to encrypt text when editing it in vim (usefull for email encryption): %! gpg -er --armour

  • @Lumbago04
    @Lumbago04 6 років тому +148

    I prefer a rot13 double encryption

    • @atrisarkar1361
      @atrisarkar1361 5 років тому +28

      A simple spell but quite unbreakable

    • @cubeman2147
      @cubeman2147 5 років тому +1

      jul gb lbh cersre ebg guvegrra

    • @cubeman2147
      @cubeman2147 4 роки тому +1

      @Pseudonyymi nsgre 11 zbaguf v svanyyl xabj

    • @michaelhoefler5118
      @michaelhoefler5118 3 роки тому +6

      I use quadruple. It offers double the security

    • @nczioox1116
      @nczioox1116 2 роки тому +1

      it worked for the romans

  • @Rickety3263
    @Rickety3263 Рік тому +4

    Thank you! This is perfect. I'm writing a script to backup a configuration file over the network but the config file has other secrets stored in plain text. Now I can write a stable script to store the backups securely in a legit way. Thanks for explaining!

  • @joaopedrodeamorimpaula8965
    @joaopedrodeamorimpaula8965 6 років тому +49

    If I may suggest, I think you should follow up this video with a video about pass, the "Standard UNIX password manager", since it uses gpg for the encryption of the password and it can be used by many programs. For example, I have my email password stored in pass, and whenever offlineimap needs to access it to update my emails it uses a pass command (`pass show Path/To/Password`) so I don't need to store it in plain text and I also don't need to type it everytime I update my emails.

    • @joaopedrodeamorimpaula8965
      @joaopedrodeamorimpaula8965 6 років тому +7

      kcat Yeah, I forgot to mention those helper scripts. There are also two of them for rofi, rofi-pass and autopass, even though I never really got to make them work and I just use passmenu.

    • @hectorcanizales5900
      @hectorcanizales5900 3 роки тому +4

      Fun fact: he actually did make that video!

  • @SyberPrepper
    @SyberPrepper 6 років тому +6

    Enjoyed the video. Thanks for keeping it simple and to the point without a lot of "or you could do this" "or you could do that".

  • @sebon11
    @sebon11 4 роки тому +12

    Thank you very much man, this helped me a lot. Very clear video, lovely (non hindi) english, everything's super cool. Thanks again

    • @dustinsmith9849
      @dustinsmith9849 Рік тому

      omg thank you for having the balls to say that bro. USA! USA!

  • @gnuPirate
    @gnuPirate 2 роки тому +1

    Great video Luke, and great content in general. Glad I stumbled across this tonight. Hopefully will remember to follow you wherever on the other content sites you inhabit.

  • @IamBrianDickson
    @IamBrianDickson 5 років тому +5

    Good intro for me. Now I need to go learn more, and what the fluff you where typing in the terminal half the time :)

  • @Ruhgtfo
    @Ruhgtfo 5 років тому +28

    Can you make another video for things below >
    1. how to back up those key.
    2. how another person import your public key before encrypting

    • @Minecraft101ToonLink
      @Minecraft101ToonLink 3 роки тому

      I prefer to back up my key by pigeon.

    • @hectorcanizales5900
      @hectorcanizales5900 3 роки тому +1

      You can use the `--export-secret-keys [ names ]` to export your key (including the private one. It’ll write to stdout by default.

    • @TheBlueThird
      @TheBlueThird 2 роки тому +2

      No video needed. It's documented everywhere.

  • @thesuperiorman8342
    @thesuperiorman8342 3 роки тому

    You explain really good. You're gifted

  • @ram0973
    @ram0973 2 роки тому

    Use gpg --full-generate-key --expert , Luke!

  • @user-gr5do8nk7e
    @user-gr5do8nk7e 6 років тому +1

    8:19 don't tell me what to do
    anyway awesome video ! i had to deal with gpg keys when i was using arch but i never took the time to learn more than that they deal with security and now i know
    thanks

  • @smakintel
    @smakintel 2 місяці тому

    Clear crystal info , thanks Bro

  • @cme123tr
    @cme123tr 3 роки тому +3

    I'm really new at this and your video helped me a lot, thank you. But, how do you put your signature on the encrypted file, and how does the recipient open it? You give him the password by phone?

  • @jt659
    @jt659 5 років тому +5

    You're great at explaining this, but I always feel like I'm watching that "How English sounds to non-English
    speakers" video. Like my brain is saying "you know this language but he's saying fake words!"

  • @krzysztofwesoowski7674
    @krzysztofwesoowski7674 3 роки тому

    Thanks for this simple explanation.

  • @imveryhungry112
    @imveryhungry112 2 роки тому

    Thank you for this valuable information.

  • @mpk1
    @mpk1 3 роки тому +3

    How do you get that view in a terminal?

  • @Simon-xi8tb
    @Simon-xi8tb 6 років тому +4

    Wow, didn't know about shred -u. Tnx :D About keys expiring, so I assume if private key expires, you can no longer decrypt files that were encrypted with that private key ?

    • @ammdias
      @ammdias 3 роки тому +1

      You can always decrypt the files, even if the private key is expired. Someone trying to use that key to encrypt something to you would receive a warning that the key is expired and another should be used. If you could not use expired keys to decrypt files you would lose data and nobody would want that :)

  • @mohammedkaram8606
    @mohammedkaram8606 Рік тому

    Thank you for the nice tutorial ♡

  • @rita_calamity
    @rita_calamity 2 місяці тому

    What distro are you using? It looks cool

  • @lue016
    @lue016 6 років тому +3

    gpg is awesome

  • @IljasMS
    @IljasMS 6 років тому +1

    Hey Luke, nice and useful video as always. What was that task managing program on the right at the beginning?

    • @uncledave2063
      @uncledave2063 6 років тому

      looks like vtop

    • @IljasMS
      @IljasMS 6 років тому

      Thank you, I also have figured that out however. Next question is, how did he manage to make borders in ranger look like pipes?

    • @IljasMS
      @IljasMS 6 років тому

      i know this man :) if i set it to true, the borders look like straight (i mean connected lines), however in his video his vertical borders look like pipe symbols.

    • @IljasMS
      @IljasMS 6 років тому

      Hahah, even thoigh its and oddity it looks dope

  • @GNU_Linux_for_good
    @GNU_Linux_for_good Рік тому

    07:34 I have to set that cache to 0 if I wanted being asked every time for my passphrase - right? How I'm going to do that? Thanks.
    Update: I fixed it with the *gpa* and set the _default-cache-ttl_ at zero. _[gpa = graphical frontend for the GNU Privacy Guard]_

  • @HelloWorld-tn1tl
    @HelloWorld-tn1tl 3 роки тому +1

    Can you share your vim multi-scree setting, thank u .

  • @PriestApostate
    @PriestApostate 9 місяців тому

    What application are you using as your File Manager in this video?

  • @paulmacgiollacaoine8619
    @paulmacgiollacaoine8619 2 роки тому

    Nice presentation.

  • @Weaver0x00
    @Weaver0x00 11 місяців тому

    How do you make it so that you have the terminal up on the top and the current directory state at the bottom of the screen?

  • @sectorx20
    @sectorx20 3 роки тому +1

    What is the best way to store your gpg backup file ?

  • @SF-zm2py
    @SF-zm2py 3 роки тому

    Nice and to the point!

  • @alexanderminer1537
    @alexanderminer1537 6 років тому +1

    Do you have any tutorial/guide on how to setup a working environment like yours? Seems pretty cool and efficient...

    • @LukeSmithxyz
      @LukeSmithxyz  6 років тому +10

      Lol. Yeah see the rest of the channel! Or just use larbs.xyz

    • @alexanderminer1537
      @alexanderminer1537 6 років тому +1

      Luke Smith Thanks dude, great stuff btw, been following for 6 months now... Keep it up

  • @fision8090
    @fision8090 3 роки тому

    Use gpgtar if you want to encrypt a folder and now you can hide your 1.5 tb homework folder

  • @7megas
    @7megas 6 років тому +1

    Is there a convenient way to encrypt big file? Asymmetrical keypair encryption requires a lot of resource

    • @Eletronicafg
      @Eletronicafg 6 років тому +1

      7megas While purely asymmetrical encryption is slow, most software use the public key to encrypt a secret symmetric key an that is used to encrypt the hole file instead.

    • @Michael-wy5ty
      @Michael-wy5ty 6 років тому +2

      Eletronicafg this is what GPG does. GPG is in fact using a hybrid cipher, what that process of encrypting the symmetric key is called.

    • @Eletronicafg
      @Eletronicafg 6 років тому

      exactly

    • @samaelsilas7500
      @samaelsilas7500 4 роки тому

      What about 'veracrypt' ?

  • @individous2833
    @individous2833 6 років тому

    very nice video. good stuff.

  • @Oscar-rl4wm
    @Oscar-rl4wm 5 років тому

    Luke,
    Why not use pinentry-curses instead of those annoying popups?

  • @flesz_
    @flesz_ Рік тому

    what is that funky file manager in the bottom half of the window?

    • @avsbq
      @avsbq 6 місяців тому

      ranger but lf is better

  • @maybryn
    @maybryn 3 роки тому

    Someone on a forum said to always write down your key.... Weirdest thing happened though.... I was not told my password.. I also know for a fact that I did NOT encrypt anything, yet there are encrypted files.. I updated mint, and boom!! my wifi changed names, half of my kernels are gone, some of the apt conf were erased and I can't use the internet anymore.. I don't understand what happened

  • @racingtheweb
    @racingtheweb Рік тому

    This is fantastic! I need to ask: can I decrypt my encrypted file from a Windows pc? And what if my linux laptop (which I used to encrypt my file) doesn't work? Will I still be able to decrypt my file? Thank you

  • @secwriteups
    @secwriteups Рік тому

    What's the package to install in order to get the GUI that asks for the passphrase ?

  • @roberthensley7130
    @roberthensley7130 3 роки тому +1

    Do you have a video or resource for your command prompt setup? It looks very nice!

    • @devikapluspoint8306
      @devikapluspoint8306 3 роки тому +1

      Is this a joke?

    • @roberthensley7130
      @roberthensley7130 3 роки тому

      @@devikapluspoint8306 Nope! Genuine question. I like the way the filesystem is visible below the terminal. It looked like there was some shortcut used to open the filesystem viewer which I wanted to learn more about. I also like how these new terminal pages are opened and their spacing.

    • @devikapluspoint8306
      @devikapluspoint8306 3 роки тому

      @@roberthensley7130 tiling window managers let you map a key to any command. It's obvious. The fact that it appeared below is because of his layout.
      And this is bash not command prompt

    • @devikapluspoint8306
      @devikapluspoint8306 3 роки тому

      @@roberthensley7130 wait you don't know about tiling window managers? They also let you tile stuff like browsers

  • @obentheodore9037
    @obentheodore9037 Рік тому

    Thanks @Lukesmith

  • @francescodesimone9419
    @francescodesimone9419 6 років тому

    m8 sorry for the dum questions. What is the color hex of your windows border? I don't found it in the conf file kek

  • @cubeman2147
    @cubeman2147 5 років тому

    thx bro very helpful !!

  • @PalinuroRex
    @PalinuroRex 6 років тому

    Hi Luke! I followed your instructions and generated a key in mac os, but the wizard says it can't locate the gpg keys. I looked at /usr/bin/ and indeed I don't see a gpg folder or file... Any clues?

    • @meanmole3212
      @meanmole3212 5 років тому

      Google image search: "Apple tech support azis"

  • @sharktamer
    @sharktamer 6 років тому +2

    How do you keep making videos on exactly the things I've just started looking into myself? This is like the 4th time.

  • @GauravSingh-hn8cg
    @GauravSingh-hn8cg 3 роки тому +1

    How do you setup your terminal?

    • @avsbq
      @avsbq 6 місяців тому

      he uses st

    • @avsbq
      @avsbq 6 місяців тому

      his terminal build is on his github

  • @ameynarkhede8264
    @ameynarkhede8264 6 років тому

    Whats name of that font on your terminal??? and do you highlight active window??

    • @LukeSmithxyz
      @LukeSmithxyz  6 років тому +1

      Inconsolata is the font. The border around the windows is automatic in i3.

  • @sharktamer
    @sharktamer 6 років тому +1

    What's the gui that comes up and asks for your pass?

    • @LukeSmithxyz
      @LukeSmithxyz  6 років тому +2

      That pinentry. I think it comes by default, but if you uninstall it, it'll just prompt you on the command line.

    • @sharktamer
      @sharktamer 6 років тому +3

      Yeah, I'm used to seeing it ask on the command line. I'm kinda more curious about the "save in password manager" checkbox, where does that go?

  • @aviator7479
    @aviator7479 9 місяців тому

    Dude what is the tool you are using to navigate at 4:40?

    • @avsbq
      @avsbq 6 місяців тому

      ranger, but lf is better

    • @aviator7479
      @aviator7479 6 місяців тому

      @@avsbq Thanks a lot. These tools look awesome.

    • @avsbq
      @avsbq 6 місяців тому

      @@aviator7479 no problem, luke has a more recent video on the "lf" file manager

  • @harshallele8309
    @harshallele8309 6 років тому +1

    What are the advantages of this compared to say, keepass?

    • @mikuhatsunegoshujin
      @mikuhatsunegoshujin 6 років тому

      Harshal Lele just a front end.

    • @whahala555
      @whahala555 5 років тому +1

      You can post your public key online other people to send you encrypted files.

  • @skillz7
    @skillz7 3 роки тому

    Wht is the terminal how do I get it

  • @user-tw3xu4du4l
    @user-tw3xu4du4l 3 роки тому

    What operation system you can use?

  • @nicholaspapadonis5036
    @nicholaspapadonis5036 5 років тому

    What window manager are you using that's text based? Is that mc?

    • @naumanafsar3053
      @naumanafsar3053 5 років тому

      No! it's i3wm

    • @xGOKOPx
      @xGOKOPx 5 років тому

      Since you brought up mc you're probably asking for file manager. In that case it's Ranger

  • @cezarsampaio4143
    @cezarsampaio4143 5 років тому

    Thanks!

  • @AlasdairBRStewart
    @AlasdairBRStewart 6 років тому +2

    Any plans for a vimwiki video?

  • @ArmandoCalderon
    @ArmandoCalderon Рік тому

    The command gpgtar to encrypt folders

  • @ed_xz7329
    @ed_xz7329 7 місяців тому

    If I may ask, what's that linux distro?

    • @Lulxec
      @Lulxec 3 місяці тому +1

      It's probably arch linux with dwm window manager

  • @jmm1233
    @jmm1233 3 роки тому

    this useful in conjunction with apps like pass

  • @anasouardini
    @anasouardini 2 місяці тому

    How is an expiring key used for encrypting files? :rofl

  • @NoEgg4u
    @NoEgg4u 6 років тому

    Greetings,
    How can I encrypt a file, and not have it associated (or dependent upon) a public key/private key?
    In other words, I simply want to encrypt a file with a passphrase. Anyone that knows that passphrase will be able to decrypt it.
    This would be useful to put my secret key on a backup drive, and not have to worry that my secret key will fall into the wrong hands (because I will encrypt the secret key, before saving it to a backup drive).
    I cannot figure out the options for the command line to instruct gpg to encrypt a file. It seems determined to associate any encryption with a public key.
    Please advise.
    Thank you.

    • @keith5733
      @keith5733 5 років тому +2

      gpg --symmetric filename

    • @dlarge6502
      @dlarge6502 5 років тому

      Take a look at ccrypt. Its a modern replacement for the UNIX crypt command and is designed to simply encrypt or decrypt a file using a passphrase.

  • @spaceiswater6539
    @spaceiswater6539 5 років тому

    So does the person who receives your message have to know your password you created it with or do they have their own password to open your encrypted message?

    • @ammdias
      @ammdias 3 роки тому +1

      To encrypt a file or message to someone else, you have to first get their public key and use that to encrypt the file (no password is necessary on encryption). That person would then decrypt using their own private key, for which they need the corresponding password.

  • @ziahdtv1148
    @ziahdtv1148 5 років тому

    Good video

  • @jordekang2844
    @jordekang2844 6 років тому +20

    >mfw me and some friends were just looking this up.
    a-are you a CIA?

  • @PETAJOULE543
    @PETAJOULE543 5 років тому

    GPG keypair creation and how to use it in certain file that we want to encrypt. I suppose it is same as gnupg

    • @xGOKOPx
      @xGOKOPx 5 років тому +4

      GPG *is* GnuPG

  • @antoniocg2531
    @antoniocg2531 4 роки тому

    Hi Luke. In what system ( distro ) do you work ?, thanks

    • @nykal1510
      @nykal1510 3 роки тому

      Artix, Arch derivative without systemd

  • @AlifRadhitya
    @AlifRadhitya 3 роки тому

    gg!

  • @julioramirez5497
    @julioramirez5497 4 роки тому

    Thanks dude! And if i want to keep editing the file after encrypting it?

    • @jorar91
      @jorar91 3 роки тому +1

      You need to decrypt it and encrypt it again

  • @hassanelnrgcy4782
    @hassanelnrgcy4782 Рік тому

    nice

  • @aaron6841
    @aaron6841 Рік тому

    I can't seem to decrypt it?

    • @QWERTY-gp8fd
      @QWERTY-gp8fd Рік тому

      skill issue

    • @aaron6841
      @aaron6841 Рік тому

      @@QWERTY-gp8fd thanks for your shitty ignorant comment I've worked it out now you've got an asshole issue

    • @yuyuyuyuyuy484
      @yuyuyuyuyuy484 Рік тому

      @@aaron6841 LMAO

  • @marcovirtual
    @marcovirtual 3 роки тому

    Does this also works for entire directories of files?

    • @ammdias
      @ammdias 3 роки тому +1

      No. You should first compress (zip/tar/whatever) the directory into a single file. You can, however, encrypt or decrypt several files at once.

  • @mrmartinLgore
    @mrmartinLgore 5 років тому

    I would like to see a video on pass (password manager) :)

  • @cla041054
    @cla041054 5 років тому

    I don't know why this does not work in my computer but openssl works.....

  • @joaofnds
    @joaofnds 3 роки тому

    vtop? really?

  • @soufianta8374
    @soufianta8374 4 роки тому

    Hi, how can we prevent duplicate key pairs? Imagine I've generated a key pair (with expiration date) and another person generates the same one, is that possible? If no, how does GPG manage that? What about signing packages with GPG? Is it the same logic behind ? Thanks.

  • @skrillnesthq
    @skrillnesthq Рік тому +1

    Gpg Is Virus ?

  • @calmarcalmar
    @calmarcalmar 6 років тому

    nice thanks. btw I have this in my .bashrc: alias rm='echo escape rm' ... too often I mixed up rm and mv. With that, you need to type:
    m. (additionally I have the 'trash' command)

    • @calmarcalmar
      @calmarcalmar 6 років тому

      that 'certain' period 7:25 is definied in seconds i.e. in: .gnupg/gpg-agent.conf default-cache-ttl 30000 (and restart gpg-agent)

  • @OCmyBrain
    @OCmyBrain 6 років тому

    No pywal anymore???

    • @06kellyjac
      @06kellyjac 6 років тому

      OCmyBrain I'd imagine it's because he's using ST now which has its theme compiled into the binary so the terminal wouldn't change theme with pywal

    • @LukeSmithxyz
      @LukeSmithxyz  6 років тому +3

      There are some builds of st out on github that have pywal support, but I honestly moved away from using pywal generally. No hard feelings against it, I just don't really use it now.

  • @str0680
    @str0680 4 роки тому

    time to buy drugs

  • @pakoul
    @pakoul 3 роки тому

    longer is better

  • @douwehuysmans5959
    @douwehuysmans5959 6 років тому

    1024 key length would suffice, 4096 is just completely insane

    • @douwehuysmans5959
      @douwehuysmans5959 6 років тому +1

      People always assume the NSA is willing to spend billions on them, they are not, noone gives a fuck 1024 bit still takes years to crack, not really necessary to get bigger keys to encrypt some email with some pictures of your dog in it

    • @douwehuysmans5959
      @douwehuysmans5959 6 років тому

      dOuWe hUiJsMaNs iS aN NsA aGeNT!!1

    • @knpstrr
      @knpstrr 6 років тому

      depends on the size of your secret

    • @douwehuysmans5959
      @douwehuysmans5959 5 років тому

      @@knpstrr You don't encrypt large data with RSA, you use it to encrypt a symmetric key so you can send it over the internet without having to fear for eavesdroppers

  • @RmNrIHRoZSBDQ1AK
    @RmNrIHRoZSBDQ1AK 5 років тому

    If someone's looking for a nice cross-platform encrypted chat and file storage with a git remote helper build on top of PGP check out Keybase keybase.io/

  • @douwehuysmans5959
    @douwehuysmans5959 6 років тому

    L33t

  • @elinars5638
    @elinars5638 4 роки тому

    Haha Boomer, if you're so good why don't you write your own version of gpg?

  • @defaultkozlowsqi1488
    @defaultkozlowsqi1488 6 років тому

    Well I did not know asymmetric encryption is good for file encryption.. I love to laught at your videos... I just hope nobody is actually going to use what you just presented in this or any other video or nobody is going to listen to your gnu/linux propaganda.. and it is linux not gnu/linux because kernel is not in any way connected to gnu software and you can run gnu software on windows... but do you say it is gnu/dos or gnu/windows.. No! And about the topic : asymmetrical encryption is slow and not intended for file encryption in its core design which is signing and key exchanges.. after key exchange(hmm key to the ->) there is symmetrical encryption anyway.. so read something about encryption before makeing misleading videos.. try to encrypt which this something like a 20G and then try this hardware accelerated symmertrical encryption I was talking about.. well if you have one of this nice intel chips with thier proprietary technology (best performance on vPro i7 chips) I mean thinkpads or stuff like that will probably burn if I were to do this on them.. but come on.. anyway I loved posting this comment from my proprietary iphone’s IOS11 with symmetrically encrypted flash that I knew nothing about but I love that they keep my data safe and this closed source youtube I cannot imagine how that must hurt you so you post videos here.. I would be scared if I were you maybe they will track you having the metadata you supplied with the vidoes.. dude I love that I am not you..

    • @technotux7835
      @technotux7835 6 років тому

      @default kozlowsqi at least we own the software that runs our computers, and at any time i can just format my harddrive and reinstall my entire system without having to be connected to the internet,
      while you can't even use the maps application or siri digital assistant on your iphone’s iOS without having to be connected to the internet

    • @defaultkozlowsqi1488
      @defaultkozlowsqi1488 6 років тому

      @techno tux I can do that too(reinstall from linux to linux to windows to linux.. and so on).. and come on nobody uses siri(or cortana(or hey google)) ..and are you using paper maps ?!

  • @devviz
    @devviz Рік тому

    _UTC-8🌤️8AM Jan 9th 2023_