Channel: CodeSection,代码区,网络安全 - CodeSec
Viewing all articles
Browse latest Browse all 12749

Generating a key in PHP for AES 256

Key Generation Security for AES Encryption

I found this following code while researching about AES encryption on the internet. In this code I found that the key and the iv are generated using hash function and uses sha256. I would like to know whether this method is safe for encryption of tex

Generation of a secret key for AES 256 encryption from a keychain

I am working on a project where I need to encrypt/decrypt some data locally. I am using RNCryptor for the encryption and decryption process. To do that I need to use key, i don't want to define that key from app side like: NSString *password = @"Secr

What is the best option to store an encryption key for AES-256-CBC?

I am using php's openssl to encrypt sensitive user data on my website. I have an ssl certificate to provide further encryption. But how do I keep the key secure? I have done some research and come up with these steps to follow- 1) Store it in another

Can I use the key as IV for AES?

I wish to be more efficient in generating a random key and a random IV for the encryption. But is it workable and safe to use the random key as the IV?You could but it would not be secure. The usual practice is to use a cryptographically secure rando

Generate an array in PHP for the javascript function <script> $(function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", Decrypt an encrypted string AES-256-EAX in Ruby?

I need to decrypt a AES-256-EAX encrypted string from Java in Ruby. Ruby's built-in OpenSSL::Cipher provides functionality to decrypt AES-256-CBC, when I try to use AES-256-EAX, its throwing that the algorithm is not supported. Is there any library/g

PHP generates symmetric key with AES, ECB mode block and PKCS5Padding

I need to generate symmetrics keys with standard AES in ECB mode block and with PKCS5Padding, but I can't do it. During my searches, I only found functions to encrypt something with this conditions above. But I don't want this; I want to generate a s

Part II: How to make Ruby AES-256-CBC and PHP MCRYPT_RIJNDAEL_128 play well together

This question is a continuation of my last one, regarding How to make Ruby AES-256-CBC and PHP MCRYPT_RIJNDAEL_128 play well together. I've got that working now, but I'm still struggling to go the other direction. The PHP generated cryptogram appears

AES 256 PHP encryption with padding

I got the following requirements for the encryption for the API i am currently trying to access: PKCS7 padding method CBC encryption mode AES key size 256, block size 128 Everytime i submit to the API with the encryption, there seems to be something

How to properly encrypt data with proper authentication using AES-256-CBC in php?

I have been using the openssl function for encrypting data with AES-256-CBC in php. I have been able to encrypt it using an unique IV (by generating with openssl_random_pseudo_bytes)for each new encryption. But I am struggling with the idea of authen

Laravel 5.4: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths

It is Laravel 5.4 setup of my web app. one thing is happening repeatedly on page load. and because of that, I am not able to get data on my page. Runtime exception: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengt

Changing the RSA private key with AES 256 in Java

I am writing a secure file sharing application in Java. The general architecture looks like this: User wishes to encrypt a file for secure sharing between multiple users. The application generates a random UUID on the client and uses this as the AES

How to make Ruby AES-256-CBC and PHP MCRYPT_RIJNDAEL_128 play well together

I'm generating data to send from a Ruby stack to a PHP stack. I'm using the OpenSSL::Cipher library on the Ruby side and the 'mcrypt' library in PHP. When I encrypt using 'aes-256-cbc' (256-bit block size) in Ruby I need to use MCRYPT_RIJNDAEL_128 (1

How to replicate aes-256-cbc from mysql to PHP

Using this article as a guide I was able to successfully replicate MySQL's aes-128-ecb in PHP: final class Encryption { // The key const KEY = '36F3D40A7A41A827968BE75A87D60950'; /** * Encrypt a string * * @access public * @static * @param string $st

Viewing all articles
Browse latest Browse all 12749

Latest Images

Trending Articles

Latest Images