shithub: riscv

Download patch

ref: 00575e07bbc3ea12a174732a4a8328787b4f210f
parent: 96769e04765511047981e7962d91b979e841f01f
author: cinap_lenrek <[email protected]>
date: Sun Feb 5 00:15:17 EST 2017

libsec: have rsagen() always produce postive !dk to avoid confusion

--- a/sys/src/libsec/port/rsagen.c
+++ b/sys/src/libsec/port/rsagen.c
@@ -39,6 +39,8 @@
 			break;
 		mpadd(mpone, e, e);
 	}
+	if(d->sign < 0)
+		mpadd(phi, d, d);
 	mpfree(t1);
 	mpfree(t2);