Pages

This tutorial covers the basics of the science of cryptography. It explains how programmers and network professionals can use cryptography to maintain the privacy of computer data. Starting with the origins of cryptography, it moves on to explain cryptosystems, various traditional and modern ciphers, public key encryption, data integration, message authentication, and digital signatures.

Thursday 31 October 2019

[Paper Cryptography] Encryption and Decryption of Text using AES Algorithm

Encryption and Decryption of Text using AES Algorithm
Roshni Padate1
, Aamna Patel2
1Assistant Professor, Computer Engineering Department, Fr. Conceicao Rodrigues College of Engineering
2Electronics Department, Fr. Conceicao Rodrigues College of Engineering

Abstract— Data Security is the primary concern for every communication system. There are many ways to provide security to data that is being communicated. This paper describes a design of effective security for data communication by AES algorithm for encryption and decryption. The National Institute of Standards and Technology (NIST) has initiated a process to develop a Federal Information Processing Standard (FIPS) for the Advanced Encryption Standard (AES), specifying an
Advanced Encryption Algorithm to replace the Data Encryption Standard (DES) Expired in 1998. The Advanced Encryption Standard can be programmed in software or built with pure hardware.

Keywords—AES, Block Cipher, Cryptography, DES, NIST

Source:http://citeseerx.ist.psu.edu


How to read the digital certificate

A Digital Certificate is an electronic "password" that allows a person, organization to exchange data securely over the Internet using the public key infrastructure (PKI). Digital Certificate is also known as a public key certificate or identity certificate.

Digital certificates are used to encrypt online communications between an end user's browser and a website


Wednesday 30 October 2019

[E-journal Cryptography] Extended AES Algorithm with Custom Encryption for government-level Classified Messages

Extended AES Algorithm with Custom Encryption for government-level Classified Messages
Sreyam Dasgupta, Pritish Das


Abstract: The paper is primarily concerned with the data security issues faced while sending the data over the network. The issues are can be avoided with the proposed algorithm: Extended AES Algorithm with Custom Configurable Encryption. The added layer of security is based on the Caesar Cipher encryption algorithm. Although the algorithm is highly vulnerable to a few attacks, our modifications in the algorithm are tailor-made to deny those attacks completely. The user has no
idea that Caesar's cipher is being used. Moreover, the key is changed for every word in the message, thus removing the vulnerability to the frequency analysis attack. This layer will give some added protection to the underlying AES algorithm, which is already very secure. In today’s electronic age, the importance of digital cryptography in securing electronic data transactions is unquestionable. Every day, users electronically generate and communicate a large volume of information with others. This information includes medical, financial and legal files; automatic and Internet banking; phone conversations, pay-per-view television, and other e-commerce transactions as well as military information and some top-secret government intel. To meet these requirements, Advanced Encryption
Standard (AES) for encryption of electronic data can be used. Governments prefer using AES for encryption of classified messages. Although no major attack on AES has been discovered yet, it is presumed that AES might have been broken without the attack being known to us. Thus, an added layer is used to make it safer.
Index Terms: AES, Cyber Security, Caesar Cipher



Tuesday 29 October 2019

[e-Journal Cryptography] Improvement in the Performance and Security of Advanced Encryption Standard Using AES

Improvement in the Performance and Security of Advanced Encryption Standard Using AES Algorithm and Comparison with Blowfish
Amit Verma 1*
, Simarpreet Kaur 1, Bharti Chhabra 3
1M. Tech. Research Scholar, Computer Science & Engineering, Chandigarh Engineering College
3Assistant Professor, Computer Science& Engineering, Chandigarh Engineering College, Landran, Punjab, India
1* Professor and Head of Department, Computer Science& Engineering, Chandigarh Engineering College, Landran, Punjab,
IndiaDramitverma.cu@gmail.com


Abstract- Background\Objective: - The origin of cryptography is found in Roman and Egyptian culture. Cryptography is a thousand years old process to encrypt the messages. In its ancient form, people use cryptography to hide their messages that they want to keep secret from others by substituting the part of the message with symbols, numbers or pictures. With the increase in technology the need of cryptography is also increased which gives rise to new cryptographic algorithms such as DES, 3DES, AES and Blowfish

Source: https://pdfs.semanticscholar.org


AES 256 Encryption And Decryption With Java (CBC) Mode

[ SOLVED ] Wrong IV length: must be 16 bytes long

PROBLEM
Wrong IV length: must be 16 bytes long
CAUSE
IV Length less then 16 
My Code
public static String initVector = "12345678";

SOLVED
change IV variable like this
public static String initVector = "1234567812345678";

AES 256 Encryption And Decryption With Java (ECB) Mode

Thursday 24 October 2019

[SOLVED] java.security.NoSuchAlgorithmException: Cannot find any provider supporting AES/ECB/PKCS7Padding

PROBLEM
java.security.NoSuchAlgorithmException: Cannot find any provider supporting AES/ECB/PKCS7Padding
CAUSE
AES/ECB/PKCS7Padding not supported
SOLUTION
change with AES/ECB/PKCS5Padding

Tuesday 22 October 2019

[SOLVED] PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors

PROBLEM
PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
CAUSE 
does not recognize the digital certificate  issuer or path validatioan failed
My CODE 
  PKIXParameters params = new PKIXParameters(Collections.singleton(anchor));
  params.setRevocationEnabled(true);
SOLVED

  • Change the digital certificate issuer/certificate authority to JKS format
  • Change the source code to
 KeyStore keystore = KeyStore.getInstance("JKS");
            try (InputStream is = Files.newInputStream(Paths.get("root.jks"))) {
                keystore.load(is, "".toCharArray());
            }

            PKIXParameters params = new PKIXParameters(keystore);
            params.setRevocationEnabled(true);


Friday 18 October 2019

[SOLVED] java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date

PROBLEM
when validating digital certificates using ocsp get error
java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
CAUSE

the time on the client and server is not appropriate ... 
SOLVED
fix the time on the client or server with the correct time
EXAMPLE

at 19 Oct 2019 00:49, the client checks OCSP to the OCSP server and the response is 👇


CSP response:
Response Status: SUCCESS
Responder ID: byKey: 86AFCABDF4F169C1AAC9D78E98F2B029E3196645
Produced: Saturday 19 October 00:30:53 WIB 2019
1 response:
SingleResponse:
CertId
Algorithm: SHA-1
issuerNameHash
0000: 9C 46 39 8F C4 67 DC C5 77 58 E9 F1 F4 11 BC F9. F9..g..wX ......
0010: 11 14 E2 0E
issuerKeyHash:
0000: 86 AF CA BD F4 F1 69 C1 AA C9 D7 8E 98 F2 B0 29 ...... i ........)
0010: E3 19 66 45
SerialNumber: [2dbc67be 3bac5c48]
CertStatus: OK
This update is Saturday October 19 00:30:53 WIB 2019



there is a time difference between client and server



Friday 11 October 2019

SHA 256 With Java

What is SHA-256?

The SHA (Secure Hash Algorithm) is one of several cryptographic hash functions. A cryptographic hash is like a signature for a text or a data file. SHA-256 algorithm generates an almost-unique, fixed-size 256-bit (32-byte) hash. Hash is a one-way function – it cannot be decrypted back. This makes it suitable for password validation, challenge hash authentication, anti-tamper, digital signatures.

SHA-256 is one of the successor hash functions to SHA-1 and is one of the strongest hash functions available.