1

I want to be able to gpg sign specific files, specifically org-mode file.

However, doing M-x epa-sign-file RET filename.org will create the file filename.org.asc and introduce new text in that file that might disrupt functionality of the file if used as the original file. It seems cumbersome to publish both files.

Is there a way to make sure that the file filename.org.asc can be used as the original file.

Minimal working example

example filename.org:

* Should be loaded

#+begin_src emacs-lisp
(message "hello world")
#+end_src

This will be after M-x epa-sign-file RET filename.org -> filename.org.asc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Should be loaded

#+begin_src emacs-lisp
(message "hello world boom")
#+end_src
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJWTNPCAAoJED51s3ZWaq4/D5cH/3ztdd3YZxOu/XCG7bOEZuQa
jcxKrXiwhmLhKoC4a9tmgCJVDryy4tdSci2WUHoIxJ0vN3BFI2txFm7aoxGpIQCk
Dxjczy2RtHeN1+N+wBsxeQq5EeZ0A/7c9+eJQmub2GopAWe6D7rggCAEvnFNFcdN
LcZTo1o/jrKa63Q/KPmN+Y2E2nC4KjICn+SvaVUy2noZzS7c6ofw2dsY7YP915Ng
hs/38aITDMOpapzphQ0/VkJRDAard8U5jGmCIOMGwXyC7NIYVYB69Cdruo8uz/HA
xzl8QpMz/tv7qOLyQJLZYCPAglrt5ZGA19XAuKHqMgfvS563UCmRJdcLuGZaj58=
=3jbG
-----END PGP SIGNATURE-----
Sparx
  • 1,111
  • 9
  • 20
  • 1
    Why not create an MD5SUM of your .org file, then create an encrypted signature of the MD5SUM, MD5SUM.sign, and share the 3 files whenever necessary? That way, your .org file will stay the same. – Nsukami _ Nov 19 '15 at 14:47
  • @Nsukami_this is a really great answer. A side effect is that I can sign multiple files in one go and it can be easily done in the dired buffer. Thanks! – Sparx Nov 19 '15 at 23:09

1 Answers1

1

Not really an Emacs related problem but, one of the solution could be:

  • create a SUM of your .org file,
  • then create an encrypted signature of the SUM file, named SUM.sign,
  • and finally, share the 3 files whenever necessary

That way, your .org file will stay the same.

Nsukami _
  • 6,341
  • 2
  • 22
  • 35