PROBLEM :
MessageDigest.getInstance("SHA256") java.security.NoSuchAlgorithmException: SHA256 MessageDigest not available
java.security.NoSuchAlgorithmException: SHA256 MessageDigest not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at java.security.Security.getImpl(Security.java:730)
at java.security.MessageDigest.getInstance(MessageDigest.java:167)
SOLVED :
Rename MessageDigest.getInstance("SHA256") with MessageDigest.getInstance("SHA-256")
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.
Showing posts with label Programming Cryptography. Show all posts
Showing posts with label Programming Cryptography. Show all posts
Friday, 10 April 2020
Tuesday, 10 March 2020
Command Generate Certificate Signing Request (CSR) with Openssl
openssl req -nodes -newkey rsa:2048 -keyout example.key -out example.csr -subj "/emailAddress=testing@test.id/C=ID/O=Personal/CN=testing123"
Return --> example.key
Return --> example.key
-----BEGIN PRIVATE KEY-----MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC+GY97PIu37Nmo1xCvzQp7z53S2OtmKV2c1VdthSze03Ce9Fal9Wg4Y17uo3znnYdRESKBzBPEBjVuFiv7tEf+VC2osfgD83rvIIFOjzQMozdyX6JWitmce8x+P+be1vKE3+HlG5z6r1zGuORC3YNDaSp0rzuMZRo+wi053zLVngI1hXWV2u3XDCz2ghEd6jl/8FN7Pe64JaYVz8uUlh6zwK//wJ5dn/1r6kFX+AJhYLrTJUxBl9Toq/euQUbNp8h7vnyQWbgFF/sC1JQ6q+LjrHqN61ullzMK4kCGO8TfskuRYBEJR5v4amT5ql7UDzjPeiqNXbTYalWTa1Ld//dLAgMBAAECggEATujFSl6DkMFcSF2dq5vtMh+oX5FzhWC+Xw+fzvJtAcG7CgBax2Dq9h0plt1+R5Z4SQpXzJEt0zzQiPXjJARdrhC7Mz9MuDclXIWdp0KCVIybw3o3JL1WP0KUTAOy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z/0sVNaj3I1an6rv/l2Q==-----END PRIVATE KEY-----Return example.csr
-----BEGIN CERTIFICATE REQUEST-----MIIClzCCAX8CAQAwUjEfMB0GCSqGSIb3DQEJARYQdXNlcjUyQHRpbGFrYS5pZDELMAkGA1UEBhMCSUQxETAPBgNVBAoMCFBlcnNvbmFsMQ8wDQYDVQQDDAZ1c2VyNTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+GY97PIu37Nmo1xCvzQp7z53S2OtmKV2c1VdthSze03Ce9Fal9Wg4Y17uo3znnYdRESKBzBPEBjVuFiv7tEf+VC2osfgD83rvIIFOjzQMozdyX6JWitmce8x+P+be1vKE3+HlG5z6r1zGuORC3YNDaSp0rzuMZRo+wi053zLVngI1hXWV2u3XDCz2ghEd6jl/8FN7Pe64JaYVz8uUlh6zwK//wJ5dn/1r6kFX+AJhYLrTJUxBl9Toq/euQUbNp8h7vnyQWbgFF/sC1JQ6q+LjrHqN61ullzMK4kCGO8TfskuRYBEJR5v4amT5ql7UDzjPeiqNXbTYalWTa1Ld//dLAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAR39Iy8jB8ZVrUKxddD3BndF3tjL+X0WnW7hnwQnCpOYoEy/IfkppJhK09AhG62yryGcc+WJFwWz2mFytG28HvB2dVentO6MwUUHJ0K2AFFKphU0LHCs1hXzsuPqKGIBbxkxmaNW/Omozy8asvkiEQl9qZPjWpeROBRXQtDYfhR0VXSSB51rmK7Vc4J0t3VlMyPgNav+JewoygspkSYOCxJ4IcsHSQ0ATuLu52+6DfLhJ42ukocyRnSiUp8WYDRwK+yCPkqojtjhS19xb0v85Lz7OgHy62xXRmWiBR6SZmNSYaafzzwFkS5QfQ2eZnIGubas+u6uRVuSKkJPWH/ga1g==-----END CERTIFICATE REQUEST-----
Sunday, 10 November 2019
Implementation of 128, 192 & 256 bits Advanced Encryption Standard on Reconfigurable Logic
Implementation of 128, 192 & 256 bits Advanced Encryption Standard on Reconfigurable Logic
Monika Gupta1 , Swapnil Mahto 2 , Ambresh Patel 3
M.tech Scholar1, Assistant Professor 2, Assistant Professor 3
Sri Satya Sai College of Engineering Bhopal M.P. India
Abstract - Advanced encryption standard is adopted by NIST to replace data encryption standard, which was affected by several attacks. In this paper implementation of all three modes namely 128, 192 and 256 of advanced encryption standard is discussed for reconfigurable logic. All these modes are implemented using four design architectures namely: 2 stage sequential, 3 stage sequential , combinational and pipelined.
Keywords - Advanced encryption standard, Sequential, combinational, pipelined, encryption,
cryptography
Source:http://www.ijettjournal.org/
Saturday, 9 November 2019
SMS ENCRYPTION USING AES ON ANDROID APPLICATION
Encryption is of great importance once the confidentiality of information is to be maintained over the network. SMS being one of the major means of data exchange among the mobile users.xSecurityxofxSMS is one of the major issues that must be handled during data transmission. So, by using Android technology an application has been developed by us which permits the sender to encode the messages before they are sent over the network. For the encryption and decryption process we have used Advanced Encryption Standard (AES) as the cryptographic algorithm. The application allows the user to input the key and the message which has to be encrypted and hence generate an encrypted message which can be decrypted by the receiver. The encrypted text so developed by the app is also resistant to Brute-Force attacks we have used AES.
Source: 122.252.232.85
Sunday, 3 November 2019
An Improved AES Cryptosystem Based Genetic Method on S-Box, With, 256 Key Sizes and 14 Rounds
An Improved AES Cryptosystem Based Genetic Method on S-Box, With, 256 Key Sizes and 14 Rounds
Ashutosh Pandey1
, Umesh Kumar Lilhore2
1 M.Tech Scholar, Dept. of CSE, NIIST Bhopal, India
2 NIIST Bhopal, A.P Dept. of CSE, NIIST Bhopal, India
Abstract— Cryptography methods are widely used in digital communication for secure data transactions. Cryptography methods have two categories symmetric and asymmetric. Both types of encrypting have their own importance and limitations. In Symmetric key-based encryption same key is used for encryption and decryption process. One of the most popular and widely used symmetric encryption methods is (AES) Advanced encryption standard, which attracts researchers to develop a more efficient AES cryptosystem. In this research work, we are presenting an improved AES encryption method “IAES”. The proposed IAES method uses a modified S-Box by employing a Genetic algorithm (GA) with a key size of 256 bit. In proposed method IAES, GA will be used in the S-box to perform various pipelined operations such as substitution, shifting of rows, mixing of a column and to perform Add Round Key in the AES rounds. In this work proposed IAES and existing AES method both are implemented over MATLAB simulator and various comparison parameters such as encryption time, speed and decryption time and speed are calculated. The high level of system integration along with high speed and high throughput makes the proposed IAES based cryptosystem a perfect choice for a spread of application.
Keywords— Cryptography, Symmetric, AES, S-box, Sbox, Genetic Algorithm
Source:https://media.neliti.com
Saturday, 2 November 2019
[PAPER CRYPTOGRAPHY] AES Encryption and Decryption Using Direct3D 10 API
AES Encryption and Decryption Using Direct3D 10 API
Adrian Marius Chiuţă
Computer Science Department, IT&C Security Master
Cybernetics and Economic Informatics
Academy of Economic Studies
Calea Dorobanţilor, Nb. 15-17, Room 2315, Sector 1, Bucharest
ROMANIA
achiuta@tessera.com, http://ism.ase.ro
Abstract: Current video cards (GPUs – Graphics Processing Units) are very programmable have become much more powerful than the CPUs and they are very affordable. In this paper, we present an implementation for the AES algorithm using Direct3D 10 certified GPUs. The graphics API Direct3D 10 is the first version that allows the use of integer operations, making from the traditional GPUs (that works only with floating-point numbers), General Purpose GPUs that can be used for a large number of algorithms, including encryption. We present the performance of the symmetric key encryption algorithm – AES, on a middle-range GPU and on a middle-range quad-core CPU. On the testing system, the developed solution is almost 3 times faster on the GPU than on one single-core CPU, showing that the GPU can perform as an efficient cryptographic accelerator
Source:https://arxiv.org/
Download Full Paper
Source:https://arxiv.org/
Download Full Paper
Friday, 1 November 2019
Secure Data Encryption Through a Combination of AES, RSA, and HMAC
Secure Data Encryption Through a Combination of AES, RSA, and HMAC
Eman Salim Ibrahim Harba
Computer Unit and Internet
College of Arts, University of Baghdad
Baghdad, Iraq
emanharba_121212@coart.uobaghdad.edu.iq
Abstract—Secure file transfer based upon well-designed file encryption and authorization systems expend considerable effort to protect passwords and other credentials from being stolen. Transferring and storing passwords in plaintext form leaves them at risk of exposure to attackers, eavesdroppers and spyware. To avoid such exposure, powerful encryption/authentication systems use various mechanisms to minimize the possibility that unencrypted credentials will be exposed, as well as be sure that any authentication data that does get transmitted and stored will be of minimal use to an attacker. In this paper, we proposed a method to protect data transferring by three hybrid encryption techniques: symmetric AES the algorithm used to encrypt files, asymmetric RSA used to encrypt AES password and HMAC to encrypt a symmetric password and/or data to ensure a secure transmitting between server-client or client-client from verifying in-between client and server and make it hard to attack by common attacked methods.
Keywords: Cryptography; Data Encryption; AES; RSA; HMAC
Source: https://www.etasr.com/
[PAPER CRYPTOGRAPHY ] Image encryption and decryption using AES algorithm
Image encryption and decryption using AES algorithm
Priya Deshmukh
Abstract— In today’s world data security is the major problem which is to face. In order to secure data during communication, data storage and transmission we use Advance encryption standard(AES). AES is a symmetric block cipher intended to replace DES for commercial applications.it uses 128-bit block size and a key size of 128, 192, or 256 bits. The AES algorithm is used to secure data from unauthorized user. The available AES algorithm is used for text data as well as for image data. In this paper an image is given as input to the AES encryption algorithm which gives encrypted output. This encrypted output is given as input to the AES decryption algorithm and the original image is regained as output. The AES algorithm for image encryption and decryption which synthesizes and simulated with the help of MATLAB software
Index Terms— AES, cipher, DES, image encryption, image decryption, MATLAB
Source:https://www.ijser.org
Download Full Paper
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
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
Source: https://www.ijitee.org
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
[ SOLVED ] Wrong IV length: must be 16 bytes long
PROBLEM
SOLVED
Wrong IV length: must be 16 bytes longCAUSE
IV Length less then 16
My Code
public static String initVector = "12345678";
SOLVED
change IV variable like this
public static String initVector = "1234567812345678";
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/PKCS7PaddingCAUSE
AES/ECB/PKCS7Padding not supportedSOLUTION
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
keystore.load(is, "".toCharArray());
}
PKIXParameters params = new PKIXParameters(keystore);
params.setRevocationEnabled(true);
PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchorsCAUSE
does not recognize the digital certificate issuer or path validatioan failedMy CODE
PKIXParameters params = new PKIXParameters(Collections.singleton(anchor));SOLVED
params.setRevocationEnabled(true);
- 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
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
when validating digital certificates using ocsp get error
java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-dateCAUSE
the time on the client and server is not appropriate ...SOLVED
fix the time on the client or server with the correct timeEXAMPLE
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.
Sunday, 29 September 2019
[SOLVED] Timestamp signature property generation error: Unsupported transport protocol
Error :
Timestamp signature property generation error: Unsupported transport protocol
SOLVED :
Write url tsa server with http://
Subscribe to:
Posts (Atom)