Gentoo Archives: gentoo-commits

From: "Kristian Fiskerstrand (k_f)" <k_f@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/sks/files: sks-1.1.5-eddsa.patch
Date: Mon, 02 Feb 2015 23:18:32
Message-Id: 20150202231826.EB2B810ECF@oystercatcher.gentoo.org
1 k_f 15/02/02 23:18:26
2
3 Added: sks-1.1.5-eddsa.patch
4 Log:
5 Add support for EdDSA (Ed25519) from the upstream master branch
6
7 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xFED5002857C1ABFA!)
8
9 Revision Changes Path
10 1.1 net-misc/sks/files/sks-1.1.5-eddsa.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/sks/files/sks-1.1.5-eddsa.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/sks/files/sks-1.1.5-eddsa.patch?rev=1.1&content-type=text/plain
14
15 Index: sks-1.1.5-eddsa.patch
16 ===================================================================
17 diff -r 4d5e4fd7c1c2 CHANGELOG
18 --- a/CHANGELOG Mon Aug 11 20:56:45 2014 -0500
19 +++ b/CHANGELOG Tue Feb 03 00:01:20 2015 +0100
20 @@ -1,3 +1,7 @@
21 +Development:
22 + - Add support for EdDSA key using Ed25519 signature scheme
23 + (http://www.ietf.org/id/draft-koch-eddsa-for-openpgp-00.txt)
24 +
25 1.1.5
26 - Fixes for machine-readable indices. Key expiration times are now read
27 from self-signatures on the key's UIDs. In addition, instead of 8-digit
28 diff -r 4d5e4fd7c1c2 common.ml
29 --- a/common.ml Mon Aug 11 20:56:45 2014 -0500
30 +++ b/common.ml Tue Feb 03 00:01:20 2015 +0100
31 @@ -47,7 +47,7 @@
32 (* for Release versions, COMMONCAMLFLAGS in Makefile should include *)
33 (* '-warn-error a'. Development work should use '-warn-error A' for stricter *)
34 (* language checking. This affects the Ocaml compiler beginning with v4.01.0 *)
35 -let version_suffix = "" (* + for development branch *)
36 +let version_suffix = "+" (* + for development branch *)
37 let compatible_version_tuple = (0,1,5)
38 let version =
39 let (maj_version,min_version,release) = version_tuple in
40 diff -r 4d5e4fd7c1c2 packet.ml
41 --- a/packet.ml Mon Aug 11 20:56:45 2014 -0500
42 +++ b/packet.ml Tue Feb 03 00:01:20 2015 +0100
43 @@ -163,6 +163,7 @@
44 | 19 -> "ECDSA (ECC)" (* RFC 6637 *)
45 | 20 -> "Elgamal (Encrypt or Sign)"
46 | 21 -> "Reserved for Diffie-Hellman (X9.42) as defined for IETF-S/MIME"
47 + | 22 -> "EdDSA"
48 | x when x >= 100 && x <= 110 -> "Private/Experimental algorithm."
49 | _ -> "Unknown Public Key Algorithm"
50
51 @@ -252,10 +253,11 @@
52 | 2 -> "r" (* RSA encrypt *)
53 | 3 -> "s" (* RSA sign *)
54 | 16 -> "g" (* ElGamal encrypt *)
55 - | 20 -> "G" (* ElGamal sign and encrypt *)
56 | 17 -> "D" (* DSA *)
57 | 18 -> "e" (* ECDH *)
58 | 19 -> "E" (* ECDSA *)
59 + | 20 -> "G" (* ElGamal sign and encrypt *)
60 + | 22 -> "E" (* EdDSA *)
61 | _ -> "?" (* NoClue *)
62
63 (** writes out packet, using old-style packets when possible *)
64 diff -r 4d5e4fd7c1c2 parsePGP.ml
65 --- a/parsePGP.ml Mon Aug 11 20:56:45 2014 -0500
66 +++ b/parsePGP.ml Tue Feb 03 00:01:20 2015 +0100
67 @@ -150,6 +150,7 @@
68 | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0b" -> 384 (* brainpoolP384r1 *)
69 | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0d" -> 512 (* brainpoolP512r1 *)
70 | "\x2b\x81\x04\x00\x0a" -> 256 (* secp256k1 *)
71 + | "\x2b\x06\x01\x04\x01\xda\x47\x0f\x01" -> 256 (* Ed25519 *)
72 | _ -> failwith "Unknown OID"
73 in
74 psize
75 @@ -168,6 +169,7 @@
76 in
77 (mpi, psize)
78
79 + (* Algorithm specific fields for ECDSA and EdDSA *)
80 let parse_ecdsa_pubkey cin =
81 let length = cin#read_int_size 1 in
82 let oid = cin#read_string length in
83 @@ -185,7 +187,7 @@
84 let algorithm = cin#read_byte in
85 let (tmpmpi, tmpsize) = match algorithm with
86 | 18 -> parse_ecdh_pubkey cin
87 - | 19 -> ( {mpi_bits = 0; mpi_data = ""}, (parse_ecdsa_pubkey cin))
88 + | 19 | 22 -> ( {mpi_bits = 0; mpi_data = ""}, (parse_ecdsa_pubkey cin))
89 | _ -> ( {mpi_bits = 0; mpi_data = ""} , -1 )
90 in
91 let mpis = match algorithm with
92 @@ -205,7 +207,7 @@
93 pk_ctime = creation_time;
94 pk_expiration = (match expiration with Some 0 -> None | x -> x);
95 pk_alg = algorithm;
96 - pk_keylen = (match algorithm with |18|19 -> psize | _ -> mpi.mpi_bits);
97 + pk_keylen = (match algorithm with |18|19|22 -> psize | _ -> mpi.mpi_bits);
98 }
99
100 (********************************************************)