Category Archive Information Security

ByBala Manikandan

Java 8 – Default and Static Methods in Interfaces

Reading Time: 2 minutes

Before beginning this post, I would like state that this post assumes some knowledge of Java.

 

Prior to Java 8, all methods in an interface had to be ‘abstract’. However, in Java 8, default and static methods could also be defined in interfaces. These are discussed in the following sections.

Default Methods:

A default method in an interface is used to define the ‘default’ behaviour of an object of that interface type, in case a class implementing that interface does not override the method. Unlike other interface methods, default methods have a method body. A default method is declared using the keyword ‘default’:

interface TestInterface {
      default void defaultMethod() {  }      //a default method
}

 Flat 20% cashback on Motorola, Vivo and Lenovo Smartphones

Note that the above method uses curly braces, not a semicolon. Just like normal methods, statements can be included between the curly braces. Now consider another piece of code:

package bala;

interface TestInterface{
default void print(){
System.out.println(“Default”);
}
}
class Sample1 implements TestInterface{ //overrides print()

public void print(){
System.out.println(“Not Default”);
}
}
class Sample2 implements TestInterface{} //doesn’t override

public class Test {

public static void main(String[] args) {
TestInterface obj1 = new Sample1();
TestInterface obj2 = new Sample2();
obj1.print();
obj2.print();
}
}

 

 

The above code prints:

Not Default
Default

In the above code, both the classes, Sample1 and Sample2, implement the interface TestInterface, which contains a default method.

class Sample1 overrides the print() method but Sample2 doesn’t.  In the main() method, two objects of object types Sample1 and Sample2 are created, which then invoke the print() method. Since Sample1 has the overridden print() method, the code in the overridden version executes.

But the print() method is not overridden in Sample2,  so the code in the default method of TestInterface executes. This accounts for the above output.

Static Methods:

Recall the definition of static methods – they belong to the class rather to an instance of the class.

As in classes, static methods in interfaces are the methods that can be called using the interface name itself, rather than using an object reference variable. These methods also use curly braces. Their usage is very similar to the usage of static methods in classes, as demonstrated in the following code:

package bala1;

interface TestInterface2{

static void print(){
System.out.println(“Static method inside an interface”);
}
}
public class Test2 {

public static void main(String[] args) {
TestInterface2.print();
}

}

 

As expected, the above code prints:

Static method inside an interface

We have seen the newer features of Java 8(namely – default and static methods in interfaces) in this post! Join me as I uncover some more technical aspects of the world!

ByJayanthi

The ‘Apple’ of my eye! :)

Reading Time: 2 minutes

For most of the Apple lovers possessing iPhones, iPods, Mac books and iPad and so on, this week was an exciting week as it saw the  launch of the iPhone 8, iPhone 8S and iPhone X. How will the new iPhone X be? Pronounced iPhone ’10’ and not iPhone ‘X’, this is the thought for most of the world(if not all!) Till we can lay our hands on it or see someone who lays their hands on it 🙂 we can only surmise a few details as of now:

Features of iPhone XDescription   
Pre-orders starting date in IndiaOctober 27
Sales will start fromNovember 3 in India
Price of iPhone X$ 999 and up

89,000 Rs in India
Wireless charging
Display5.8 inch OLED display

Highest resolution display:

2436x1125 pixels at 458 pixels per inch
Authentication Face ID instead of Touch ID and NO home button

Appearance Durable glass in the front and back

Water and dust resistant


Battery life14 hours of Internet use
ProcessorA11 Bionic chip(can manage 600 billion operations per second)

6 core processor
CameraDual 12MP TrueDepth cameras

Storage64GB

Planning to go somewhere? Try booking flights through ‘Makemytrip‘!!

The most interesting features of the iPhone X  are:

  1. Price – $999 for US markets and a cool lakh for Indian markets(256GB variants)
  2. Processor speed – The iPhone X has the A11 Bionic chip supposedly the most powerful and smartest chip
  3. Battery life – The iPhone X boasts of 14 hrs of Internet usage which will be tested in due time(Scientific American)
  4. Camera – It has a larger and faster megapixel sensor(for camera buffs and geeks, there is plenty in store with the new iPhone X to achieve superior quality pictures) 
  5. Face ID – This is obviously the most talked about authentication feature of the new iPhone X – ‘face recognition’. Apple has done away with the home button and introduced the ‘face recognition’ feature which raises interesting and new questions. While biometrics is always a better way of authenticating a user than the traditional username and password combination(not to forget remembering the umpteen number of passwords) face ID might be much more trickier than  other biometrics.  These are some of the key points regarding Face ID:
  •   For now, only one face ID will be supported per device.
  •   Going by the number of thoughts around the web, what if the device can be unlocked while sleeping or by an identical twin?

           iPhone user experience is always beautiful and in India where owning an iPhone(or any Apple product and any version) is a symbol of pride, it remains to be seen if the new iPhone X will live up to its standards. Most of the details and doubts will only be solved in due course of time – but one final question that is on everyone’s mind – is it too pricey even by Apple standards?

Thanks to Satish for his thoughts, suggestions and tips for this post!

 

 

 

 

 

ByJayanthi

Types of hackers

Reading Time: 1 minute

In today’ post, we will see the different types of hackers:

 

Try Club Mahindra today!

ByJayanthi

Which is more secure: SSL, TLS or HTTPS

Reading Time: 2 minutes

Data that is passed “as-is”(without encryption) is prone to attacks by hackers and people with malicious intent. In order to pass critical financial information without being eavesdropped, it is crucial to encrypt all data. Encrypting communication allows one to pass credit card numbers, banking information and other sensitive details between the client and server and it is more secure. Encryption between the client and server is done by SSL/TLS. Before seeing which is a more secure protocol,we will first understand the terms SSL,  TLS  and HTTPS.

SSL is ‘Secure Sockets Layer‘ and it is used to secure the connection between the client and server. It makes use of public key encryption(when a public key may be used encrypt and private key may be used to decrypt –  or it can work the other way around too) and it works at the transport layer of the OSI model. It provides data integrity, confidentiality for the connections between the client and server. 

 

 SSL is now known as TLS or ‘Transport layer security‘. It is again a cryptographic protocol that is used to encrypt all communication between client and server. SSL 3.0 officially became TLS and TLS 1.2 is the latest version.  TLS is backward compatible to secure older SSL connections. 

‘HTTPS’ is ‘Hyper text transfer protocol secure’. HTTP is the building block of the Internet. HTTPis ‘HTTP’ secured with SSL/TLS.  HTTPS is synonymous with security during transmission.  Connections can be understood to be encrypted by seeing the padlock at the left hand corner of the screen or by seeing ‘https’ instead of ‘http’.

Now coming to the original question of which is more secure TLS is more secure as SSL has given way to TLS. But since communication security is still understood as SSL, it can be said that SSL/TLS is more secure. 

 

Note: HTTP vs HTTPS image source: Google images

 

 

 

 

 

 

 

ByJayanthi

Have you heard about cyber diplomacy?

Reading Time: 1 minute

‘Diplomacy’ is defined as “the art of dealing with people in a sensitive and tactful way” and cyber diplomacy is a careful extension to that.

Social media is an absolute necessity for individuals, businesses and government organizations. Most major heads of state are present either on Facebook, Twitter and/or other social media platforms. Given the openness of social media platforms, interactions are easy at all levels with these social media channels.  It is also easy for heads of state to carry out conversations with each other and/or with ordinary citizens. 

Read More

ByJayanthi

Definition of the day: Honeypots

Reading Time: 1 minute

“Honeypots” in network security is a computer system which entices hackers to attack it.  All ports are kept open on the  system and the computer acts normally with its services(but in reality, it is isolated and monitored) The main idea behind setting up “honeypots” is used to study the motives of malicious individuals and track their actions.

 

 

It must be noted that none of the production systems are connected to the “honeypot” system and no vital business information is lost during the “honeypot” project.

ByJayanthi

Introduction to Bitcoins

Reading Time: 4 minutes

Even as the Bitcoin fork is making news, and there is  “Bitcoin” and  “Bitcoin cash” now, we will deal with the elementary aspects of “Bitcoin” and “Blockchain” in this post.

“Bitcoin” first appeared in 2009, but they are much more prominent now, thanks be to better adoption by individuals and professionals. In this post, we will understand the meaning of the “Bitcoin” cryptocurrency, some basic terms related to it and the way it works.

Read More

ByMani Prithiviraj

Conflict Resolution at the Workplace

Reading Time: 2 minutes

Advances in Technology and Market Pressures have led to increasing expectations on growth and performance in our workplace. Expectations can rarely be met purely based on individual efforts. Successful accomplishment of organizational goals requires collaboration and team work. Goals have to be accomplished with a diverse workforce (based on age, culture, work-styles). This gives rise to interesting challenges. Conflicts at the workplace can significantly impact achievement of goals. In this article I am going to write about common causes for conflict at the work place and methods that can be used for prevention and resolution of conflicts.

Read More

ByJayanthi

Definitions: What is “Deep web?”

Reading Time: 1 minute

Coming close on the heels of my previous post –  “Dark web“, we will be defining “Deep web” in this blog post.  Similar to “Dark web, the “Deep web” cannot be searched by traditional search engines as well. So, what is present in this “Deep web”, which sounds so similar to “Dark web”?  Here are a few features of the “Deep web”:

1. They cannot be indexed by popular search engines as well.

2.  The “Deep web” has content that you do not want everyone to see. The “Deep web” contents are:bank account statements,  contents of your email , medical information, academic information, databases and any dynamically generated information.

While “Dark web” is associated with illegal content, “Deep web” does not have that connotation.

3. In addition, it does not require special browsers to view it.

As seen in the previous blog post, surface web(the place where we mostly interact like Facebook, Twitter and other social media channels), the “Deep web” and the “Dark web” are best represented by an “iceberg”. The iceberg is the perfect representation of the amount of information that is visible to us (which is hardly any!)

Join me as I uncover more of the tangled web in Information Security! 🙂

 

 

ByJayanthi

Definitions: What is “Dark web”?

Reading Time: 1 minute

“Dark web” which is not to be confused with “Deep web” is that part of the web which cannot be accessed by traditional search engines likes Google, Bing or Yahoo. In addition to this, it can only be accessed by special browsers like ‘Tor – the Onion router’ or ‘I2P'(Invisible Internet project). The “Tor router” enables anonymized browsing of the “dark web”.

“Dark web” domains end with “.onion” and are purposefully hidden from popular search engines. They are used to host a number of illegal activities.

 

Images source: Google images