rss

GPG: minimal how to

GPG minimal how-to !

GPG is a free and easy way to encrypt and/or verify your exchanges.
This HowTo was done with "gpg (GnuPG) 1.4.22" a GNU GPLv3 tool.


This post includes GPG basic commands:
- generate your key
- send/receive encrypted content
- sign or verify a content
- export/import your secret key

on windows host, you could install and use git bash to follow this steps



  • Initialize GPG tool using 'list keys' ?

$ gpg --list-keys
gpg: répertoire « /home/osboxes/.gnupg » créé
gpg: nouveau fichier de configuration « /home/osboxes/.gnupg/dirmngr.conf » créé
gpg: nouveau fichier de configuration « /home/osboxes/.gnupg/gpg.conf » créé
gpg: le trousseau local « /home/osboxes/.gnupg/pubring.kbx » a été créé
gpg: /home/osboxes/.gnupg/trustdb.gpg : base de confiance créée




First time a gpg command is executed, gpg produces base gpg init: a ~/.gnupg directory

  • How to generate my key ?

$ gpg --gen-key
      Keep default options, and answer question about real name, and email, and passphrase.

      That's all. 
      Now you can list your key:

      $ gpg --list-secret-keys

      You could distribute your public key:

      $ gpg --keyserver hkp://keyserver.ubuntu.com:80 --send-keys KEYIDHERE

        • How to send encrypted content ?
          • Search (or ask) your recipient KEYID using the following command:

        $ gpg --keyserver hkp://keyserver.ubuntu.com:80 --search-keys robert
            • Receive the key (require KEYID)
          $ gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys KEYIDHERE
            • Encrypt file using a given recipient (require related key)
          $ gpg -r jojo@yoyo.fr -o encrypted.gpg -e clear_content.txt
          this command will encrypt "clear_content.txt" into "encrypted.gpg" using "jojo@yoyo.fr" key.
            • Use your favorite email client to send encrypted file.

          • How to receive encrypted content from somebody
            • You will need the following requirements:
              • generate and distribute your own key (step above)
              • communicate about the way to encrypt content (step above) to you recepient
            • Use your favorite email client to receive encrypted file.
            • Decrypt received file using the following command:
          $ gpg -o decrypted.txt -d encrypted.gpg



          • How to add detached signature?
          You would like to prove that YOU send clear information (this command doesn't encrypt the message itself) 

          $ gpg -o doc.sig --clearsign doc
              You will need to answer you passphrase.
              This will add a clear signature from doc and generate doc.sig as result

              • How to verify message with detached signature?
              You would like to prove clear information associated signature identity (this command doesn't decrypt the message itself)

              Assume you message with detached signature is in a file called "doc.sig"

                $ gpg -o doc -d doc.sig


                    • How to backup your secret key?
                    export it (in a very very secure place)
                    $ gpg --list-secret-keys
                    $ gpg --export-secret-keys -a MYKEYID > username_gpg_export_secret.asc
                        import it
                        $ gpg --import -a username_gpg_export_secret.asc
                            "-a" means ascii export/import. You could omit this option to export/import binary.



                            Related documentations
                            - sonatype: working with php suignatures
                            - gnupg.org: manual(signature)



                            Galaxy Tab 10.1: HowTo move to CyanogenMod 10

                            1) Install TWRP (from this tutorial)
                            (suppose you already have adb installed)


                            BOOT with VOL UP + POWER
                            go to DOWNLOAD on right with VOL-UP
                            (wait odin)
                            on PC
                            Start ODIN
                            In AP field select TWRP => twrp311-20171009-p4wifi.tar.md5
                            clic "start"
                            (tablet reboot after install) unconnect USB and close odin
                            BOOT with VOL UP + POWER
                            go to UPDATE on left with VOL-LOW

                            connect tablet with USB

                            2) check ADB

                            ADB should dectect

                            \GalaxyTab10_1>c:\Adb\adb.exe devices
                            List of devices attached
                            C4F125509CFF91F recovery

                            2) boot onto TWRP and push ROM files

                            \GalaxyTab10_1>C:\adb\adb.exe push cm-10-20130825-UNOFFICIAL-p4wifi.zip /tmp
                            1300 KB/s (160472620 bytes in 120.502s)

                            \GalaxyTab10_1>C:\adb\adb.exe push gapps-jb-20121011-signed.zip /tmp
                            1295 KB/s (92706064 bytes in 69.888s)

                            Push SuperUser file
                            \GalaxyTab10_1>C:\adb\adb.exe push superuser.zip /tmp
                            1325 KB/s (3922325 bytes in 2.889s)


                            Install ROM
                            Install Gapps
                            Install SuperUser
                            REBOOT

                            ROM Wiko Ridge Fab 4G - retour d'expérience



                            Wiko Ridge Fab 4 ROM: partage d'expérience


                            Après de nombreux problèmes avec la ROM officielle RIDGE FAB 4G_V14 (publicité sur le launcher ou clavier TouchPal, reboot intempestifs, blocages au démarrage, problèmes de détection de storage, desfois des problèmes avec la charge, et facebook..), et vu que nous ne sommes pas les seuls, nous décidons de changer de ROM.

                            Avec notre téléphone, nous n'avons pas trouvé de ROM non-officielle qui apporte satisfaction (notre exigence: DATA + GPS + CAMERA + STABLE): cf. Mini HowTo (B)

                            Avec la ROM officielle en supprimant TouchPal: cf. Mini HowTo (A).
                            Notre expérience: après 3 jours dans cette configuration, le téléphone est plutôt stable, il n'a fait que 2 reboot (non désirés) lors d'installations d'application. Après 20 jours, des problèmes de plantages d'applications google apparaissent. Très vite le téléphone ne boot plus.
                            Conclusion: changement de téléphone!


                            Wiko Ridge Fab 4 ROM: our feedback



                            Following multiples issues with official ROM (advertising from the laucher or TouchPal keyboard, unwanted reboots, startup hangs, storage detection issue, sometimes recharging issue or facebook issue..) and as we are not alone in this case, we decided to change ROM.

                            With our phone, we didn't found unofficial ROM which brig us satisfaction (DATA+GPS+CAMERA+STABLE): cf. Mini HowTo (B)

                            Other way: re-install official ROM and remove the TouchPal application: cf. Mini HowTo (A).
                            Our feedback: following 3 days in this configuration, phone seems stable. We just encounter 2 unwanted reboots while installing apps. Following 20 days, we encounter some hang issue with google app, and then few days after the phone were not able to boot anymore.

                            Conclusion: change the phone!

                            Resources




                            NomExperience in my case: keeping in mind that each phone have it's own hardware issue ;)
                            cyanogenmod-unofficial Boot OK, Wifi OK, Camera OK but need to disable GPS Location to make it working. With GPS enabled, the phone hang when taping on application icon.
                            Day2: the mobile is not able to find 2G/3G/4G ! :(
                            maxicm-5-1-1-unofficial boot OK, wifi OK, but camera and GGMaps hangs the phone after fiew seconds!! :(
                            lineageos-13 (need to retest with gapps!) seems stable but there is some matter: no camera + batterie issue
                            resurrection-remix not tested because of forum feedback:
                            Mobile data doesn't work.
                            Camera works but for a few seconds. Then device hangs.
                            SlimLP not tested following ASAZING answer: "Mobile data and gps do not work"

                            HowTo pre-requisites


                            check adb is detecting your device:
                            (from mobile)
                            • power + volume UP  until vibration
                              • (else try volume DOWN on some device)
                            • "apply update from adb"
                            (from workstation)
                              c:\adb\adb.exe devices
                            
                            • your device must be listed

                            HowTo: boot on TWRP recovery



                            (from workstation)
                              c:\adb\fastboot.exe boot TWRP_L5320.img
                            
                              (command is now waiting the phone...)

                            (from mobile)
                            • power + volume UP  until vibration
                            • "reboot to bootloader" (line 5)



                            Mini HowTo (A) re-install Official ROM from scratch onto WIko Ridge Fab 4G 5320 (with Snapdragon) and remove TouchPal



                            If you follow this steps, it's at your own risks. We can't be responsible if you brick your phone

                            • push SuperSu on the phone:

                            c:\adb\adb.exe push SuperSU-v2.82-201705271822.zip /tmp
                            
                            • install SuperSU using TWRP

                            • reboot the phone
                            • via Android parameters ("Langue et saisie"), move from Touchpal keyboard to Google keyboard.
                            • install Désinstalleur App System(ROOT) (SuperSu required)
                            • with this application, uninstall "TouchPal 2015" (and associated langage packs)!!




                            Mini HowTo (B) install Custom Unofficial ROM onto WIko Ridge Fab 4G 5320 (with Snapdragon)



                            If you follow this steps, it's at your own risks. We can't be responsible if you brick your phone

                            From following samples: (getdroidtips.com) lineage-os-13-wiko-ridge-fab-4g and (phonandroid.com) Root Ridge4G



                            What "patch" means ? (5320 only)
                            • download ROM + patch
                            • push ROM (ex. for L5510) on the phone using adb
                            • push patch (ex. from 5320) on the phone using adb
                            • onto TWRP :
                            • install ROM (dont reboot)
                            • (got back)
                            • install patch (dont reboot)
                            • (got back)
                            • install GAPPS
                            • reboot

                            Install ROM from TWRP:
                            • boot on TWRP recovery (already described)
                            • lets do a Backup ! (use menu option and follow instructions, check system and data partitions)
                            • push your ROM (and patch) file(s) on the phone  (adapt zip path+filename)
                            (from workstation for MaxiCM ROM)
                            c:\adb\adb.exe push MaxiCM-5.1-20170209-UNOFFICIAL-l5510.zip /sdcard
                            c:\adb\adb.exe push kernel_ASAZING-L5320.zip /sdcard
                            c:\adb\adb.exe push open_gapps-arm-5.1-super-20171224.zip /sdcard
                            
                            (from workstation for Cyanogem ROM)
                            c:\adb\adb.exe push cm-12.1-20170211-UNOFFICIAL-l5510.zip /sdcard
                            c:\adb\adb.exe push kernel_ASAZING-L5320.zip /sdcard
                            c:\adb\adb.exe push open_gapps-arm-5.1-super-20171224.zip /sdcard
                            

                            • ( optionnal ) if you need more space, remove older ROM

                            (from workstation)
                            c:\adb\adb.exe shell
                            cd /sdcard
                            ls
                            rm OLD_ROM_SAMPLE.zip
                            exit
                            
                            • HowTo flash ROM on the phone 
                            (from phone / TWRP recovery)
                            - "wipe" data (fr: formatter)
                              - "advanced Wipe"
                              - check cache + System + data
                              - swipe to wipe
                            - back back back
                            - "install" rom ("flash" with TWRP):
                              - select pushed file: ROM
                                 - dont check zip signature and dont check reboot
                                 - swipe to confirm Flash
                                 - at the end, back
                              - (option) select pushed file: PATCH (eg. kernel_ASAZING..)
                              - dont check zip signature and dont check reboot
                                 - swipe to confirm Flash
                              - select pushed file: GAPPS
                              - dont check zip signature and dont check reboot
                                 - swipe to confirm Flash
                            - at the end, Wipe cache/dalvik, swipe to Wipe
                            - then "Reboot System"
                            


                            Mots clés du blog

                            10.1 4G acceptancetest adb androï Android androïd Android7 api appender appengine application applications archive array assistantematernelle astuce auth0 authentication authority automation Axis bash bearer blog boot bootloader bower build bundle c calendrier camille combal cdi certificate cf client cloudfoundry collaboratif command commandes connexion console css cyanogen decrypt démasquées démasquer développement dll dump easter eggs écologie écrit employeur EMUI EMUI5.0 encrypt enfant évènement export-package ExtJS fab fastboot fiche find firefox gadget galaxytab gelf gem git gmail gnupg gooelappengine google gparted gpg gpg2 gps graylog grenoble Grid gui harddrive heroku hover howto HTML http https IE ihm immobilier imprimante innovation insolite instance integration Java JavaScript jenkins jeu jobs json json-schema-validator key keystore labs linux livre log log4j logger logs lombok masquées masquer maven maven-gae-plugin Mémoire microsoft mobile mockito mondialisation monitor MUSE musique en ligne myopera nodejs npm NT NTEventLogger onglet openstack osgi paas package parameters parent php politique prosyst prototype proxies proxy quartz radio rappel recherche regex repository resize RIA ridge rock ROM route ruby rubygems s8500 samsung scheduler scm secret secure sel selenium Serializer server shared shell sign signature slf4j smartphone so société song spy ssh ssl struct swagger swig tâches téléphone téléréalité test thunderbird timeout token Tomcat tooltip tooltips truststore TWRP ubuntu unit test validator verify virgin virtualbox wave waze web WebApp wiki wikimedia wikipédia wikipen wiko windows yahoo youtube yum