Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I have a file which I edit and encrypt following this guide : http://emacs.wordpress.com/2008/07/18/keeping-your-secrets-secret/ I'm a noob as far as security goes and thought that the point of including the line which specifies the cryptographic key to use -*- mode: org -*- -*- epa-file-encrypt-to: ("my_key_email@foo.org") -*- would therefore require me (specified by my email) to enter in my passphrase. However, it seems that I'm doing things wrong as I'm instead doing symmetric encryption instead. I know I'm doing symmetric encryption because I am never prompted for my_key_email@foo.org's passphrase. I can list the keys in emacs and my email shows up in the list when I "M-x epa-list-keys"

Can someone point out where I'm going wrong such that I can use my passphrase to encrypt the files? I want to prevent locking myself out by accidentally encrypting the file with a new password, which sadly has happened. :( And from what I've read so far, cracking the file is dang near impossible.

For completeness sake here is my .emacs file:

(require 'whitespace)
(setq whitespace-style (quote (spaces tabs newline space-mark tab-mark newline-mark)))

;; EasyPG
(require 'epa)
(epa-file-enable)

(defadvice epg--start (around advice-epg-disable-agent disable)
"Make epg--start not able to find a gpg-agent"
(let ((agent (getenv "GPG_AGENT_INFO")))
(setenv "GPG_AGENT_INFO" nil)
ad-do-it
(setenv "GPG_AGENT_INFO" agent)))
;;(setenv "GPG_AGENT_INFO" pinentry)))

(defun epg-disable-agent ()
  "Make EasyPG bypass any gpg-agent"
  (interactive)
  (ad-enable-advice 'epg--start 'around 'advice-epg-disable-agent)
  (ad-activate 'epg--start)
  (message "EasyPG gpg-agent bypassed"))

(defun epg-enable-agent ()
  "Make EasyPG use a gpg-agent after having been disabled with epg-disable-agent"
  (interactive)
  (ad-disable-advice 'epg--start 'around 'advice-epg-disable-agent)
  (ad-activate 'epg--start)
  (message "EasyPG gpg-agent re-enabled"))

;;added to overcome bug in gnupg2 in Arch linux as pointed out here: http://www.emacswiki.org/emacs/EasyPG
(when (file-executable-p "/usr/bin/gpg1")
(setq epg-gpg-program "/usr/bin/gpg1"))
`
share|improve this question
    
I'm assuming that you generated keys? gpg --key-gen –  schroeder Jun 25 '13 at 21:40
    
I believe that I was using keys created using ssh-keygen. All three computers have a combination of rsa and/or edcsa keys in .ssh/ –  N Klosterman Jun 27 '13 at 15:56
    
ssh keys != gpg keys. –  Jürgen A. Erhard Aug 19 '13 at 9:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.