RSA encryption using Tcl

tagged under   programming   linux  

After being placed in Cisco, I decided to learn some Tcl programming, which I heard from a couple of my friends, that it would help me in my workplace.

Tcl is basically a scripting language like perl or python or shell programming and it is very easy to learn and use. Its cousin, the Tk language can be used to create GUI's whereas Tcl is mainly a command line language. The reason I decided to write an RSA encryption routine in Tcl is because the program involves and tests all major Tcl constructs from accessing files to performing mathematical computations and parsing text and thus is a very good example to test your Tcl skills. Coming to RSA, it is one of the best public-key cryptosystems available. Just in case, somebody wants to encrypt simple files on their computer, they can use my encryption program to do so :P. Of course, you will need to have Tcl interpreter installed on your computer....and know how to run the Tcl script :D which is hard work, I agree and much more complicated than some free software available on the market like KeePassX which is a billion times more easy to use and gazillion times more secure than my implementation, but nonetheless, I am very happy to give you my Tcl RSA implementation :D happy encrypting !!! The following lines show you how you may use my program to encrypt or decrypt files...

  • Make sure you have Tcl interpreter installed. Installing it is straightforward in Linux. You can find it in the Software repository. In ubuntu you can install it by typing the following in a terminal.

    $ sudo apt-get install tcl
  • After downloading the Tcl script "rsa.tcl", make sure it has execute permissions on your computer. To change the permissions in Ubuntu type the following in a terminal.

    $ cd path_to_tcl_script
    $ chmod +x rsa.tcl
  • Now you can run the script as

    $ cd path_to_tcl_script
    $ ./rsa.tcl
  • Enter E(or e) to perform encryption and D(or d) to perform decryption.

  • When prompted, please provide the complete(absolute) path to the file on your computer which you want to encrypt(or decrypt).

  • Thats it... You are done !!!. Happy Encrypting :D

« older posts newer posts »

other articles you might like
  • Configuring Lenovo T440s touchpad in Linux
  • Alternatives to Truecrypt on Linux
  • Connecting to wired/wireless networks via command line
  • Android reverse USB tethering
  • Linux command line tools and tricks - Part 3
  • Basic dwm setup in (L)ubuntu
  • Basic Xmonad setup in (L)ubuntu
  • EOM a.k.a End of Mail a.k.a Emacs + offlineimap + mu4e
  • First attempt at developing a Firefox addon
  • Bash script to perform super-fast file transfer using netcat and tar
  • Jekyll : Handling Github page build failure and Jekyll plugins on Github
  • Emacs newbie cheat sheet -- from a vim convert
  • ncmpcpp : ncurses based music player for Linux
  • How to create a custom CWM recovery flash-able android apps zip file in Linux via command line
  • Task Warrior - The best CLI task manager for Linux
  • Custom kernel in Ubuntu (also generate .deb package)
  • Linux command line tools and tricks - Part 2
  • Superb Linux command line tools and tricks for Linux geeks
  • Behind the scene

  • Share this post ⇒  

    blog comments powered by Disqus