summary history branches tags files
commit:147293bc581373797ab2082b7aff0b49d126d488
author:mrmekon
committer:mrmekon
date:Mon Nov 14 17:13:23 2011 -0500
parents:ef7df9a9504f31e579936ef36032fdf5aca52921
RSA support
diff --git a/simplepgp.xcodeproj/trevor.mode1v3 b/simplepgp.xcodeproj/trevor.mode1v3
line changes: +36/-33
index 33074df..3f8d701
--- a/simplepgp.xcodeproj/trevor.mode1v3
+++ b/simplepgp.xcodeproj/trevor.mode1v3
@@ -275,8 +275,8 @@
 							<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
 							<array>
 								<array>
-									<integer>14</integer>
-									<integer>13</integer>
+									<integer>10</integer>
+									<integer>7</integer>
 									<integer>0</integer>
 								</array>
 							</array>
@@ -300,7 +300,7 @@
 							<real>186</real>
 						</array>
 						<key>RubberWindowFrame</key>
-						<string>91 68 1174 810 0 0 1440 878 </string>
+						<string>-1261 550 1174 810 -1680 385 1680 1050 </string>
 					</dict>
 					<key>Module</key>
 					<string>PBXSmartGroupTreeModule</string>
@@ -311,6 +311,8 @@
 					<key>Dock</key>
 					<array>
 						<dict>
+							<key>BecomeActive</key>
+							<true/>
 							<key>ContentConfiguration</key>
 							<dict>
 								<key>PBXProjectModuleGUID</key>
@@ -328,19 +330,21 @@
 										<key>_historyCapacity</key>
 										<integer>0</integer>
 										<key>bookmark</key>
-										<string>6926B1BE14709E2A00F69705</string>
+										<string>698B3A431471BFD600898269</string>
 										<key>history</key>
 										<array>
 											<string>69868BD91460F468004C5D9B</string>
 											<string>69269F5214620FC500F69705</string>
 											<string>6926ACA7146DC70D00F69705</string>
 											<string>6926ACA8146DC70D00F69705</string>
-											<string>6926AD1F146DCB4800F69705</string>
 											<string>6926AD20146DCB4800F69705</string>
 											<string>6926AD42146DDA7900F69705</string>
 											<string>6926B18414702F1900F69705</string>
-											<string>6926B1A81470319400F69705</string>
-											<string>6926B1AE14709E0900F69705</string>
+											<string>69410DAE1471B1F500CE89DE</string>
+											<string>69410DAF1471B1F500CE89DE</string>
+											<string>698B39C81471B75C00898269</string>
+											<string>698B39E51471B84B00898269</string>
+											<string>698B3A421471BFD600898269</string>
 										</array>
 									</dict>
 									<key>SplitCount</key>
@@ -352,18 +356,16 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 0}, {966, 674}}</string>
+								<string>{{0, 0}, {966, 669}}</string>
 								<key>RubberWindowFrame</key>
-								<string>91 68 1174 810 0 0 1440 878 </string>
+								<string>-1261 550 1174 810 -1680 385 1680 1050 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXNavigatorGroup</string>
 							<key>Proportion</key>
-							<string>674pt</string>
+							<string>669pt</string>
 						</dict>
 						<dict>
-							<key>BecomeActive</key>
-							<true/>
 							<key>ContentConfiguration</key>
 							<dict>
 								<key>PBXProjectModuleGUID</key>
@@ -374,14 +376,14 @@
 							<key>GeometryConfiguration</key>
 							<dict>
 								<key>Frame</key>
-								<string>{{0, 679}, {966, 90}}</string>
+								<string>{{0, 674}, {966, 95}}</string>
 								<key>RubberWindowFrame</key>
-								<string>91 68 1174 810 0 0 1440 878 </string>
+								<string>-1261 550 1174 810 -1680 385 1680 1050 </string>
 							</dict>
 							<key>Module</key>
 							<string>XCDetailModule</string>
 							<key>Proportion</key>
-							<string>90pt</string>
+							<string>95pt</string>
 						</dict>
 					</array>
 					<key>Proportion</key>
@@ -400,9 +402,9 @@
 			</array>
 			<key>TableOfContents</key>
 			<array>
-				<string>6926B1BA14709E2900F69705</string>
+				<string>698B39951471B30400898269</string>
 				<string>1CE0B1FE06471DED0097A5F4</string>
-				<string>6926B1BB14709E2900F69705</string>
+				<string>698B39961471B30400898269</string>
 				<string>1CE0B20306471E060097A5F4</string>
 				<string>1CE0B20506471E060097A5F4</string>
 			</array>
@@ -540,11 +542,12 @@
 	<integer>5</integer>
 	<key>WindowOrderList</key>
 	<array>
+		<string>1CD10A99069EF8BA00B06720</string>
 		<string>69868B2D1460E71D004C5D9B</string>
 		<string>/Users/trevor/Documents/Cocoa Projects/libsimplepgp/simplepgp.xcodeproj</string>
 	</array>
 	<key>WindowString</key>
-	<string>91 68 1174 810 0 0 1440 878 </string>
+	<string>-1261 550 1174 810 -1680 385 1680 1050 </string>
 	<key>WindowToolsV3</key>
 	<array>
 		<dict>
@@ -621,7 +624,7 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>69868B2D1460E71D004C5D9B</string>
-				<string>6926B1BC14709E2900F69705</string>
+				<string>698B39971471B30400898269</string>
 				<string>1CD0528F0623707200166675</string>
 				<string>XCMainBuildResultsModuleGUID</string>
 			</array>
@@ -665,8 +668,8 @@
 										<string>yes</string>
 										<key>sizes</key>
 										<array>
-											<string>{{0, 0}, {316, 198}}</string>
-											<string>{{316, 0}, {378, 198}}</string>
+											<string>{{0, 0}, {316, 201}}</string>
+											<string>{{316, 0}, {378, 201}}</string>
 										</array>
 									</dict>
 									<key>VerticalSplitView</key>
@@ -681,8 +684,8 @@
 										<string>yes</string>
 										<key>sizes</key>
 										<array>
-											<string>{{0, 0}, {694, 198}}</string>
-											<string>{{0, 198}, {694, 183}}</string>
+											<string>{{0, 0}, {694, 201}}</string>
+											<string>{{0, 201}, {694, 180}}</string>
 										</array>
 									</dict>
 								</dict>
@@ -715,12 +718,12 @@
 										<real>148</real>
 									</array>
 									<key>Frame</key>
-									<string>{{316, 0}, {378, 198}}</string>
+									<string>{{316, 0}, {378, 201}}</string>
 									<key>RubberWindowFrame</key>
-									<string>-1633 963 694 422 0 0 1440 878 </string>
+									<string>-878 548 694 422 -1680 385 1680 1050 </string>
 								</dict>
 								<key>RubberWindowFrame</key>
-								<string>-1633 963 694 422 0 0 1440 878 </string>
+								<string>-878 548 694 422 -1680 385 1680 1050 </string>
 							</dict>
 							<key>Module</key>
 							<string>PBXDebugSessionModule</string>
@@ -743,18 +746,18 @@
 			<key>TableOfContents</key>
 			<array>
 				<string>1CD10A99069EF8BA00B06720</string>
-				<string>6926A52E1469DCC900F69705</string>
+				<string>698B39F71471BA9B00898269</string>
 				<string>1C162984064C10D400B95A72</string>
-				<string>6926A52F1469DCC900F69705</string>
-				<string>6926A5301469DCC900F69705</string>
-				<string>6926A5311469DCC900F69705</string>
-				<string>6926A5321469DCC900F69705</string>
-				<string>6926A5331469DCC900F69705</string>
+				<string>698B39F81471BA9B00898269</string>
+				<string>698B39F91471BA9B00898269</string>
+				<string>698B39FA1471BA9B00898269</string>
+				<string>698B39FB1471BA9B00898269</string>
+				<string>698B39FC1471BA9B00898269</string>
 			</array>
 			<key>ToolbarConfiguration</key>
 			<string>xcode.toolbar.config.debugV3</string>
 			<key>WindowString</key>
-			<string>-1633 963 694 422 0 0 1440 878 </string>
+			<string>-878 548 694 422 -1680 385 1680 1050 </string>
 			<key>WindowToolGUID</key>
 			<string>1CD10A99069EF8BA00B06720</string>
 			<key>WindowToolIsVisible</key>

diff --git a/simplepgp.xcodeproj/trevor.pbxuser b/simplepgp.xcodeproj/trevor.pbxuser
line changes: +415/-16
index 2adf291..afcbcc8
--- a/simplepgp.xcodeproj/trevor.pbxuser
+++ b/simplepgp.xcodeproj/trevor.pbxuser
@@ -11,6 +11,7 @@
 		breakpoints = (
 			69868C9D14618450004C5D9B /* packet.c:22 */,
 			69269F4E14620FC200F69705 /* packet.c:232 */,
+			69410DB61471B24400CE89DE /* packet.c:1108 */,
 		);
 		codeSenseManager = 69868AD51460E35F004C5D9B /* Code sense */;
 		perUserDictionary = {
@@ -58,8 +59,8 @@
 					PBXFileDataSource_Warnings_ColumnID,
 				);
 			};
-			PBXPerProjectTemplateStateSaveDate = 342924868;
-			PBXWorkspaceStateSaveDate = 342924868;
+			PBXPerProjectTemplateStateSaveDate = 342995707;
+			PBXWorkspaceStateSaveDate = 342995707;
 		};
 		perUserProjectItems = {
 			69269F5214620FC500F69705 = 69269F5214620FC500F69705 /* PBXTextBookmark */;
@@ -72,7 +73,41 @@
 			6926B1A81470319400F69705 = 6926B1A81470319400F69705 /* PBXTextBookmark */;
 			6926B1AE14709E0900F69705 = 6926B1AE14709E0900F69705 /* PBXTextBookmark */;
 			6926B1BE14709E2A00F69705 = 6926B1BE14709E2A00F69705 /* PBXTextBookmark */;
+			69410DAD1471B1F500CE89DE = 69410DAD1471B1F500CE89DE /* PBXTextBookmark */;
+			69410DAE1471B1F500CE89DE = 69410DAE1471B1F500CE89DE /* PBXTextBookmark */;
+			69410DAF1471B1F500CE89DE = 69410DAF1471B1F500CE89DE /* PBXTextBookmark */;
+			69410DB01471B1F500CE89DE = 69410DB01471B1F500CE89DE /* PBXTextBookmark */;
+			69410DB11471B1F500CE89DE = 69410DB11471B1F500CE89DE /* PBXTextBookmark */;
+			69410DB21471B1F500CE89DE = 69410DB21471B1F500CE89DE /* PBXTextBookmark */;
+			69410DBA1471B24900CE89DE = 69410DBA1471B24900CE89DE /* PBXTextBookmark */;
+			69410DBB1471B24900CE89DE = 69410DBB1471B24900CE89DE /* PBXTextBookmark */;
+			69410DC41471B26100CE89DE = 69410DC41471B26100CE89DE /* PBXTextBookmark */;
+			69410DC51471B26100CE89DE = 69410DC51471B26100CE89DE /* PBXTextBookmark */;
 			69868BD91460F468004C5D9B = 69868BD91460F468004C5D9B /* PBXTextBookmark */;
+			698B39941471B30400898269 /* PBXTextBookmark */ = 698B39941471B30400898269 /* PBXTextBookmark */;
+			698B39A31471B53E00898269 /* PBXTextBookmark */ = 698B39A31471B53E00898269 /* PBXTextBookmark */;
+			698B39A41471B53E00898269 /* PBXTextBookmark */ = 698B39A41471B53E00898269 /* PBXTextBookmark */;
+			698B39AA1471B58000898269 /* PBXTextBookmark */ = 698B39AA1471B58000898269 /* PBXTextBookmark */;
+			698B39AB1471B58000898269 /* PBXTextBookmark */ = 698B39AB1471B58000898269 /* PBXTextBookmark */;
+			698B39B11471B5AA00898269 /* PBXTextBookmark */ = 698B39B11471B5AA00898269 /* PBXTextBookmark */;
+			698B39B61471B5D700898269 /* PBXTextBookmark */ = 698B39B61471B5D700898269 /* PBXTextBookmark */;
+			698B39B71471B5D700898269 /* PBXTextBookmark */ = 698B39B71471B5D700898269 /* PBXTextBookmark */;
+			698B39C81471B75C00898269 /* PBXTextBookmark */ = 698B39C81471B75C00898269 /* PBXTextBookmark */;
+			698B39C91471B75C00898269 /* PBXTextBookmark */ = 698B39C91471B75C00898269 /* PBXTextBookmark */;
+			698B39CA1471B75C00898269 /* PBXTextBookmark */ = 698B39CA1471B75C00898269 /* PBXTextBookmark */;
+			698B39E51471B84B00898269 /* PBXTextBookmark */ = 698B39E51471B84B00898269 /* PBXTextBookmark */;
+			698B39E61471B84B00898269 /* PBXTextBookmark */ = 698B39E61471B84B00898269 /* PBXTextBookmark */;
+			698B39E71471B84B00898269 /* PBXTextBookmark */ = 698B39E71471B84B00898269 /* PBXTextBookmark */;
+			698B39F51471BA9B00898269 /* PBXTextBookmark */ = 698B39F51471BA9B00898269 /* PBXTextBookmark */;
+			698B39F61471BA9B00898269 /* PBXTextBookmark */ = 698B39F61471BA9B00898269 /* PBXTextBookmark */;
+			698B3A011471BBDC00898269 /* PBXTextBookmark */ = 698B3A011471BBDC00898269 /* PBXTextBookmark */;
+			698B3A021471BBDC00898269 /* PBXTextBookmark */ = 698B3A021471BBDC00898269 /* PBXTextBookmark */;
+			698B3A161471BCDE00898269 /* PBXTextBookmark */ = 698B3A161471BCDE00898269 /* PBXTextBookmark */;
+			698B3A231471BD0D00898269 /* PBXTextBookmark */ = 698B3A231471BD0D00898269 /* PBXTextBookmark */;
+			698B3A241471BD1F00898269 /* PBXTextBookmark */ = 698B3A241471BD1F00898269 /* PBXTextBookmark */;
+			698B3A351471BE3400898269 /* PBXTextBookmark */ = 698B3A351471BE3400898269 /* PBXTextBookmark */;
+			698B3A421471BFD600898269 /* PBXTextBookmark */ = 698B3A421471BFD600898269 /* PBXTextBookmark */;
+			698B3A431471BFD600898269 /* PBXTextBookmark */ = 698B3A431471BFD600898269 /* PBXTextBookmark */;
 		};
 		sourceControlManager = 69868AD41460E35F004C5D9B /* Source Control */;
 		userBuildSettings = {
@@ -94,9 +129,9 @@
 	};
 	69269F2314620D0F00F69705 /* packet.c */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {905, 22152}}";
-			sepNavSelRange = "{8104, 120}";
-			sepNavVisRange = "{8101, 1269}";
+			sepNavIntBoundsRect = "{{0, 0}, {905, 22230}}";
+			sepNavSelRange = "{48835, 0}";
+			sepNavVisRange = "{48011, 1732}";
 			sepNavWindowFrame = "{{139, 11}, {1136, 746}}";
 		};
 	};
@@ -114,7 +149,7 @@
 		ignoreCount = 0;
 		lineNumber = 232;
 		location = duckdog;
-		modificationTime = 342734490.62607;
+		modificationTime = 342998552.622762;
 		originalNumberOfMultipleMatches = 1;
 		state = 2;
 	};
@@ -145,9 +180,9 @@
 	};
 	6926AC66146DBC7D00F69705 /* README */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {905, 618}}";
-			sepNavSelRange = "{937, 0}";
-			sepNavVisRange = "{0, 1119}";
+			sepNavIntBoundsRect = "{{0, 0}, {905, 640}}";
+			sepNavSelRange = "{1120, 0}";
+			sepNavVisRange = "{0, 1211}";
 		};
 	};
 	6926ACA7146DC70D00F69705 /* PBXTextBookmark */ = {
@@ -179,9 +214,16 @@
 	};
 	6926AD00146DC9BD00F69705 /* packet_private.h */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {905, 2795}}";
-			sepNavSelRange = "{827, 0}";
-			sepNavVisRange = "{359, 1226}";
+			sepNavIntBoundsRect = "{{0, 0}, {905, 2847}}";
+			sepNavSelRange = "{3360, 0}";
+			sepNavVisRange = "{2946, 1134}";
+		};
+	};
+	6926AD02146DC9BD00F69705 /* mpi.c */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {905, 1625}}";
+			sepNavSelRange = "{1254, 0}";
+			sepNavVisRange = "{570, 1452}";
 		};
 	};
 	6926AD03146DC9BD00F69705 /* util.c */ = {
@@ -213,9 +255,9 @@
 	};
 	6926AD2B146DDA1900F69705 /* simplepgp.h */ = {
 		uiCtxt = {
-			sepNavIntBoundsRect = "{{0, 0}, {905, 1742}}";
-			sepNavSelRange = "{3330, 67}";
-			sepNavVisRange = "{2500, 1469}";
+			sepNavIntBoundsRect = "{{0, 0}, {905, 1781}}";
+			sepNavSelRange = "{3259, 0}";
+			sepNavVisRange = "{2500, 1593}";
 			sepNavWindowFrame = "{{107, 43}, {1136, 746}}";
 		};
 	};
@@ -269,6 +311,123 @@
 		vrLen = 1691;
 		vrLoc = 6413;
 	};
+	69410DAD1471B1F500CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD00146DC9BD00F69705 /* packet_private.h */;
+		name = "packet_private.h: 31";
+		rLen = 0;
+		rLoc = 827;
+		rType = 0;
+		vrLen = 1226;
+		vrLoc = 359;
+	};
+	69410DAE1471B1F500CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD2B146DDA1900F69705 /* simplepgp.h */;
+		name = "simplepgp.h: 94";
+		rLen = 0;
+		rLoc = 3259;
+		rType = 0;
+		vrLen = 1593;
+		vrLoc = 2500;
+	};
+	69410DAF1471B1F500CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AC66146DBC7D00F69705 /* README */;
+		name = "README: 35";
+		rLen = 0;
+		rLoc = 1120;
+		rType = 0;
+		vrLen = 1211;
+		vrLoc = 0;
+	};
+	69410DB01471B1F500CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD02146DC9BD00F69705 /* mpi.c */;
+		name = "mpi.c: 37";
+		rLen = 0;
+		rLoc = 1141;
+		rType = 0;
+		vrLen = 1469;
+		vrLoc = 702;
+	};
+	69410DB11471B1F500CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 923";
+		rLen = 0;
+		rLoc = 28898;
+		rType = 0;
+		vrLen = 1653;
+		vrLoc = 28509;
+	};
+	69410DB21471B1F500CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 695";
+		rLen = 0;
+		rLoc = 21367;
+		rType = 0;
+		vrLen = 1339;
+		vrLoc = 20767;
+	};
+	69410DB61471B24400CE89DE /* packet.c:1108 */ = {
+		isa = PBXFileBreakpoint;
+		actions = (
+		);
+		breakpointStyle = 0;
+		continueAfterActions = 0;
+		countType = 0;
+		delayBeforeContinue = 0;
+		fileReference = 69269F2314620D0F00F69705 /* packet.c */;
+		functionName = "spgp_decrypt_secret_key()";
+		hitCount = 0;
+		ignoreCount = 0;
+		lineNumber = 1108;
+		modificationTime = 342998552.62283;
+		originalNumberOfMultipleMatches = 0;
+		state = 2;
+	};
+	69410DBA1471B24900CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1142";
+		rLen = 0;
+		rLoc = 35803;
+		rType = 0;
+		vrLen = 1534;
+		vrLoc = 33905;
+	};
+	69410DBB1471B24900CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1142";
+		rLen = 0;
+		rLoc = 35803;
+		rType = 0;
+		vrLen = 1534;
+		vrLoc = 33905;
+	};
+	69410DC41471B26100CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1142";
+		rLen = 0;
+		rLoc = 35803;
+		rType = 0;
+		vrLen = 1534;
+		vrLoc = 33905;
+	};
+	69410DC51471B26100CE89DE /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1142";
+		rLen = 0;
+		rLoc = 35803;
+		rType = 0;
+		vrLen = 1534;
+		vrLoc = 33905;
+	};
 	69868AD41460E35F004C5D9B /* Source Control */ = {
 		isa = PBXSourceControlManager;
 		fallbackIsa = XCSourceControlManager;
@@ -313,10 +472,250 @@
 		ignoreCount = 0;
 		lineNumber = 22;
 		location = duckdog;
-		modificationTime = 342734490.6248161;
+		modificationTime = 342998552.622623;
 		originalNumberOfMultipleMatches = 1;
 		state = 2;
 	};
+	698B39941471B30400898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1142";
+		rLen = 0;
+		rLoc = 35803;
+		rType = 0;
+		vrLen = 1566;
+		vrLoc = 33904;
+	};
+	698B39A31471B53E00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 962";
+		rLen = 112;
+		rLoc = 30052;
+		rType = 0;
+		vrLen = 1677;
+		vrLoc = 31947;
+	};
+	698B39A41471B53E00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 962";
+		rLen = 112;
+		rLoc = 30052;
+		rType = 0;
+		vrLen = 1677;
+		vrLoc = 31947;
+	};
+	698B39AA1471B58000898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 962";
+		rLen = 112;
+		rLoc = 30052;
+		rType = 0;
+		vrLen = 1677;
+		vrLoc = 31947;
+	};
+	698B39AB1471B58000898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD02146DC9BD00F69705 /* mpi.c */;
+		name = "mpi.c: 37";
+		rLen = 0;
+		rLoc = 1141;
+		rType = 0;
+		vrLen = 1363;
+		vrLoc = 1303;
+	};
+	698B39B11471B5AA00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD02146DC9BD00F69705 /* mpi.c */;
+		name = "mpi.c: 37";
+		rLen = 0;
+		rLoc = 1141;
+		rType = 0;
+		vrLen = 1363;
+		vrLoc = 1303;
+	};
+	698B39B61471B5D700898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD02146DC9BD00F69705 /* mpi.c */;
+		name = "mpi.c: 20";
+		rLen = 0;
+		rLoc = 679;
+		rType = 0;
+		vrLen = 1452;
+		vrLoc = 570;
+	};
+	698B39B71471B5D700898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD02146DC9BD00F69705 /* mpi.c */;
+		name = "mpi.c: 20";
+		rLen = 0;
+		rLoc = 679;
+		rType = 0;
+		vrLen = 1452;
+		vrLoc = 570;
+	};
+	698B39C81471B75C00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD02146DC9BD00F69705 /* mpi.c */;
+		name = "mpi.c: 40";
+		rLen = 0;
+		rLoc = 1254;
+		rType = 0;
+		vrLen = 1452;
+		vrLoc = 570;
+	};
+	698B39C91471B75C00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 962";
+		rLen = 112;
+		rLoc = 30052;
+		rType = 0;
+		vrLen = 1666;
+		vrLoc = 31947;
+	};
+	698B39CA1471B75C00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 503";
+		rLen = 0;
+		rLoc = 15016;
+		rType = 0;
+		vrLen = 1965;
+		vrLoc = 14163;
+	};
+	698B39E51471B84B00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 6926AD00146DC9BD00F69705 /* packet_private.h */;
+		name = "packet_private.h: 155";
+		rLen = 0;
+		rLoc = 3360;
+		rType = 0;
+		vrLen = 1134;
+		vrLoc = 2946;
+	};
+	698B39E61471B84B00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 503";
+		rLen = 0;
+		rLoc = 15016;
+		rType = 0;
+		vrLen = 1937;
+		vrLoc = 14191;
+	};
+	698B39E71471B84B00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1148";
+		rLen = 0;
+		rLoc = 35965;
+		rType = 0;
+		vrLen = 1324;
+		vrLoc = 35538;
+	};
+	698B39F51471BA9B00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1148";
+		rLen = 0;
+		rLoc = 35965;
+		rType = 0;
+		vrLen = 1272;
+		vrLoc = 35345;
+	};
+	698B39F61471BA9B00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1148";
+		rLen = 0;
+		rLoc = 35965;
+		rType = 0;
+		vrLen = 1272;
+		vrLoc = 35345;
+	};
+	698B3A011471BBDC00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1141";
+		rLen = 0;
+		rLoc = 35757;
+		rType = 0;
+		vrLen = 1518;
+		vrLoc = 35013;
+	};
+	698B3A021471BBDC00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1141";
+		rLen = 0;
+		rLoc = 35757;
+		rType = 0;
+		vrLen = 1518;
+		vrLoc = 35013;
+	};
+	698B3A161471BCDE00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1167";
+		rLen = 0;
+		rLoc = 36499;
+		rType = 0;
+		vrLen = 1291;
+		vrLoc = 35345;
+	};
+	698B3A231471BD0D00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1167";
+		rLen = 0;
+		rLoc = 36531;
+		rType = 0;
+		vrLen = 1312;
+		vrLoc = 35345;
+	};
+	698B3A241471BD1F00898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1167";
+		rLen = 0;
+		rLoc = 36531;
+		rType = 0;
+		vrLen = 1312;
+		vrLoc = 35345;
+	};
+	698B3A351471BE3400898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1556";
+		rLen = 0;
+		rLoc = 48916;
+		rType = 0;
+		vrLen = 1635;
+		vrLoc = 47800;
+	};
+	698B3A421471BFD600898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1561";
+		rLen = 0;
+		rLoc = 48835;
+		rType = 0;
+		vrLen = 1732;
+		vrLoc = 48011;
+	};
+	698B3A431471BFD600898269 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 69269F2314620D0F00F69705 /* packet.c */;
+		name = "packet.c: 1561";
+		rLen = 0;
+		rLoc = 48835;
+		rType = 0;
+		vrLen = 1732;
+		vrLoc = 48011;
+	};
 	AA747D9E0F9514B9006C5449 /* simplepgp_Prefix.pch */ = {
 		uiCtxt = {
 			sepNavIntBoundsRect = "{{0, 0}, {1030, 722}}";

diff --git a/src/mpi.c b/src/mpi.c
line changes: +1/-0
index bedd919..10b3b29
--- a/src/mpi.c
+++ b/src/mpi.c
@@ -34,6 +34,7 @@ uint8_t spgp_read_all_public_mpis(uint8_t *msg,
   	RAISE(INVALID_ARGS);
 
 	switch (pub->asymAlgo) {
+  	case ASYM_ALGO_RSA: mpiCount = 2; break;
   	case ASYM_ALGO_DSA: mpiCount = 4; break;
     case ASYM_ALGO_ELGAMAL: mpiCount = 3; break;
     default: RAISE(FORMAT_UNSUPPORTED);

diff --git a/src/packet.c b/src/packet.c
line changes: +16/-0
index be11fd8..9ff6abe
--- a/src/packet.c
+++ b/src/packet.c
@@ -691,6 +691,9 @@ static uint8_t spgp_generate_fingerprint(spgp_packet_t *pkt) {
 
   // Figure out how many MPIs to add
   switch(pkt->c.pub->asymAlgo) {
+  	case ASYM_ALGO_RSA:
+    	targetMpiCount = 2;
+    	break;
   	case ASYM_ALGO_DSA:
     	targetMpiCount = 4;
       break;
@@ -1140,6 +1143,9 @@ static uint8_t spgp_decrypt_secret_key(spgp_packet_t *pkt,
   
   // Decode and store the secret MPIs (algo-specific):
   switch(pub->asymAlgo) {
+  	case ASYM_ALGO_RSA:
+    	secretMpiCount = 4;
+      break;
   	case ASYM_ALGO_DSA:
     case ASYM_ALGO_ELGAMAL:
     	secretMpiCount = 1;
@@ -1158,6 +1164,7 @@ static uint8_t spgp_decrypt_secret_key(spgp_packet_t *pkt,
 	  curMpi->next = spgp_read_mpi(secdata, &idx, secret->encryptedDataLength);
     if (NULL == curMpi->next) RAISE(GENERIC_ERROR);
     curMpi = curMpi->next;
+    SAFE_IDX_INCREMENT(idx, secret->encryptedDataLength);
     pub->mpiCount++;
   }
   secret->isDecrypted = 1;
@@ -1544,6 +1551,15 @@ static uint8_t spgp_parse_session_packet(uint8_t *msg, uint32_t *idx,
 
   
   switch (session->algo) {
+  	case ASYM_ALGO_RSA:
+		  gcry_sexp_build(&sexp_key, NULL,
+				"(private-key(rsa(n%m)(e%m)(d%m)(p%m)(q%m)(u%m)))",
+				mpis[0], mpis[1], mpis[2], mpis[3], mpis[4], mpis[5]);
+		  gcry_sexp_build (&sexp_data, NULL,
+			   "(enc-val(rsa(a%m)))", mpis[6]);
+		  gcry_pk_decrypt (&sexp_result, sexp_data, sexp_key);
+  		mpi_result = gcry_sexp_nth_mpi (sexp_result, 0, GCRYMPI_FMT_STD);
+    	break;
   	case ASYM_ALGO_ELGAMAL:
 		  gcry_sexp_build(&sexp_key, NULL,
 				"(private-key(elg(p%m)(g%m)(y%m)(x%m)))",