diff --git a/horizon.dhall b/horizon.dhall
index d6f12131d492706af2a09ac29d36a4671ecf2559..efb5960a30d269caea251300c72f994250a4b1a3 100644
--- a/horizon.dhall
+++ b/horizon.dhall
@@ -822,6 +822,7 @@ let packages =
       , retry = H.callHackage "retry" "0.9.3.0"
       , rope-utf16-splay = H.callHackage "rope-utf16-splay" "0.4.0.0"
       , row-types = H.callHackage "row-types" "1.0.1.2"
+      , RSA = H.callHackage "RSA" "2.4.1"
       , safe-coloured-text-layout =
           H.callHackage "safe-coloured-text-layout" "0.0.0.0"
       , safe-coloured-text-terminfo =
diff --git a/initial-packages.nix b/initial-packages.nix
index 64cedbfc10ae81afed79701d0ab116fc47dfdc0d..6e154bdea854194e0fca79a628033c1469086003 100644
--- a/initial-packages.nix
+++ b/initial-packages.nix
@@ -53,6 +53,8 @@ self: with pkgs.haskell.lib; {
 
   QuickCheck = self.callPackage (./pkgs/QuickCheck.nix) { };
 
+  RSA = self.callPackage (./pkgs/RSA.nix) { };
+
   SHA = self.callPackage (./pkgs/SHA.nix) { };
 
   StateVar = self.callPackage (./pkgs/StateVar.nix) { };
diff --git a/pkgs/RSA.nix b/pkgs/RSA.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0a91233e81eaaaa33a4475d2576e91775b7bffbc
--- /dev/null
+++ b/pkgs/RSA.nix
@@ -0,0 +1,51 @@
+{ mkDerivation
+, QuickCheck
+, SHA
+, base
+, binary
+, bytestring
+, crypto-api
+, crypto-pubkey-types
+, lib
+, tagged
+, test-framework
+, test-framework-quickcheck2
+}:
+mkDerivation {
+  pname = "RSA";
+  version = "2.4.1";
+  sha256 = "72c5d8c45ef1013e0e8aff763bb8894df0f022f28e698e33ae87bbdb33d69041";
+  isLibrary = true;
+  isExecutable = false;
+  enableSeparateDataOutput = false;
+  libraryHaskellDepends = [
+    base
+    binary
+    bytestring
+    crypto-api
+    crypto-pubkey-types
+    SHA
+  ];
+  testHaskellDepends = [
+    base
+    binary
+    bytestring
+    crypto-api
+    crypto-pubkey-types
+    QuickCheck
+    SHA
+    tagged
+    test-framework
+    test-framework-quickcheck2
+  ];
+  enableLibraryProfiling = true;
+  enableExecutableProfiling = true;
+  doHaddock = false;
+  jailbreak = true;
+  doCheck = false;
+  doBenchmark = false;
+  hyperlinkSource = false;
+  description = "Implementation of RSA, using the padding schemes of PKCS#1 v2.1.";
+  license = lib.licenses.bsd3;
+  broken = false;
+}