* [PATCH] Update epg.el algorithm id-name association lists
@ 2019-06-22 6:48 Teemu Likonen
2019-06-22 9:07 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Teemu Likonen @ 2019-06-22 6:48 UTC (permalink / raw)
To: emacs-devel; +Cc: ueno, mwolson
[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]
Add some new algorithm identifier numbers and names to the following
defconst definitions in file epg.el:
epg-cipher-algorithm-alist
epg-pubkey-algorithm-alist
epg-digest-algorithm-alist
epg-compress-algorithm-alist
The identifiers come from GnuPG (The GNU Privacy Guard) source code
file "common/openpgpdefs.h". The relevant parts are quoted below.
typedef enum
{
CIPHER_ALGO_NONE = 0,
CIPHER_ALGO_IDEA = 1,
CIPHER_ALGO_3DES = 2,
CIPHER_ALGO_CAST5 = 3,
CIPHER_ALGO_BLOWFISH = 4, /* 128 bit */
/* 5 & 6 are reserved */
CIPHER_ALGO_AES = 7,
CIPHER_ALGO_AES192 = 8,
CIPHER_ALGO_AES256 = 9,
CIPHER_ALGO_TWOFISH = 10, /* 256 bit */
CIPHER_ALGO_CAMELLIA128 = 11,
CIPHER_ALGO_CAMELLIA192 = 12,
CIPHER_ALGO_CAMELLIA256 = 13,
CIPHER_ALGO_PRIVATE10 = 110
}
cipher_algo_t;
[...]
typedef enum
{
PUBKEY_ALGO_RSA = 1,
PUBKEY_ALGO_RSA_E = 2, /* RSA encrypt only (legacy). */
PUBKEY_ALGO_RSA_S = 3, /* RSA sign only (legacy). */
PUBKEY_ALGO_ELGAMAL_E = 16, /* Elgamal encrypt only. */
PUBKEY_ALGO_DSA = 17,
PUBKEY_ALGO_ECDH = 18, /* RFC-6637 */
PUBKEY_ALGO_ECDSA = 19, /* RFC-6637 */
PUBKEY_ALGO_ELGAMAL = 20, /* Elgamal encrypt+sign (legacy). */
/* 21 reserved by OpenPGP. */
PUBKEY_ALGO_EDDSA = 22, /* EdDSA (not yet assigned). */
PUBKEY_ALGO_PRIVATE10 = 110
}
pubkey_algo_t;
typedef enum
{
DIGEST_ALGO_MD5 = 1,
DIGEST_ALGO_SHA1 = 2,
DIGEST_ALGO_RMD160 = 3,
/* 4, 5, 6, and 7 are reserved. */
DIGEST_ALGO_SHA256 = 8,
DIGEST_ALGO_SHA384 = 9,
DIGEST_ALGO_SHA512 = 10,
DIGEST_ALGO_SHA224 = 11,
DIGEST_ALGO_PRIVATE10 = 110
}
digest_algo_t;
typedef enum
{
COMPRESS_ALGO_NONE = 0,
COMPRESS_ALGO_ZIP = 1,
COMPRESS_ALGO_ZLIB = 2,
COMPRESS_ALGO_BZIP2 = 3,
COMPRESS_ALGO_PRIVATE10 = 110
}
compress_algo_t;
---
lisp/epg.el | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lisp/epg.el b/lisp/epg.el
index 0400716845..e8bdd1536f 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -41,7 +41,7 @@ epg-debug-buffer
(defvar epg-agent-file nil)
(defvar epg-agent-mtime nil)
-;; from gnupg/include/cipher.h
+;; from gnupg/common/openpgpdefs.h
(defconst epg-cipher-algorithm-alist
'((0 . "NONE")
(1 . "IDEA")
@@ -56,16 +56,20 @@ epg-cipher-algorithm-alist
(12 . "CAMELLIA256")
(110 . "DUMMY")))
-;; from gnupg/include/cipher.h
+;; from gnupg/common/openpgpdefs.h
(defconst epg-pubkey-algorithm-alist
'((1 . "RSA")
(2 . "RSA_E")
(3 . "RSA_S")
(16 . "ELGAMAL_E")
(17 . "DSA")
- (20 . "ELGAMAL")))
+ (18 . "ECDH")
+ (19 . "ECDSA")
+ (20 . "ELGAMAL")
+ (22 . "EDDSA")
+ (110 . "PRIVATE10")))
-;; from gnupg/include/cipher.h
+;; from gnupg/common/openpgpdefs.h
(defconst epg-digest-algorithm-alist
'((1 . "MD5")
(2 . "SHA1")
@@ -73,14 +77,16 @@ epg-digest-algorithm-alist
(8 . "SHA256")
(9 . "SHA384")
(10 . "SHA512")
- (11 . "SHA224")))
+ (11 . "SHA224")
+ (110 . "PRIVATE10")))
-;; from gnupg/include/cipher.h
+;; from gnupg/common/openpgpdefs.h
(defconst epg-compress-algorithm-alist
'((0 . "NONE")
(1 . "ZIP")
(2 . "ZLIB")
- (3 . "BZIP2")))
+ (3 . "BZIP2")
+ (110 . "PRIVATE10")))
(defconst epg-invalid-recipients-reason-alist
'((0 . "No specific reason given")
--
2.11.0
--
/// Teemu Likonen <https://github.com/tlikonen> //
// PGP: 4E1055DC84E9DFF613D78557719D69D324539450 ///
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-22 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-22 6:48 [PATCH] Update epg.el algorithm id-name association lists Teemu Likonen
2019-06-22 9:07 ` Lars Ingebrigtsen
2019-06-22 11:44 ` Teemu Likonen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).