Posts

Showing posts from April, 2009

Encrypt and Decrypt Images Using Java

Hi, Most of you would find it useful to Encrypt a special picture of yours such that only you can view it. By using JCE(Java Cryptography Extension) classes, this becomes very simple. As I have already done before using Java to encrypt a String is very simple. If you are new to this, please read the article which I had already posted named "Java Encryption and Decryption" at "http://ruchiram4.blogspot.com/2009/04/java-encryption-and-decryption.html" Also, you need to have a basic understanding of Java IO. If you are new, it is better to read the Sun Java tutorial on IO. Before we move on, lets recall the basic steps in Encrypting plaintext. 1. Creating an instance of "Cipher" object and setting the mode of Encryption (Eg: AES, DES) 2. Generating a key by using a KeyGenerator object. 3. Setting the mode of Cipher operation on the Cipher object. As we intent to Encrypt, we simply set it by setting a property of Cipher object by calling its "init"

Off The Record Protocol (OTR)

Off The Record Protocol (OTR) is one of the emerging protocols today. It is becoming more and more popular amongst Internet Messenger Services by providing a service similar to a conversation by two people. Internet Messenger Applications such as Pidgin has already implemented such a plugin fo the application and other messenger services are already on the move with implementing the feature. OTR provides the two parties to have a conversation between them by providing the following features. i) Encryption : Messages can be read by only the two parties involved. ii) Authentication : Lets each parties know that they are chatting with the person who they think they are. In simpler terms, this features prevents forging by a third party by imitating the other person. iii) Deniability(Repudiability) : This is a controversial term. We are very much used with the term 'Non Repudiability' when we talk about Computer Security. But here, we specifically allow repudiability to occur. iv) P

Java Encryption and Decryption

Hi Folks, Most of you would be very much interested to know how to use java to do crypto work. In this post, I would demonstrate how to use JCE(Java Cryptography Extension) Classes and methods to very simply Encrypt and Decrypt a PlainText. This article is intended for an audience who is familiar with cryptography concepts and is looking for an implementation of such an algorithm in Java. If you are looking to learn Cryptography concepts, this post may not be helpful. JCE provides us with a bunch of useful classes to accomplish this. I would demonstrate how to do so using Cipher class. Cipher class is handy to handle such task. You can get an instance of a Cipher Class by calling its static method ENCRYPTION Cipher cipher=Cipher.getDefaultInstance("DES"); This accepts a string indicating the encrypting algorithm. For now, we will use DES(Data Encryption Standard) In order to Encrypt, we need a key. A key can be easily generated by using the KeyGenerator Class provided. KeyGen

Build your own SNMP Monitoring Tool

Image
SNMP is a protocol used widely for monitoring and extracting status information of a working device. Using SNMP protocol, you can extract the present information about a certain device. It is widely used for monitoring network devices such as Routers. But, practically any device which supports SNMP protocol can be used. As an example consider a SNMP enabled network printer inside an organization. The Network admin can issue necessary commands to the SNMP enabled device to get the status of the printer to check the status of the printer to see whether it is working as it should. Furthermore, the SNMP enabled device can be configured to issue an alert once a condition is met. As an example, there may be a Network printer which can be configured to make an alert once the ink level drops below a certain level. The breadth of SNMP is determined by the capabilities embedded into the device itself. Another very useful scenario is where a JVM(Java Virtual Machine) can be SNMP enabled to be mon