GPG Encryption in Vimtouch

52 views
Skip to first unread message

Gregory Manning

unread,
May 19, 2014, 10:02:45 AM5/19/14
to vimtouch...@googlegroups.com
On windows, I use the gnupg plugin[0] to save and load file.txt.gpg
files seamlessly. I'd like to do something similar on android. (Actually
I'm mostly interested in writing files in vim, encrypting them to myself
for later reading on other devices - I'd be happy with just encryption -
no signing, no decryption).

I've tried installing Gnu privacy guard[1] which gives me a gpg
excutable under /data/data/info.guardianproject.gpg/app_opt/aliases/gpg.
I've set up my .vimrc with settings that vim-gnupg expects.

When I run this from the adb shell I get sensible looking output[Sane
GPG output].

VimTouch seems to pick up the plugin, but when I open a file
test.txt.gpg, I get errors.

I enabled the debug logging in vim-gnupg. The contents are below[Log file].

I think that the system call here[2] is not working - it's giving return
code 122 and no output.

Does anyone with more idea about vimtouch have any idea what to try next?

Thanks,

Greg.

[0]: http://www.vim.org/scripts/script.php?script_id=3645
[1]: https://play.google.com/store/apps/details?id=info.guardianproject.gpg
[2]:
https://github.com/jamessan/vim-gnupg/blob/master/plugin/gnupg.vim#L1271-L1275

[Log file]:

shell@mako:/ $ cat sdcard/gpglog.txt
cat sdcard/gpglog.txt

GnuPG: >>>>>>>> Entering s:GPGInit(1)
GnuPG: gnupg.vim 2.5
GnuPG: shellredirsave: >%s 2>&1
GnuPG: shellsave: sh
GnuPG: shelltempsave: 1
GnuPG: shell: /bin/sh
GnuPG: shellcmdflag: -c
GnuPG: shellxquote:
GnuPG: shellredir: >%s 2>&1
GnuPG: stderrredirnull: 2>/dev/null
GnuPG: shell implementation: /bin/sh
GnuPG: command: LANG=C LC_ALL=C
/data/data/info.guardianproject.gpg/app_opt/aliases/gpg --no-use-agent
--version 2>/dev/
null
GnuPG: rc: 122
GnuPG: output:
GnuPG: public key algorithms:
GnuPG: cipher algorithms:
GnuPG: hashing algorithms:
GnuPG: compression algorithms:
GnuPG: <<<<<<<< Leaving s:GPGInit()
GnuPG: >>>>>>>> Entering s:GPGDecrypt(1)
GnuPG: command: LANG=C LC_ALL=C
/data/data/info.guardianproject.gpg/app_opt/aliases/gpg --no-use-agent
--verbose --decry
pt --list-only --dry-run --batch --no-use-agent --logger-fd 1
'/storage/emulated/0/temp/test.txt.gpg' 2>/dev/null
GnuPG: rc: 122
GnuPG: output:
GnuPG: this file is not encrypted
GnuPG: <<<<<<<< Leaving s:GPGDecrypt()
GnuPG: >>>>>>>> Entering s:GPGBufReadPost()
GnuPG: called BufReadPost autocommand for /storage/emulated/0/temp/test.txt
GnuPG: <<<<<<<< Leaving s:GPGBufReadPost()
GnuPG: >>>>>>>> Entering s:GPGCleanup()
GnuPG: <<<<<<<< Leaving s:GPGCleanup()


[Sane GPG output]:

shell@mako:/ $ /data/data/info.guardianproject.gpg/app_opt/aliases/gpg
--version
gpg/app_opt/aliases/gpg --version
<
WARNING: linker: libgcrypt.so has text relocations. This is wasting
memory and is a security risk. Please fix.
gpg (GnuPG) 2.1.0-beta269
libgcrypt 1.6.2-beta4
NOTE: THIS IS A DEVELOPMENT VERSION!
It is only intended for test purposes and should NOT be
used in a production environment or with production keys!
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /data/data/info.guardianproject.gpg/app_gnupghome/uid=2000(shell)
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECC, ECC
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES128, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB
shell@mako:/ $

Reply all
Reply to author
Forward
0 new messages