diff --git a/ChangeLog b/ChangeLog
index db5c5763f2e8580c5dd2fc9981972282eeb1e702..7f1b32ddd16be9c5055cd066de74a2cc0f1b9ae9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2003-01-23  Niels Möller  <nisse@cuckoo.hack.org>
+
+	* Makefile.am (libnettle_a_SOURCES): Added new rsa and pkcs1
+	files. Removed old rsa_md5.c and rsa_sha1.c.
+
+	* testsuite/Makefile.am (TS_PROGS): Added pkcs1-test.
+
+	* dsa-verify.c (dsa_verify_digest): New function.
+	(dsa_verify): Most of the code moved to dsa_verify_digest, which
+	is used here.
+	* dsa-sign.c (dsa_sign_digest): New function.
+	(dsa_sign): Most of the code moved to dsa_sign_digest, which is
+	used here.
+	* dsa.c (_dsa_hash): Deleted function.
+
+	* rsa_md5.c, rsa_sha1.c: Deleted files, contents spread over
+	several files for signing and verification.
+	* rsa-sign.c, rsa-sha1-verify.c, rsa-sha1-sign.c,
+	rsa-md5-verify.c, rsa-md5-sign.c:  New files.
+
+	* rsa-sha1-verify.c (rsa_sha1_verify_digest): New function.
+	* rsa-sha1-sign.c (rsa_sha1_sign_digest):  New function.
+	* rsa-md5-verify.c (rsa_md5_verify_digest):  New function.
+	* rsa-md5-sign.c (rsa_md5_sign_digest):  New function.
+	* rsa-verify.c (_rsa_verify): New file, new function.
+
+	* rsa.c (_rsa_check_size): Renamed from rsa_check_size, and made
+	non-static. Private key functions moved to rsa-sign.c.
+
+	* pkcs1.c, pkcs1.h, pkcs1-rsa-md5.c, pkcs1-rsa-sha1.c: New files. 
+	(pkcs1_signature_prefix): New function.
+
+	* testsuite/pkcs1-test.c: New test.
+	
 2003-01-22  Niels Möller  <niels@s3.kth.se>
 
 	* examples/Makefile.am (nettle_benchmark_LDADD): Use
diff --git a/Makefile.am b/Makefile.am
index aa19b7607f5f5ba3b059d78a345b2316bbc60f9f..dba4da819951a2800c178a7b25e1adaf3ab89569 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,8 +18,6 @@ libnettleinclude_HEADERS = aes.h arcfour.h blowfish.h \
 			   serpent.h sha.h twofish.h \
 			   yarrow.h
 
-# FIXME: There's some confusion on - vs _ in source file names.
-# My current belief is that the _-ones ought to be renamed.
 libnettle_a_SOURCES = aes.c aes.h aes-internal.h \
 		      aes-decrypt-table.c aes-decrypt.c \
 		      aes-encrypt-table.c aes-encrypt.c \
@@ -42,7 +40,10 @@ libnettle_a_SOURCES = aes.c aes.h aes-internal.h \
 		      sexp.h sexp.c sexp-format.c \
 		      sexp-transport.c sexp-transport-format.c \
 		      bignum.h bignum.c bignum-random.c sexp2bignum.c \
-		      rsa.h rsa.c rsa_md5.c rsa_sha1.c \
+		      pkcs1.h pkcs1.c pkcs1-rsa-md5.c pkcs1-rsa-sha1.c \
+		      rsa.h rsa.c rsa-sign.c rsa-verify.c \
+		      rsa-md5-sign.c rsa-md5-verify.c \
+		      rsa-sha1-sign.c rsa-sha1-verify.c \
 		      rsa-encrypt.c rsa-decrypt.c \
 		      rsa-keygen.c rsa-compat.h rsa-compat.c \
 		      rsa2sexp.c sexp2rsa.c \