add FIPS RSA test loader + tests
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 352085a..cc57665 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -23,7 +23,7 @@
 from .utils import (
     load_nist_vectors, load_vectors_from_file, load_cryptrec_vectors,
     load_hash_vectors, check_for_iface, check_backend_support,
-    select_backends, load_pkcs1_vectors
+    select_backends, load_pkcs1_vectors, load_rsa_nist_vectors
 )
 
 
@@ -1037,3 +1037,67 @@
             "secret": b"12345678901234567890",
         },
     ]
+
+
+def test_load_rsa_nist_vectors():
+    vector_data = textwrap.dedent("""
+    # SHA Algorithm selected:SHA1 SHA224 SHA256 SHA384 SHA512
+    # Salt len: 20
+
+    [mod = 1024]
+
+    n = bcb47b2e0dafcba81ff2a2b5cb115ca7e757184c9d72bcdcda707a146b3b4e29989d
+
+    e = 00000000000000000000000000000000000000000000000000000000000000000010001
+    SHAAlg = SHA1
+    Msg = 1248f62a4389f42f7b4bb131053d6c88a994db2075b912ccbe3ea7dc611714f14e
+    S = 682cf53c1145d22a50caa9eb1a9ba70670c5915e0fdfde6457a765de2a8fe12de97
+
+    SHAAlg = SHA384
+    Msg = e511903c2f1bfba245467295ac95413ac4746c984c3750a728c388aa628b0ebf
+    S = 9c748702bbcc1f9468864cd360c8c39d007b2d8aaee833606c70f7593cf0d1519
+
+    [mod = 1024]
+
+    n = 1234567890
+
+    e = 0010001
+
+    SHAAlg = SHA512
+    Msg = 3456781293fab829
+    S = deadbeef0000
+    """).splitlines()
+
+    vectors = load_rsa_nist_vectors(vector_data)
+    assert vectors == [
+        {
+            "modulus": int("bcb47b2e0dafcba81ff2a2b5cb115ca7e757184c9d72bcdcda"
+                           "707a146b3b4e29989d", 16),
+            "public_exponent": 65537,
+            "algorithm": b"SHA1",
+            "salt_length": 20,
+            "msg": b"1248f62a4389f42f7b4bb131053d6c88a994db2075b912ccbe3ea7dc6"
+                   b"11714f14e",
+            "s": b"682cf53c1145d22a50caa9eb1a9ba70670c5915e0fdfde6457a765de2a8"
+                 b"fe12de97"
+        },
+        {
+            "modulus": int("bcb47b2e0dafcba81ff2a2b5cb115ca7e757184c9d72bcdcda"
+                           "707a146b3b4e29989d", 16),
+            "public_exponent": 65537,
+            "algorithm": b"SHA384",
+            "salt_length": 20,
+            "msg": b"e511903c2f1bfba245467295ac95413ac4746c984c3750a728c388aa6"
+                   b"28b0ebf",
+            "s": b"9c748702bbcc1f9468864cd360c8c39d007b2d8aaee833606c70f7593cf"
+                 b"0d1519"
+        },
+        {
+            "modulus": 78187493520,
+            "public_exponent": 65537,
+            "algorithm": b"SHA512",
+            "salt_length": 20,
+            "msg": b"3456781293fab829",
+            "s": b"deadbeef0000"
+        },
+    ]
diff --git a/tests/utils.py b/tests/utils.py
index 519edb4..b97c7f7 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -298,3 +298,44 @@
             if key is not None and attr is not None:
                 key[attr].append(line.strip())
     return vectors
+
+
+def load_rsa_nist_vectors(vector_data):
+    test_data = None
+    data = []
+
+    for line in vector_data:
+        line = line.strip()
+
+        # Blank lines and section headers are ignored
+        if not line or line.startswith("["):
+            continue
+
+        if line.startswith("# Salt len:"):
+            salt_length = int(line.split(":")[1].strip())
+            continue
+        elif line.startswith("#"):
+            continue
+
+        # Build our data using a simple Key = Value format
+        name, value = [c.strip() for c in line.split("=")]
+
+        if name == "n":
+            n = int(value, 16)
+        elif name == "e":
+            e = int(value, 16)
+        elif name == "SHAAlg":
+            test_data = {
+                "modulus": n,
+                "public_exponent": e,
+                "salt_length": salt_length,
+                "algorithm": value.encode("ascii")
+            }
+            data.append(test_data)
+            continue
+        # For all other tokens we simply want the name, value stored in
+        # the dictionary
+        else:
+            test_data[name.lower()] = value.encode("ascii")
+
+    return data