Showing posts with label Security. Show all posts
Showing posts with label Security. Show all posts

Wednesday, May 30, 2018

What Is GDPR and How It Disrupts The Businesses In Europe ?

The long impending GDPR compliance has finally taken effect and it took entire Europe by storm when the D-day arrived. The General Data Protection Regulation (GDPR) was adopted by European Council in 2016 to consolidate the user privacy and protect the user data in Europe. However, the arrival of this new digital privacy and data protection law seem to have catastrophic effects on dozens of American news sites who preferred to ban their services in Europe rather than complying with the GDPR. You read that right. Some of America’s biggest news sites and online services have blocked half a billion people from accessing their services as they found it hard to comply with the stringent policies imposed by the GDPR. The names include Chicago Tribune, Los Angeles Times and The New York Daily News.
You may also like The Impact Of GDPR On ERP Applications.
What Is GDPR and How It Disrupts The Businesses In Europe?
GDPR is a legislation that brings a new set of rules and data protection laws to the businesses operating in the European Union. The legislation was passed in April 2016 by the European Council to ensure that the users will have more control over how their information is going to be used. GDPR imposes some stringent rules on various companies operating in Europe. The companies that don’t comply with these policies are fined heavily. The fines are so high that the companies may have to pay up to €20 million or 4% of the worldwide annual revenue of the prior financial year. For the companies like Facebook and Amazon, that’s like billions of dollars.
So the validation of GDPR in EU that took place on May 25 has caused a major disruption in the European business scenario. Apparently, many multinational companies operating in EU have either banned their services in Europe or suspended them for the nonce.
The Impact of GDPR In EU
The validation of General Data Protection Regulation (GDPR) across the European Union is more or less contributing to the estrangement of Europe from the United States of America and many other countries. Cutting Europe off from America may cause a drastic socio-economic shift across the continent. The European users will lose access to a number of websites from America and several other countries. With that be the case, it may cause conditions like in Mainland China where the users don’t have access to many famous websites like Facebook, YouTube, and Gmail. However, the motive of GDPR compliance in Europe is completely different from that in China.
Current GDPR Status In EU
The GDPR legislation was passed in April 2016 by the European Council and all the companies were given 2 years of time to get themselves GDPR compliant. 25th May was the deadline in Europe to get your company GDPR compliant which has already passed. However, it turns out that somewhat around 60–70% of the companies in Europe have not given any clearance on GDPR compliance just yet. It’s still unclear what might be the take of EU regulators on that. Although the companies in Europe that are not yet GDPR are compliant are expecting some leniency from the regulators due to their vast number, but there’s still no clarity how the regulators might react to this lack of obligation.

Thursday, October 5, 2017

Data Security By Using Encryption And Decryption In Java

Encryption is a process of hiding the meaning of a part of the information and only authorized persons can read the actual data. This process is used to protect data that is being transferred from one location to another. This process is very much needed by a secure computing environment.


Decryption ->When we encrypt data then for the authorized person we need to decrypt that data. Encryption is also known as “cipher” and decryption process is “decipher”.


The methods which are providing security to our information, are given next level of security by “keys”. Now lets talk about keys , the one who is having key only that can encode and decode the information. Here in our code we have used the following API for encryption and decryption. The level of security of an encryption scheme is directly proportional to the its key size. Key sizes should be long enough due to which attacks become unfeasible.


Algorithms :

1.Symmetric encryption algorithms: This alogrithm uses the exactly same key for data encryption and  data decryption. For this algorithm use AES or AESWrap block cipher 2.Asymmetric (public key) encryption algorithms: This algorithm uses two different keys for both the processes. For this algorithm use RSA.


Following parameters should be configured correctly to configure any encryption scheme securely.

1.Choosing the correct algorithm
2.Choosing the correct operation mode
3.Choosing the right padding scheme
4.Choosing the right keys and their sizes

CODE DEMO FOR IMPLEMENTING ENCRYPTION AND DECRYPTION

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<span style="font-size:16px;"><span style="font-family:arial,helvetica,sans-serif;">import java.security.Key;
import javax.crypto.*; 
import javax.crypto.spec.*;
import javax.xml.bind.DatatypeConverter;
import play.Play;
import play.Play;
public class EncryptionDecryptionUtil 
{
    private static final String ALG = "AES";
    private static final byte[] keyVal = new String( Play.application().configuration().getString("application.secret")).substring(016).getBytes();
    //To get encrypted value of a string
    public static String encrypt(String valToEnc) throws Exception
    {
        Key ky = generateKey();
        Cipher cph = Cipher.getInstance(ALG); 
        c.init(Cipher.ENCRYPT_MODE, ky);
        byte[] encValue = cph.doFinal(valToEnc.getBytes()); 
        String encryptedVal = DatatypeConverter.printBase64Binary(encValue); 
        return encryptedVal; }
    //To get decrypted value of a string
    public static String decrypt(String encryptedVal) throws Exception {
        Key ky = generateKey(); 
        Cipher c = Cipher.getInstance(ALG);
        c.init(Cipher.DECRYPT_MODE, ky); 
        byte[] decordedVal = DatatypeConverter.parseBase64Binary(encryptedVal);
        byte[] decValue = cph.doFinal(decordedVal);
        String decryptedVal = new String(decValue); 
        return decryptedVal;
        }
    private static Key generateKey() throws Exception 
    {
        Key ky = new SecretKeySpec(keyVal, ALG);
        return ky;
        }
    }
}<span style="white-space: normal;">
</span></span></span>