Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
Available now!
Buy at Amazon US or
Buy at Amazon UK



Articles

1.Windows API reference
2.HTML to WML Converter
3.Webcam streaming in VB.NET
4.Remoting with firewalls
5.RSA from first principles
6.Key & MouseLogger in .NET
7.Networking Resource Kit for .NET
8.Automatic Reboot with .NET
9.XAML Schema
10.Migrating VB6 Winsock to VB.NET
11.Migrating C++ sockets to C#
12.RFC Reference guide
13.Lingua - Localization webservice
14.COM Reference guide
15.WMI Reference guide
16.SQL stored procedures
17.TCP & UDP port reference
18..NET Framework reference
19.Ethernet Type codes
20.IP to country webservice
21.MAC address assignments
22.DLL entry point reference
23.WHOIS server list
24. Turing Numbers
25. Boost SQL performance
26. Progress Bar in ASP.NET
27. OleDb WebService
27. Internet Explorer

Contact us

RSA from first principles

This article is taken from content omitted during technical review of the a book entitled "Network programming for .NET" (Buy at Amazon UK) (Buy at Amazon US)

Before first principle implementation deters you from using encryption, it must be said that .NET has it’s own built in cryptographic framework. You should not use first principle RSA unless you are communicating with applications that are not based on .NET or Windows.

RSA is named after its inventors, Rivest, Shamir, and Adleman. When it was first released it caused such a stir in government circles it was classified as a military product. This could be understandable, because it could mean that hostile groups could communicate freely without the possibility of interception by government intelligence.  It was also protected by a US patent, which prevented derivative versions of RSA emerging.

In September 2000, the RSA patent expired, and cryptography laws were relaxed dramatically when it was found that policing the export of this information was unfeasible, especially with the advent of the Internet. Restrictions still apply today on the export of RSA from the USA to countries that the U.S. has under sanction (Iran, Cuba, Iraq, Libya, Syria, Sudan, North Korea).

The RSA algorithm itself is not hugely complex, but the mathematical formulas involved are quite intricate.  The following example will take you step by step through the RSA algorithm.

Initially, two large random large distinct prime numbers are chosen, for notation purposes, these are referred to as p and q.

A third number is chosen that is relatively prime to (p-1)*(q-1), this number is referred to as e, the encryption exponent.

We define a fourth variable, n, such that n = p*q.

Using Euclid's greatest common divisor algorithm. The decryption component can be determined such that:

e*d = 1 (mod (p-1)*(q-1))

Where ‘d’ is the notation for the decryption component.

Page 2  Page 3  Page 4  Page 5  Page 6  Page 7 



Google

© 2008 Free SMS| Sage Line 50 Component