diff --git a/rsa-oaep-decrypt.c b/rsa-oaep-decrypt.c
index 4006a021..30e4cbae 100644
--- a/rsa-oaep-decrypt.c
+++ b/rsa-oaep-decrypt.c
@@ -81,6 +81,40 @@ _rsa_oaep_decrypt (const struct rsa_public_key *pub,
   return res;
 }
 
+int
+rsa_oaep_md5_decrypt (const struct rsa_public_key *pub,
+			 const struct rsa_private_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t *length, uint8_t *message,
+			 const uint8_t *ciphertext)
+{
+  struct md5_ctx ctx;
+
+  md5_init (&ctx);
+
+  return _rsa_oaep_decrypt (pub, key, random_ctx, random,
+			    &ctx, &nettle_md5, label_length, label,
+			    length, message, ciphertext);
+}
+
+int
+rsa_oaep_sha1_decrypt (const struct rsa_public_key *pub,
+			 const struct rsa_private_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t *length, uint8_t *message,
+			 const uint8_t *ciphertext)
+{
+  struct sha1_ctx ctx;
+
+  sha1_init (&ctx);
+
+  return _rsa_oaep_decrypt (pub, key, random_ctx, random,
+			    &ctx, &nettle_sha1, label_length, label,
+			    length, message, ciphertext);
+}
+
 int
 rsa_oaep_sha256_decrypt (const struct rsa_public_key *pub,
 			 const struct rsa_private_key *key,
diff --git a/rsa-oaep-encrypt.c b/rsa-oaep-encrypt.c
index 488821f0..26ee6a18 100644
--- a/rsa-oaep-encrypt.c
+++ b/rsa-oaep-encrypt.c
@@ -70,6 +70,44 @@ _rsa_oaep_encrypt (const struct rsa_public_key *key,
   return 0;
 }
 
+int
+rsa_oaep_md5_encrypt (const struct rsa_public_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t length, const uint8_t *message,
+			 uint8_t *ciphertext)
+{
+  struct md5_ctx ctx;
+
+  md5_init (&ctx);
+
+  return _rsa_oaep_encrypt (key,
+			    random_ctx, random,
+			    &ctx, &nettle_md5,
+			    label_length, label,
+			    length, message,
+			    ciphertext);
+}
+
+int
+rsa_oaep_sha1_encrypt (const struct rsa_public_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t length, const uint8_t *message,
+			 uint8_t *ciphertext)
+{
+  struct sha1_ctx ctx;
+
+  sha1_init (&ctx);
+
+  return _rsa_oaep_encrypt (key,
+			    random_ctx, random,
+			    &ctx, &nettle_sha1,
+			    label_length, label,
+			    length, message,
+			    ciphertext);
+}
+
 int
 rsa_oaep_sha256_encrypt (const struct rsa_public_key *key,
 			 void *random_ctx, nettle_random_func *random,
diff --git a/rsa.h b/rsa.h
index 054b318c..5e931e84 100644
--- a/rsa.h
+++ b/rsa.h
@@ -88,6 +88,10 @@ extern "C" {
 #define rsa_encrypt nettle_rsa_encrypt
 #define rsa_decrypt nettle_rsa_decrypt
 #define rsa_decrypt_tr nettle_rsa_decrypt_tr
+#define rsa_oaep_md5_encrypt nettle_rsa_oaep_md5_encrypt
+#define rsa_oaep_md5_decrypt nettle_rsa_oaep_md5_decrypt
+#define rsa_oaep_sha1_encrypt nettle_rsa_oaep_sha1_encrypt
+#define rsa_oaep_sha1_decrypt nettle_rsa_oaep_sha1_decrypt
 #define rsa_oaep_sha256_encrypt nettle_rsa_oaep_sha256_encrypt
 #define rsa_oaep_sha256_decrypt nettle_rsa_oaep_sha256_decrypt
 #define rsa_oaep_sha384_encrypt nettle_rsa_oaep_sha384_encrypt
@@ -434,6 +438,36 @@ rsa_sec_decrypt(const struct rsa_public_key *pub,
 
 /* RSA encryption, using OAEP */
 
+int
+rsa_oaep_md5_encrypt (const struct rsa_public_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t length, const uint8_t * message,
+			 uint8_t *ciphertext);
+
+int
+rsa_oaep_md5_decrypt (const struct rsa_public_key *pub,
+			 const struct rsa_private_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t *length, uint8_t *message,
+			 const uint8_t *ciphertext);
+
+int
+rsa_oaep_sha1_encrypt (const struct rsa_public_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t length, const uint8_t * message,
+			 uint8_t *ciphertext);
+
+int
+rsa_oaep_sha1_decrypt (const struct rsa_public_key *pub,
+			 const struct rsa_private_key *key,
+			 void *random_ctx, nettle_random_func *random,
+			 size_t label_length, const uint8_t *label,
+			 size_t *length, uint8_t *message,
+			 const uint8_t *ciphertext);
+
 int
 rsa_oaep_sha256_encrypt (const struct rsa_public_key *key,
 			 void *random_ctx, nettle_random_func *random,
diff --git a/testsuite/rsa-oaep-encrypt-test.c b/testsuite/rsa-oaep-encrypt-test.c
index 511c2744..3f4278d1 100644
--- a/testsuite/rsa-oaep-encrypt-test.c
+++ b/testsuite/rsa-oaep-encrypt-test.c
@@ -151,6 +151,18 @@ test_encrypt_decrypt (void)
   test_rsa_set_key_2(&pub, &key);
 
   /* Test without label */
+  test_rsa_oaep_encrypt_decrypt (&pub, &key,
+				 rsa_oaep_md5_encrypt,
+				 rsa_oaep_md5_decrypt,
+				 0, NULL,
+				 msg_length, msg);
+
+  test_rsa_oaep_encrypt_decrypt (&pub, &key,
+				 rsa_oaep_sha1_encrypt,
+				 rsa_oaep_sha1_decrypt,
+				 0, NULL,
+				 msg_length, msg);
+
   test_rsa_oaep_encrypt_decrypt (&pub, &key,
 				 rsa_oaep_sha256_encrypt,
 				 rsa_oaep_sha256_decrypt,
@@ -170,6 +182,18 @@ test_encrypt_decrypt (void)
 				 msg_length, msg);
 
   /* Test with label */
+  test_rsa_oaep_encrypt_decrypt (&pub, &key,
+				 rsa_oaep_md5_encrypt,
+				 rsa_oaep_md5_decrypt,
+				 label_length, label,
+				 msg_length, msg);
+
+  test_rsa_oaep_encrypt_decrypt (&pub, &key,
+				 rsa_oaep_sha1_encrypt,
+				 rsa_oaep_sha1_decrypt,
+				 label_length, label,
+				 msg_length, msg);
+
   test_rsa_oaep_encrypt_decrypt (&pub, &key,
 				 rsa_oaep_sha256_encrypt,
 				 rsa_oaep_sha256_decrypt,
@@ -192,42 +216,6 @@ test_encrypt_decrypt (void)
   rsa_private_key_clear (&key);
 }
 
-static int
-rsa_oaep_sha1_encrypt (const struct rsa_public_key *key,
-		       void *random_ctx, nettle_random_func *random,
-		       size_t label_length, const uint8_t *label,
-		       size_t length, const uint8_t *message,
-		       uint8_t *ciphertext)
-{
-  struct sha1_ctx ctx;
-
-  sha1_init (&ctx);
-
-  return _rsa_oaep_encrypt (key,
-			    random_ctx, random,
-			    &ctx, &nettle_sha1,
-			    label_length, label,
-			    length, message,
-			    ciphertext);
-}
-
-static int
-rsa_oaep_sha1_decrypt (const struct rsa_public_key *pub,
-			 const struct rsa_private_key *key,
-			 void *random_ctx, nettle_random_func *random,
-			 size_t label_length, const uint8_t *label,
-			 size_t *length, uint8_t *message,
-			 const uint8_t *ciphertext)
-{
-  struct sha1_ctx ctx;
-
-  sha1_init (&ctx);
-
-  return _rsa_oaep_decrypt (pub, key, random_ctx, random,
-			    &ctx, &nettle_sha1, label_length, label,
-			    length, message, ciphertext);
-}
-
 static void
 random_from_seed (struct tstring *seed, size_t n, uint8_t *dst)
 {
