Fix the bug of EdDSA signing
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 9 Feb 2015 07:28:26 +0000 (16:28 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 9 Feb 2015 07:28:26 +0000 (16:28 +0900)
ChangeLog
src/openpgp.c

index 50fba87..f9d1b37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-09  Niibe Yutaka  <gniibe@fsij.org>
+
+       * src/openpgp.c (cmd_pso): Fix eddsa. Use GPG_KEY_FOR_SIGNING.
+
 2014-12-15  Niibe Yutaka  <gniibe@fsij.org>
 
        * VERSION: 1.1.4.
index e1d1203..5976255 100644 (file)
@@ -900,9 +900,9 @@ cmd_pso (void)
 
          res_APDU_size = EDDSA_SIGNATURE_LENGTH;
          r = eddsa_sign_25519 (apdu.cmd_apdu_data, len, output,
-                               kd[GPG_KEY_FOR_AUTHENTICATION].data,
-                               kd[GPG_KEY_FOR_AUTHENTICATION].data+32,
-                               kd[GPG_KEY_FOR_AUTHENTICATION].pubkey);
+                               kd[GPG_KEY_FOR_SIGNING].data,
+                               kd[GPG_KEY_FOR_SIGNING].data+32,
+                               kd[GPG_KEY_FOR_SIGNING].pubkey);
          memcpy (res_APDU, output, EDDSA_SIGNATURE_LENGTH);
        }
     }